all repos — mgba @ 13893803c3f528327a7aa96056e7c51564c5f86c

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
 51#if '{#WinBits}' == '64'
 52  ArchitecturesInstallIn64BitMode=x64
 53  ArchitecturesAllows=x64
 54#endif
 55OutputBaseFilename={#AppName}-setup-{#CleanVersionString}-win{#WinBits}
 56UsePreviousLanguage=False
 57DisableWelcomePage=False
 58VersionInfoDescription={#AppName} is an open-source Game Boy Advance emulator
 59VersionInfoCopyright=� 2013�2018 Jeffrey Pfau
 60VersionInfoProductName={#AppName}
 61VersionInfoVersion={#AppVer}
 62Compression=lzma2/ultra64
 63SolidCompression=True
 64VersionInfoTextVersion={#AppVer}
 65VersionInfoProductVersion={#AppVer}
 66VersionInfoProductTextVersion={#AppVer}
 67
 68[Languages]
 69Name: "english"; MessagesFile: "compiler:Default.isl"
 70Name: "french"; MessagesFile: "compiler:Languages\French.isl"
 71Name: "german"; MessagesFile: "compiler:Languages\German.isl"
 72Name: "italian"; MessagesFile: "compiler:Languages\Italian.isl"
 73Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl"
 74
 75[Tasks]
 76Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"
 77Name: "gbfileassoc"; Description: "{cm:AssocFileExtension,{#AppName},Game Boy}"; GroupDescription: "{cm:FileAssoc}"
 78Name: "gbcfileassoc"; Description: "{cm:AssocFileExtension,{#AppName},Game Boy Color}"; GroupDescription: "{cm:FileAssoc}"
 79Name: "sgbfileassoc"; Description: "{cm:AssocFileExtension,{#AppName},Super Game Boy}"; GroupDescription: "{cm:FileAssoc}"
 80Name: "gbafileassoc"; Description: "{cm:AssocFileExtension,{#AppName},Game Boy Advance}"; GroupDescription: "{cm:FileAssoc}"
 81
 82[Files]
 83Source: "{#BinDir}\qt\{#AppName}.exe"; DestDir: "{app}"; Flags: ignoreversion
 84Source: "{#BinDir}\sdl\{#AppName2}-sdl.exe"; DestDir: "{app}"; Flags: ignoreversion
 85Source: "{#BinDir}\CHANGES.txt"; DestDir: "{app}\"; Flags: ignoreversion isreadme
 86Source: "{#BinDir}\LICENSE.txt"; DestDir: "{app}\"; Flags: ignoreversion
 87Source: "{#ResDir}\nointro.dat"; DestDir: "{app}\"; Flags: ignoreversion
 88Source: "{#BinDir}\README.html"; DestDir: "{app}\"; Flags: ignoreversion isreadme; Languages: english italian spanish
 89Source: "{#BinDir}\README_DE.html"; DestDir: "{app}\"; DestName: "LIESMICH.html"; Flags: ignoreversion isreadme; Languages: german
 90Source: "{#ResDir}\shaders\*"; DestDir: "{app}\shaders\"; Flags: ignoreversion recursesubdirs
 91Source: "{#ResDir}\licenses\*"; DestDir: "{app}\licenses\"; Flags: ignoreversion recursesubdirs
 92
 93[Icons]
 94Name: "{commonstartmenu}\{#AppName}"; Filename: "{app}\{#AppName}.exe"
 95Name: "{commondesktop}\{#AppName}"; Filename: "{app}\{#AppName}.exe"; Tasks: desktopicon
 96
 97[Run]
 98Filename: "{app}\{#AppName}.exe"; Description: "{cm:LaunchProgram,{#AppName}}"; Flags: nowait postinstall skipifsilent
 99
100[Dirs]
101Name: "{app}"
102
103[CustomMessages]
104english.FileAssoc=Register file associations
105french.FileAssoc=Register file associations
106italian.FileAssoc=Register file associations
107spanish.FileAssoc=Register file associations
108german.FileAssoc=Dateierweiterungen registrieren
109
110[Registry]
111Root: HKCR; Subkey: ".gb"; ValueType: string; ValueName: ""; ValueData: "Game Boy ROM"; Flags: uninsdeletevalue; Tasks: gbfileassoc
112Root: HKCR; Subkey: ".gb\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\{#AppName}.exe,0"; Tasks: gbfileassoc
113Root: HKCR; Subkey: ".gb\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#AppName}.exe"" ""%1"""; Tasks: gbfileassoc
114Root: HKCR; Subkey: ".gbc"; ValueType: string; ValueName: ""; ValueData: "Game Boy Color ROM"; Flags: uninsdeletevalue; Tasks: gbcfileassoc
115Root: HKCR; Subkey: ".gbc\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\{#AppName}.exe,0"; Tasks: gbcfileassoc
116Root: HKCR; Subkey: ".gbc\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#AppName}.exe"" ""%1"""; Tasks: gbcfileassoc
117Root: HKCR; Subkey: ".sgb"; ValueType: string; ValueName: ""; ValueData: "Super Game Boy ROM"; Flags: uninsdeletevalue; Tasks: sgbfileassoc
118Root: HKCR; Subkey: ".sgb\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\{#AppName}.exe,0"; Tasks: sgbfileassoc
119Root: HKCR; Subkey: ".sgb\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#AppName}.exe"" ""%1"""; Tasks: sgbfileassoc
120Root: HKCR; Subkey: ".gba"; ValueType: string; ValueName: ""; ValueData: "Game Boy Advance ROM"; Flags: uninsdeletevalue; Tasks: gbafileassoc
121Root: HKCR; Subkey: ".gba\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\{#AppName}.exe,0"; Tasks: gbafileassoc
122Root: HKCR; Subkey: ".gba\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#AppName}.exe"" ""%1"""; Tasks: gbafileassoc
123
124[Code]
125var
126  noReleaseWarning: String;
127
128procedure InitializeWizard();
129  begin
130      if ExpandConstant('{#IsRelease}') = 'no' then
131        begin
132        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.';
133        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.';
134        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.';
135        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.';
136        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.';
137        MsgBox(noReleaseWarning, mbInformation, MB_OK);
138      end;
139  end;
140end.