forked from ubisoft/Sharpmake
-
Notifications
You must be signed in to change notification settings - Fork 0
/
UpdateSharpmakeProjects.bat
44 lines (35 loc) · 1.07 KB
/
UpdateSharpmakeProjects.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
@echo off
:: main
set ERRORLEVEL_BACKUP=0
call :UpdateRef samples SharpmakeGen SharpmakeGen.sharpmake.cs reference %~dp0
if not "%ERRORLEVEL_BACKUP%" == "0" goto error
@COLOR 2F
echo References update succeeded!
timeout /t 5
goto end
:: function Update the reference folder that's used for regression tests
:: params: testScopedCurrentDirectory,
:: folderPath,
:: mainFile,
:: outputDirectory
:: remapRootPath
:UpdateRef
:: backup current directory
pushd %CD%
:: set testScopedCurrentDirectory as current
cd /d %~dp0%~1
set SHARPMAKE_EXECUTABLE=%~2\bin\Debug\Sharpmake.Application.exe
if not exist %SHARPMAKE_EXECUTABLE% set SHARPMAKE_EXECUTABLE=%~2\bin\Release\Sharpmake.Application.exe
if not exist %SHARPMAKE_EXECUTABLE% echo Cannot find sharpmake executable in %~dp0%~1\%~2 & pause & goto error
echo Using executable %SHARPMAKE_EXECUTABLE%
call %SHARPMAKE_EXECUTABLE% "/sources(@"%~2\%~3") /verbose"
set ERRORLEVEL_BACKUP=%errorlevel%
:: restore caller current directory
popd
goto :end
:end
exit /b 0
:error
@COLOR 4F
pause
exit /b 1