all repos — mgba @ 2d6087aa985fc401b1753f4482f07a512828f170

mGBA Game Boy Advance Emulator

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