-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathice.bat
More file actions
54 lines (44 loc) · 969 Bytes
/
ice.bat
File metadata and controls
54 lines (44 loc) · 969 Bytes
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
50
51
52
53
54
@ECHO off
SETLOCAL
PUSHD %~dp0
:: Cretae the build directory
IF NOT EXIST build\ (
ECHO Preparing the workspace...
MKDIR build
)
:: Create the build\tools directory
IF NOT EXIST build\tools\ (
ECHO Preparing tools...
MKDIR build\tools\
CALL :_initialize
)
IF NOT EXIST build\tools\conanrun.bat (
ECHO Rebuilding enviroment...
CALL :_initialize
)
:: Move to the application
GOTO :_run
:: Initialize the project environment
:_initialize
PUSHD build\tools
conan install ..\..\tools -of . --build=missing --profile default
POPD
ECHO Workspace initialized...
GOTO :_exit
:_run
CALL build\tools\conanrun.bat
CALL "%ICE_SCRIPT%" workspace.moon %*
:: Save this value as it so the call to 'deactivate' wont erase it in some caes
set ERROR_CODE=%ERRORLEVEL%
CALL build\tools\deactivate_conanrun.bat
:_errcheck
:: Check the command return code
IF "%ERROR_CODE%" == "0" (
GOTO :_exit
)
GOTO :_error
POPD
:_exit
exit /B 0
:_error
exit /B 1