forked from retrospy/RetroSpy
-
Notifications
You must be signed in to change notification settings - Fork 1
/
release-x86.bat
111 lines (82 loc) · 4.32 KB
/
release-x86.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
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
103
104
105
106
107
108
109
110
111
@echo off
IF "%~1"=="" GOTO release
IF NOT "%~1"=="" set sub=1
:release
rmdir /S /Q bin\Release\net7.0
"C:\Program Files\dotnet\dotnet.exe" build RetroSpyX\RetroSpyX.csproj /p:RuntimeIdentifier=win10-x86 /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=..\bin\Release\net7.0
if errorlevel 0 goto :AnyCPUBuildgb
echo Aborting release. Error during AnyCPU build.
goto end
:AnyCPUBuildgb
"C:\Program Files\dotnet\dotnet.exe" build GBPemuX\GBPemuX.csproj /p:RuntimeIdentifier=win10-x86 /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=..\bin\Release\net7.0
if errorlevel 0 goto AnyCPUBuilduu
echo Aborting release. Error during AnyCPU build.
goto end
:AnyCPUBuilduu
"C:\Program Files\dotnet\dotnet.exe" build UsbUpdaterX2\UsbUpdaterX2.csproj /p:RuntimeIdentifier=win10-x86 /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=..\bin\Release\net7.0
if errorlevel 0 goto AnyCPUBuildgpbu
echo Aborting release. Error during AnyCPU build.
goto end
:AnyCPUBuildgpbu
"C:\Program Files\dotnet\dotnet.exe" build GBPUpdaterX2\GBPUpdaterX2.csproj /p:RuntimeIdentifier=win10-x86 /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=..\bin\Release\net7.0
if errorlevel 0 goto :MiSTer
echo Aborting release. Error during AnyCPU build.
goto end
:MiSTer
cd MiSTer
"C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\msbuild.exe" MiSTer.vcxproj /p:Configuration=Release /p:Platform="Win32" /p:OutputPath=Release
cd ..
if errorlevel 0 goto buildOK
echo Aborting release. Error during MiSTer build.
goto end
:buildOK
;del RetroSpy-Windows.zip
;del RetroSpy-Windows.zip.*
;rmdir /S /Q RetroSpy-Setup
;del RetroSpy-Setup.exe
;rmdir /S /Q RetroSpy-Upload
mkdir RetroSpy-Setup
if exist "..\..\..\certs\codesignpasswd.txt" (
set /p codesignpasswd=<"..\..\..\certs\codesignpasswd.txt"
)
cd "bin\Release\net7.0\"
REM Sign all 4 executables
cd bin\Release\net7.0
if exist "..\..\..\..\..\..\certs\codesign.pfx" (
"C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x86\SignTool" sign /f "..\..\..\..\..\..\certs\codesign.pfx" /p %codesignpasswd% /tr http://timestamp.comodoca.com /td sha256 /fd sha256 /a Retrospy.exe)
if exist "..\..\..\..\..\..\certs\codesign.pfx" (
"C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x86\SignTool" sign /f "..\..\..\..\..\..\certs\codesign.pfx" /p %codesignpasswd% /tr http://timestamp.comodoca.com /td sha256 /fd sha256 /a GBPemu.exe)
if exist "..\..\..\..\..\..\certs\codesign.pfx" (
"C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x86\SignTool" sign /f "..\..\..\..\..\..\certs\codesign.pfx" /p %codesignpasswd% /tr http://timestamp.comodoca.com /td sha256 /fd sha256 /a UsbUpdater.exe)
if exist "..\..\..\..\..\..\certs\codesign.pfx" (
"C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x86\SignTool" sign /f "..\..\..\..\..\..\certs\codesign.pfx" /p %codesignpasswd% /tr http://timestamp.comodoca.com /td sha256 /fd sha256 /a GBPUpdater.exe)
xcopy /y /e /s * ..\..\..\RetroSpy-Setup
cd ..\..\..
cd RetroSpy-Setup
;"C:\Program Files\7-Zip\7z.exe" -r a ..\RetroSpy-Windows.zip *.*
cd ..
;copy LICENSE RetroSpy-Setup
;"C:\Program Files\7-Zip\7z.exe" a RetroSpy-Windows.zip LICENSE
mkdir RetroSpy-Setup\MiSTer
if "%sub%" == "1" ( sed -e s/RELEASE_TAG/%~1/g MiSTer\update-retrospy-nightly.sh > RetroSpy-Setup\MiSTer\update-retrospy.sh) else (copy MiSTer\update-retrospy.sh RetroSpy-Setup\MiSTer)
;cd RetroSpy-Setup
;"C:\Program Files\7-Zip\7z.exe" a ..\RetroSpy-Windows.zip MiSTer\update-retrospy.sh
;cd ..
REM ;"C:\Program Files\7-Zip\7z.exe" a RetroSpy-Windows.zip keybindings.xml
REM ;copy keybindings.xml RetroSpy-Setup
REM Copy Drivers
;mkdir RetroSpy-Setup\drivers\
;xcopy /y /e /s drivers RetroSpy-Setup\drivers\
;xcopy /y /e /s CH341SER RetroSpy-Setup\CH341SER\
;copy serial_install.exe RetroSpy-Setup\
if exist "C:\Program Files (x86)\Actual Installer\actinst.exe" (
"C:\Program Files (x86)\Actual Installer\actinst.exe" /S ".\RetroSpy-32.aip"
if exist "..\..\..\certs\codesign.pfx" (
"C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x86\SignTool" sign /f "..\..\..\certs\codesign.pfx" /p %codesignpasswd% /tr http://timestamp.comodoca.com /td sha256 /fd sha256 /a Retrospy-Setup.exe
)
)
if exist "..\..\..\upload\" (
copy RetroSpy-Setup.exe ..\..\..\upload\RetroSpy-Setup-x86.exe
copy RetroSpy-Windows.zip ..\..\..\upload\RetroSpy-Windows-x86.zip
)
:end