forked from iiasa/message_ix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.bat
39 lines (30 loc) · 973 Bytes
/
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
cd > .foo
set /p MESSAGE_IX=<.foo
del .foo
echo %MESSAGE_IX%
echo Python MESSAGE_IX setup
python setup.py install
messageix-config --model_path message_ix\\model
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 (
rscript rmessageix/build_rmessageix.R [--verbose]
)
if %errorlevel% neq 0 GOTO InstallError
setx IXMP_PATH "%MESSAGE_IX%"
copy message_ix\\model\\templates\\MESSAGE_master_template.gms message_ix\\model\\MESSAGE_master.gms
copy message_ix\\model\\templates\\MESSAGE_project_template.gpr message_ix\\model\\MESSAGE_project.gpr
py.test tests
pause
exit
@rem install error
:InstallError
echo ==========================================================
echo There was an error during the installation of MESSAGEix!
echo ==========================================================
pause
exit