forked from shauleiz/vJoy
-
Notifications
You must be signed in to change notification settings - Fork 35
/
BuildAll.bat
58 lines (48 loc) · 1.9 KB
/
BuildAll.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
echo off
SET VS=14.0
SET BUILDER=%ProgramFiles(x86)%\MSBuild\%VS%\Bin\MSBuild.exe
SET Target64=x64\Release
SET Target32=Win32\Release
SET DigiCertUtil=%USERPROFILE%\DESKTOP\DigiCertUtil.exe
SET InnoCompiler=%ProgramFiles(x86)%\Inno Setup 5\ISCC.exe
:build32
echo %DATE% %TIME%: Cleaning vJoy (x86)
"%BUILDER%" vjoy.sln /maxcpucount:1 /t:clean /p:Platform=Win32;Configuration=Release
set BUILD_STATUS=%ERRORLEVEL%
if not %BUILD_STATUS%==0 goto fail
echo %DATE% %TIME%: Building vJoy (x86)
"%BUILDER%" vjoy.sln /maxcpucount:4 /p:Platform=Win32;Configuration=Release
set BUILD_STATUS=%ERRORLEVEL%
if not %BUILD_STATUS%==0 goto fail
:build64
echo %DATE% %TIME%: Cleaning vJoy (x64)
"%BUILDER%" vjoy.sln /maxcpucount:1 /t:clean /p:Platform=x64;Configuration=Release
set BUILD_STATUS=%ERRORLEVEL%
if not %BUILD_STATUS%==0 goto fail
echo %DATE% %TIME%: Building vJoy (x64)
"%BUILDER%" vjoy.sln /maxcpucount:4 /p:Platform=x64;Configuration=Release
set BUILD_STATUS=%ERRORLEVEL%
if not %BUILD_STATUS%==0 goto fail
:signapps
echo %DATE% %TIME%: Signing the applications
IF NOT EXIST %DigiCertUtil% GOTO NOUTIL
%DigiCertUtil% sign /sha1 "6b 05 e5 cc 0d b8 8a 0d 89 62 48 2e cb 9c d9 59 e1 b0 57 90" /noInput .\%Target64%\vJoyList.exe*.\%Target32%\vJoyList.exe*.\%Target64%\vJoyConf.exe*.\%Target32%\vJoyConf.exe*.\%Target64%\vJoyFeeder.exe*.\%Target32%\vJoyFeeder.exe
set SIGN_STATUS=%ERRORLEVEL%
if not %SIGN_STATUS%==0 goto fail
echo %DATE% %TIME%: Signing the applications - OK
:inno
echo %DATE% %TIME%: Compiling the Inno Setup Script
IF NOT EXIST "%InnoCompiler%" GOTO NOINNO
"%InnoCompiler%" install\vJoyInstallerSigned.iss
set INNO_STATUS=%ERRORLEVEL%
if not %INNO_STATUS%==0 goto fail
echo %DATE% %TIME%: Compiling the Inno Setup Script - OK
exit /b 0
:NOUTIL
echo %DATE% %TIME%: Could not find DigiCertUtil on the desktop
goto fail
:NOINNO
echo %DATE% %TIME%: Could not find Inno Setup Compiler
goto fail
:fail
exit /b 1