src/platform/windows/setup/setup.iss.in (view raw)
1#define AppName "${PROJECT_NAME}"
2#define AppName2 "${BINARY_NAME}"
3#define VerMajor ${LIB_VERSION_MAJOR}
4#define VerMinor ${LIB_VERSION_MINOR}
5#define VerRev ${LIB_VERSION_PATCH}
6#define VerBuild ${GIT_REV}
7#define Release ${IS_RELEASE}
8#define WinBits "${WIN_BITS}"
9#define VersionString "${VERSION_STRING}"
10#define CleanVersionString "${CLEAN_VERSION_STRING}"
11#define SetupDir "${SETUP_DIR}"
12#define BinDir "${BIN_DIR}"
13#define ResDir "${RES_DIR}"
14
15#define FullVersion ParseVersion('{#AppName}.exe', VerMajor, VerMinor, VerRev, VerBuild)
16#define AppVer Str(VerMajor) + "." + Str(VerMinor) + "." + Str(VerRev)
17
18[Setup]
19SourceDir={#BinDir}
20SetupIconFile={#SetupDir}\setup.ico
21WizardImageFile={#SetupDir}\wizard-image.bmp
22
23AppName={#AppName}
24AppVersion={#AppVer}
25AppPublisher=Jeffrey Pfau
26AppPublisherURL=https://mgba.io
27AppSupportURL=https://mgba.io
28AppUpdatesURL=https://mgba.io
29AppReadmeFile={#BinDir}\README.html
30OutputDir=.\
31DefaultDirName={pf}\{#AppName}
32DefaultGroupName={#AppName}
33AllowNoIcons=yes
34DirExistsWarning=no
35ChangesAssociations=True
36AppendDefaultDirName=False
37UninstallDisplayIcon={app}\{#AppName}.exe
38MinVersion=0,6.0
39AlwaysShowDirOnReadyPage=True
40UsePreviousSetupType=True
41UsePreviousTasks=True
42AlwaysShowGroupOnReadyPage=True
43LicenseFile={#BinDir}\LICENSE.txt
44#if Release
45 #define IsRelease = 'yes'
46 AppVerName={#AppName} {#AppVer}
47#else
48 #define IsRelease = 'no'
49 AppVerName={#AppName} {#VersionString} (Development build)
50#endif
51OutputBaseFilename={#AppName}-setup-{#CleanVersionString}-win{#WinBits}
52UsePreviousLanguage=False
53DisableWelcomePage=False
54VersionInfoDescription={#AppName} is an open-source Game Boy Advance emulator
55VersionInfoCopyright=� 2013�2020 Jeffrey Pfau
56VersionInfoProductName={#AppName}
57VersionInfoVersion={#AppVer}
58Compression=lzma2/ultra64
59SolidCompression=True
60VersionInfoTextVersion={#AppVer}
61VersionInfoProductVersion={#AppVer}
62VersionInfoProductTextVersion={#AppVer}
63ArchitecturesInstallIn64BitMode=x64
64ArchitecturesAllowed=x86 x64
65
66[Languages]
67Name: "english"; MessagesFile: "compiler:Default.isl"
68Name: "french"; MessagesFile: "compiler:Languages\French.isl"
69Name: "german"; MessagesFile: "compiler:Languages\German.isl"
70Name: "italian"; MessagesFile: "compiler:Languages\Italian.isl"
71Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl"
72
73[Tasks]
74Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"
75Name: "gbfileassoc"; Description: "{cm:AssocFileExtension,{#AppName},Game Boy}"; GroupDescription: "{cm:FileAssoc}"
76Name: "gbcfileassoc"; Description: "{cm:AssocFileExtension,{#AppName},Game Boy Color}"; GroupDescription: "{cm:FileAssoc}"
77Name: "sgbfileassoc"; Description: "{cm:AssocFileExtension,{#AppName},Super Game Boy}"; GroupDescription: "{cm:FileAssoc}"
78Name: "gbafileassoc"; Description: "{cm:AssocFileExtension,{#AppName},Game Boy Advance}"; GroupDescription: "{cm:FileAssoc}"
79
80[Files]
81Source: "{#BinDir}\{#AppName}.exe"; DestDir: "{app}"; Flags: ignoreversion
82Source: "{#BinDir}\{#AppName2}-sdl.exe"; DestDir: "{app}"; Flags: ignoreversion
83Source: "{#BinDir}\CHANGES.txt"; DestDir: "{app}\"; Flags: ignoreversion isreadme
84Source: "{#BinDir}\LICENSE.txt"; DestDir: "{app}\"; Flags: ignoreversion
85Source: "{#ResDir}\nointro.dat"; DestDir: "{app}\"; Flags: ignoreversion
86Source: "{#BinDir}\README.html"; DestDir: "{app}\"; Flags: ignoreversion isreadme; Languages: english italian spanish
87Source: "{#BinDir}\README_DE.html"; DestDir: "{app}\"; DestName: "LIESMICH.html"; Flags: ignoreversion isreadme; Languages: german
88Source: "{#ResDir}\shaders\*"; DestDir: "{app}\shaders\"; Flags: ignoreversion recursesubdirs
89Source: "{#ResDir}\licenses\*"; DestDir: "{app}\licenses\"; Flags: ignoreversion recursesubdirs
90
91[Icons]
92Name: "{commonstartmenu}\{#AppName}"; Filename: "{app}\{#AppName}.exe"; Check: not WizardNoIcons
93Name: "{commondesktop}\{#AppName}"; Filename: "{app}\{#AppName}.exe"; Tasks: desktopicon
94
95[Run]
96Filename: "{app}\{#AppName}.exe"; Description: "{cm:LaunchProgram,{#AppName}}"; Flags: nowait postinstall skipifsilent
97
98[Dirs]
99Name: "{app}"
100
101[CustomMessages]
102english.FileAssoc=Register file associations
103french.FileAssoc=Register file associations
104italian.FileAssoc=Register file associations
105spanish.FileAssoc=Register file associations
106german.FileAssoc=Dateierweiterungen registrieren
107
108[Registry]
109Root: HKCR; Subkey: ".gb"; ValueType: string; ValueName: ""; ValueData: "Game Boy ROM"; Flags: uninsdeletevalue; Tasks: gbfileassoc
110Root: HKCR; Subkey: ".gb\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\{#AppName}.exe,0"; Tasks: gbfileassoc
111Root: HKCR; Subkey: ".gb\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#AppName}.exe"" ""%1"""; Tasks: gbfileassoc
112Root: HKCR; Subkey: ".gbc"; ValueType: string; ValueName: ""; ValueData: "Game Boy Color ROM"; Flags: uninsdeletevalue; Tasks: gbcfileassoc
113Root: HKCR; Subkey: ".gbc\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\{#AppName}.exe,0"; Tasks: gbcfileassoc
114Root: HKCR; Subkey: ".gbc\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#AppName}.exe"" ""%1"""; Tasks: gbcfileassoc
115Root: HKCR; Subkey: ".sgb"; ValueType: string; ValueName: ""; ValueData: "Super Game Boy ROM"; Flags: uninsdeletevalue; Tasks: sgbfileassoc
116Root: HKCR; Subkey: ".sgb\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\{#AppName}.exe,0"; Tasks: sgbfileassoc
117Root: HKCR; Subkey: ".sgb\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#AppName}.exe"" ""%1"""; Tasks: sgbfileassoc
118Root: HKCR; Subkey: ".gba"; ValueType: string; ValueName: ""; ValueData: "Game Boy Advance ROM"; Flags: uninsdeletevalue; Tasks: gbafileassoc
119Root: HKCR; Subkey: ".gba\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\{#AppName}.exe,0"; Tasks: gbafileassoc
120Root: HKCR; Subkey: ".gba\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#AppName}.exe"" ""%1"""; Tasks: gbafileassoc
121
122[Code]
123var
124 noReleaseWarning: String;
125
126procedure InitializeWizard();
127 begin
128 if ExpandConstant('{#IsRelease}') = 'no' then
129 begin
130 if ExpandConstant('{language}') = 'english' then noReleaseWarning := 'You are about to install a development build of {#AppName}.' + #13#10#13#10 + 'Development builds may contain bugs that are not yet discovered. Please report any issues you can find to the GitHub project page.';
131 if ExpandConstant('{language}') = 'french' then noReleaseWarning := 'You are about to install a development build of {#AppName}.' + #13#10#13#10 + 'Development builds may contain bugs that are not yet discovered. Please report any issues you can find to the GitHub project page.';
132 if ExpandConstant('{language}') = 'italian' then noReleaseWarning := 'You are about to install a development build of {#AppName}.' + #13#10#13#10 + 'Development builds may contain bugs that are not yet discovered. Please report any issues you can find to the GitHub project page.';
133 if ExpandConstant('{language}') = 'spanish' then noReleaseWarning := 'You are about to install a development build of {#AppName}.' + #13#10#13#10 + 'Development builds may contain bugs that are not yet discovered. Please report any issues you can find to the GitHub project page.';
134 if ExpandConstant('{language}') = 'german' then noReleaseWarning := 'Sie m�chten eine Entwicklerversion von {#AppName} installieren.' + #13#10#13#10 + 'Entwicklerversionen k�nnen bislang noch nicht endeckte Fehler beinhalten. Bitte melden Sie alle Fehler, die Sie finden k�nnen, auf der GitHub-Projektseite.';
135 MsgBox(noReleaseWarning, mbInformation, MB_OK);
136 end;
137 end;
138end.