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: "german"; MessagesFile: "compiler:Languages\German.isl"
68Name: "english"; MessagesFile: "compiler:Default.isl"
69Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl"
70Name: "french"; MessagesFile: "compiler:Languages\French.isl"
71Name: "italian"; MessagesFile: "compiler:Languages\Italian.isl"
72Name: "japanese"; MessagesFile: "compiler:Languages\Japanese.isl"
73Name: "korean"; MessagesFile: "compiler:Languages\Korean.isl"
74Name: "dutch"; MessagesFile: "compiler:Languages\Dutch.isl"
75Name: "brazilianportuguese"; MessagesFile: "compiler:Languages\BrazilianPortuguese.isl"
76Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"
77Name: "turkish"; MessagesFile: "compiler:Languages\Turkish.isl"
78Name: "chinesesimplified"; MessagesFile: "compiler:Languages\ChineseSimplified.isl"
79
80[Tasks]
81Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"
82Name: "gbfileassoc"; Description: "{cm:AssocFileExtension,{#AppName},Game Boy}"; GroupDescription: "{cm:FileAssoc}"
83Name: "gbcfileassoc"; Description: "{cm:AssocFileExtension,{#AppName},Game Boy Color}"; GroupDescription: "{cm:FileAssoc}"
84Name: "sgbfileassoc"; Description: "{cm:AssocFileExtension,{#AppName},Super Game Boy}"; GroupDescription: "{cm:FileAssoc}"
85Name: "gbafileassoc"; Description: "{cm:AssocFileExtension,{#AppName},Game Boy Advance}"; GroupDescription: "{cm:FileAssoc}"
86
87[Files]
88Source: "{#BinDir}\{#AppName}.exe"; DestDir: "{app}"; Flags: ignoreversion
89Source: "{#BinDir}\{#AppName2}-sdl.exe"; DestDir: "{app}"; Flags: ignoreversion
90Source: "{#BinDir}\CHANGES.txt"; DestDir: "{app}\"; Flags: ignoreversion isreadme
91Source: "{#BinDir}\LICENSE.txt"; DestDir: "{app}\"; Flags: ignoreversion
92Source: "{#ResDir}\nointro.dat"; DestDir: "{app}\"; Flags: ignoreversion
93Source: "{#BinDir}\README.html"; DestDir: "{app}\"; Flags: ignoreversion isreadme; Languages: not german
94Source: "{#BinDir}\README_DE.html"; DestDir: "{app}\"; DestName: "LIESMICH.html"; Flags: ignoreversion isreadme; Languages: german
95Source: "{#BinDir}\README_ES.html"; DestDir: "{app}\"; DestName: "LEEME.html"; Flags: ignoreversion isreadme; Languages: spanish
96Source: "{#ResDir}\shaders\*"; DestDir: "{app}\shaders\"; Flags: ignoreversion recursesubdirs
97Source: "{#ResDir}\licenses\*"; DestDir: "{app}\licenses\"; Flags: ignoreversion recursesubdirs
98
99[Icons]
100Name: "{commonstartmenu}\{#AppName}"; Filename: "{app}\{#AppName}.exe"; Check: not WizardNoIcons
101Name: "{commondesktop}\{#AppName}"; Filename: "{app}\{#AppName}.exe"; Tasks: desktopicon
102
103[Run]
104Filename: "{app}\{#AppName}.exe"; Description: "{cm:LaunchProgram,{#AppName}}"; Flags: nowait postinstall skipifsilent
105
106[Dirs]
107Name: "{app}"
108
109[CustomMessages]
110german.FileAssoc=Dateierweiterungen registrieren
111english.FileAssoc=Register file associations
112spanish.FileAssoc=Register file associations
113french.FileAssoc=Register file associations
114italian.FileAssoc=Register file associations
115japanese.FileAssoc=Register file associations
116korean.FileAssoc=Register file associations
117dutch.FileAssoc=Register file associations
118brazilianportuguese.FileAssoc=Register file associations
119russian.FileAssoc=Register file associations
120turkish.FileAssoc=Register file associations
121chinesesimplified.FileAssoc=Register file associations
122
123[Registry]
124Root: HKCR; Subkey: ".gb"; ValueType: string; ValueName: ""; ValueData: "Game Boy ROM"; Flags: uninsdeletevalue; Tasks: gbfileassoc
125Root: HKCR; Subkey: ".gb\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\{#AppName}.exe,0"; Tasks: gbfileassoc
126Root: HKCR; Subkey: ".gb\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#AppName}.exe"" ""%1"""; Tasks: gbfileassoc
127Root: HKCR; Subkey: ".gbc"; ValueType: string; ValueName: ""; ValueData: "Game Boy Color ROM"; Flags: uninsdeletevalue; Tasks: gbcfileassoc
128Root: HKCR; Subkey: ".gbc\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\{#AppName}.exe,0"; Tasks: gbcfileassoc
129Root: HKCR; Subkey: ".gbc\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#AppName}.exe"" ""%1"""; Tasks: gbcfileassoc
130Root: HKCR; Subkey: ".sgb"; ValueType: string; ValueName: ""; ValueData: "Super Game Boy ROM"; Flags: uninsdeletevalue; Tasks: sgbfileassoc
131Root: HKCR; Subkey: ".sgb\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\{#AppName}.exe,0"; Tasks: sgbfileassoc
132Root: HKCR; Subkey: ".sgb\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#AppName}.exe"" ""%1"""; Tasks: sgbfileassoc
133Root: HKCR; Subkey: ".gba"; ValueType: string; ValueName: ""; ValueData: "Game Boy Advance ROM"; Flags: uninsdeletevalue; Tasks: gbafileassoc
134Root: HKCR; Subkey: ".gba\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\{#AppName}.exe,0"; Tasks: gbafileassoc
135Root: HKCR; Subkey: ".gba\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#AppName}.exe"" ""%1"""; Tasks: gbafileassoc
136
137[Code]
138var
139 noReleaseWarning: String;
140
141procedure InitializeWizard();
142 begin
143 if ExpandConstant('{#IsRelease}') = 'no' then
144 begin
145 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.';
146 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.';
147 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.'; 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.';
148 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.';
149 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.';
150 if ExpandConstant('{language}') = 'japanese' 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.';
151 if ExpandConstant('{language}') = 'korean' 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.';
152 if ExpandConstant('{language}') = 'dutch' 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.';
153 if ExpandConstant('{language}') = 'brazilianportuguese' 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.';
154 if ExpandConstant('{language}') = 'russian' 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.';
155 if ExpandConstant('{language}') = 'turkish' 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.';
156 if ExpandConstant('{language}') = 'chinesesimplified' 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.';
157 MsgBox(noReleaseWarning, mbInformation, MB_OK);
158 end;
159 end;
160end.