forked from iiasa/message_ix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.bat
49 lines (39 loc) · 1.01 KB
/
install.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
cd > .foo
set /p MESSAGE_IX=<.foo
del .foo
echo %MESSAGE_IX%
echo Python MESSAGE_IX setup
chdir ixmp
python setup.py install
chdir ../
python setup.py install
echo R MESSAGE_IX setup
where /q r
IF ERRORLEVEL 1 (
ECHO No valid installation of R found, skipped build and installation of rixmp package.
@rem set ERRORLEVEL to 0 -> ignore R setup
VERIFY
) ELSE (
chdir ixmp
rscript rixmp/build_rixmp.R [--verbose]
chdir ../
rscript rmessageix/build_rmessageix.R [--verbose]
)
if %errorlevel% neq 0 GOTO InstallError
setx IXMP_PATH "%MESSAGE_IX%"
copy model\\templates\\MESSAGE_master_template.gms model\\MESSAGE_master.gms
copy model\\templates\\MESSAGE_project_template.gpr model\\MESSAGE_project.gpr
chdir doc/
call make.bat html
chdir ../
py.test ixmp\\tests
py.test tests
pause
exit
@rem install error
:InstallError
echo =====================================================
echo There was an error during the install process!
echo =====================================================
pause
exit