forked from kaicherry/DirectOutput
-
Notifications
You must be signed in to change notification settings - Fork 0
/
debugrelease.bat
76 lines (54 loc) · 1.93 KB
/
debugrelease.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
67
68
69
70
71
72
73
74
75
76
@echo off
rem ===========================================================
rem
rem The list of DOF DLL builds files is taken from
rem .\manifest.debug.x86.txt. Edit that file to add or
rem remove files.
rem ===========================================================
rem ### PATH CONFIGURATION
rem ### DOF DLL path
set DofDllPath=bin\Debug
rem ### ProPinball bridge DLL path
set ProPinBridgePath=Debug
rem ### ProPinball DOFSlave path
set ProPinSlavePath=ProPinballSlave\bin\x86\Debug
rem ### Zip file path
set ZipPath=Builds
rem ### MSI setup output
set MSIPath=DOFSetup\bin\Debug
rem ===========================================================
rem ### Date/time to embed in zip file name
set TempDate=
for /f "skip=1" %%i in ('wmic os get localdatetime') do if not defined TempDate set TempDate=%%i
set CurrDate=%TempDate:~0,8%
set CurrTime=%TempDate:~8,6%
rem ### Zip file
set ZipName=DirectOutput-mjr-%CurrDate%.zip
set ZipFile=%ZipPath%\%ZipName%
rem ===========================================================
rem ###
rem ### Main build steps
rem ###
rem ### Current DOF assembly version
tools\GetAssemblyVersion.exe tag "%DofDllPath%\DirectOutput.dll" >temp.txt
set /p VersionTag=<temp.txt
del Temp.txt
rem ### Announce what we're doing
echo %VersionTag% Debug
echo -^> %ZipFile%
echo.
rem ### Delete any old copy of the ZIP file
if exist "%ZipFile%" del "%ZipFile%"
rem ### Add the LICENSE file
zip -j "%ZipFile%" LICENSE
rem ### Add DOF DLL files
for /F "eol=# delims=" %%i in (manifest.debug.x86.txt) do (
zip -j "%ZipFile%" "%DofDllPath%\%%i"
)
rem ### Add DOF config example files
zip "%ZipFile%" config\examples\*.xml
rem ### Add ProPinball support files
zip -j "%ZipFile%" "%ProPinSlavePath%\*.exe"
rem ### Copy MSI setup to build folder
copy "%MSIPath%\DOFSetup.msi" "%ZipPath%\DirectOutput-mjr-%CurrDate%.msi"
echo.