-
Notifications
You must be signed in to change notification settings - Fork 1
/
Build.cmd
102 lines (81 loc) · 2.41 KB
/
Build.cmd
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
@echo off
rem Author KMS - Martin Dubois, P.Eng.
rem Copyright (C) 2021 KMS
rem Product EthCAN
rem File Build.cmd
rem Usage .\Build.cmd
rem CODE REVIEW
echo Executing Build.cmd ...
rem ===== Initialization ====================================================
set IMPORT_SCRIPT_FOLDER=Import\Scripts
set BUILD_BEGIN_CMD="%IMPORT_SCRIPT_FOLDER%\KmsBase_Build_Begin.cmd"
set BUILD_INSTALLER_CMD="%IMPORT_SCRIPT_FOLDER%\KmsBase_Build_Installer.cmd"
set SIGN_CMD="%IMPORT_SCRIPT_FOLDER%\KmsBase_Sign.cmd"
rem ===== Verification ======================================================
if not exist %BUILD_BEGIN_CMD% (
echo FATAL ERROR %BUILD_BEGIN_CMD% does not exist
echo Execute .\Import.cmd
pause
exit /B 10
)
if not exist %BUILD_INSTALLER_CMD% (
echo FATAL ERROR %BUILD_INSTALLER_CMD% does not exist
pause
exit /B 20
)
if not exist %SIGN_CMD% (
echo FATAL ERROR %SIGN_CMD% does not exist
pause
exit /B 30
)
rem ===== Execution =========================================================
call %BUILD_BEGIN_CMD% EthCAN
if ERRORLEVEL 1 (
echo ERROR call %BUILD_BEGIN_CMD% EthCAN failed - %ERRORLEVEL%
pause
exit /B 40
)
%MSBUILD% %OPTIONS% /property:Configuration=Debug /property:Platform=x64
if ERRORLEVEL 1 (
echo ERROR %MSBUILD% %OPTIONS% /property:Configuration=Debug /property:Platform=x64 failed - %ERRORLEVEL%
pause
exit /B 50
)
%MSBUILD% %OPTIONS% /property:Configuration=Release /property:Platform=x64
if ERRORLEVEL 1 (
echo ERROR %MSBUILD% %OPTIONS% /property:Configuration=Release /property:Platform=x64 failed - %ERRORLEVEL%
pause
exit /B 60
)
call %TEST_CMD%
if ERRORLEVEL 1 (
echo ERROR %TEST_CMD% failed - %ERRORLEVEL%
pause
exit /B 70
)
%KMS_VERSION_EXE% %VERSION_H% %EXPORT_CMD_TXT%
if ERRORLEVEL 1 (
echo ERROR %KMS_VERSION_EXE% %VERSION_H% %EXPORT_CMD_TXT% failed - %ERRORLEVEL%
pause
exit /B 90
)
call %BUILD_INSTALLER_CMD% %PRODUCT_ISS%
if ERRORLEVEL 1 (
echo ERROR call %BUILD_INSTALLER_CMD% %PRODUCT_ISS% failed - %ERRORLEVEL%
pause
exit /B 100
)
call %SIGN_CMD% Installer/%PRODUCT%_*.exe
if ERRORLEVEL 1 (
echo ERROR call %SIGN_CMD% Installer/%PRODUCT%_*.exe failed - %ERRORLEVEL%
pause
exit /B 110
)
%KMS_VERSION_EXE% -S %VERSION_H% %EXPORT_CMD%
if ERRORLEVEL 1 (
echo ERROR %KMS_VERSION_EXE% -S %VERSION_H% %EXPORT_CMD% failed - %ERRORLEVEL%
pause
exit /B 120
)
rem ===== End ===============================================================
echo OK