This repository has been archived by the owner on Oct 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
/
buildCreateInstallerAndZip.bat
63 lines (51 loc) · 1.92 KB
/
buildCreateInstallerAndZip.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
rem This file can not be called on its own.
if %COMPILE_TOKEN% == "" exit
rem Create portable version.
set RELEASE_FOLDER_ZIP=.\releases\%APP_NAME%
"%ZIP7%" a "%RELEASE_FOLDER_ZIP% %PLATFORM2%.zip" "%RELEASE_FOLDER%\*"
rem Create installer version.
(
echo #define MyAppName "%APP_NAME%"
echo #define MyAppVersion "%APP_VERSION%"
echo #define MyAppURL "%GITHUB_LINK%"
echo #define MyAppExeName "%APP_NAME%.exe"
echo.
echo [Setup]
echo AppId={#MyAppName} "%PLATFORM2%"
echo AppName={#MyAppName}
echo AppVersion={#MyAppVersion}
echo AppPublisherURL={#MyAppURL}
echo AppSupportURL={#MyAppURL}
echo AppUpdatesURL={#MyAppURL}
echo AllowNoIcons=yes
echo DefaultDirName={pf}\{#MyAppName}
echo DisableProgramGroupPage=yes
echo OutputDir=.\releases\
echo OutputBaseFilename={#MyAppName} Installer %PLATFORM2%
echo UninstallDisplayIcon={app}\{#MyAppExeName}
echo UninstallDisplayName={#MyAppName} %APP_VERSION% %PLATFORM2%
echo Compression=lzma
echo SolidCompression=yes
if "%PLATFORM2%"=="x64" (
echo ArchitecturesInstallIn64BitMode=x64
)
echo.
echo [Languages]
echo Name: "english"; MessagesFile: "compiler:Default.isl"
echo.
echo [Tasks]
echo Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
echo.
echo [Files]
echo Source: "%RELEASE_FOLDER%\%APP_NAME%.exe"; DestDir: "{app}"; Flags: ignoreversion
echo Source: "%RELEASE_FOLDER%\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
echo.
echo [Icons]
echo Name: "{commonprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
echo Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
echo.
echo [Run]
echo Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
) > setupScript.iss
"%INNO_SETUP_COMPILER%" setupScript.iss
del setupScript.iss