-
Notifications
You must be signed in to change notification settings - Fork 2
/
BuildMyAppDist.bat
66 lines (52 loc) · 1.37 KB
/
BuildMyAppDist.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
REM CommandInterpreter: $(COMSPEC)
@echo off
rem Script name
set me=%~n0
set SCRIPT_DIR=%~dp0
IF %SCRIPT_DIR:~-1%==\ set SCRIPT_DIR=%SCRIPT_DIR:~0,-1%
:SetGeneralsettings
set ProjectName=MyApp
:SetPathToProjectFiles
set ProjectResources=%SCRIPT_DIR%\Resources
set Sources=%SCRIPT_DIR%\Source
:startBuild
echo:
echo %me% - Check all files ready to be publised then build
echo -------------------------------------------------------------------------------
echo:
:CheckChangelogUpdated
echo CheckChangelogUpdated...
setlocal
call "%SCRIPT_DIR%\CheckChangelogUpdated.bat" "%ProjectResources%\versioninfo\MyAppVersionInfo.rc" "%SCRIPT_DIR%\doc\Changelog.txt"
endlocal
if errorlevel 1 (
set ERRSTR=CheckChangelogUpdated failed
goto :error
)
:buildProject
setlocal
call "%SCRIPT_DIR%\BuildMyApp.bat"
endlocal
if errorlevel 1 (
set ERRSTR=Build Error
goto :error
)
:allOK
rem When all OK
echo:
echo:
echo -------------------------------------------------------------------------------
echo %me%: OK
echo ===============================================================================
echo:
set errorCode=0
goto :end
:error
echo:
echo #############################################################################
echo %me%: FAIL %ERRSTR%
echo =============================================================================
set errorCode=1
goto :end
:end
exit /b %errorCode%