-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_installer_exe.bat
More file actions
30 lines (24 loc) · 1.35 KB
/
build_installer_exe.bat
File metadata and controls
30 lines (24 loc) · 1.35 KB
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
@echo off
setlocal
cd /d "%~dp0"
set "CSC=%WINDIR%\Microsoft.NET\Framework\v4.0.30319\csc.exe"
if not exist "%CSC%" set "CSC=%WINDIR%\Microsoft.NET\Framework64\v4.0.30319\csc.exe"
if not exist "%CSC%" (
echo csc.exe was not found.
exit /b 1
)
if not exist ".\installer-release" mkdir ".\installer-release"
if not exist ".\dist-installer" mkdir ".\dist-installer"
echo Building embedded payload...
powershell -NoProfile -ExecutionPolicy Bypass -File ".\installer-exe\build_payload.ps1" -ProjectRoot "%CD%" -ManifestPath ".\installer-exe\payload_manifest.txt" -OutputZip ".\installer-exe\payload.zip"
if errorlevel 1 exit /b 1
echo Building standalone installer EXE...
"%CSC%" /nologo /target:winexe /out:".\dist-installer\GdPyInstaller.exe" /reference:System.dll /reference:System.Windows.Forms.dll /reference:System.Drawing.dll /reference:System.IO.Compression.dll /reference:System.IO.Compression.FileSystem.dll /resource:".\installer-exe\payload.zip",GdPyPayload.zip /resource:".\VERSION.txt",GdPyVersion.txt ".\installer-exe\Program.cs"
if errorlevel 1 exit /b 1
copy /y ".\dist-installer\GdPyInstaller.exe" ".\installer-release\GdPyInstaller.exe" >nul
copy /y ".\dist-installer\GdPyInstaller.exe" ".\GdPyInstaller.exe" >nul
echo Built:
echo %~dp0dist-installer\GdPyInstaller.exe
echo %~dp0installer-release\GdPyInstaller.exe
echo %~dp0GdPyInstaller.exe
exit /b 0