all repos — mgba @ 3e957c7b9183212f9c7690b3f0076de2b2686065

mGBA Game Boy Advance Emulator

tools/windows/mgba-setup-win32.iss (view raw)

  1;For automation purposes it is highly recommended to copy the files from
  2;\tools\windows\ to the directory that contains the win32 distribution files!
  3
  4;Set CurrentReleaseVersion to the number of the latest stable mGBA build.
  5#define CurrentReleaseVersion = '0.6.3'
  6
  7#define VerMajor
  8#define VerMinor
  9#define VerRev
 10#define VerBuild
 11#define FullVersion=ParseVersion('mGBA.exe', VerMajor, VerMinor, VerRev, VerBuild)
 12#define AppVer = Str(VerMajor) + "." + Str(VerMinor) + "." + Str(VerRev)
 13
 14[Setup]
 15SourceDir=.\
 16SetupIconFile=mgba-setupiconfile.ico
 17WizardImageFile=mgba-wizardimagefile.bmp
 18
 19AppName=mGBA                   
 20AppVersion={#AppVer}
 21AppPublisher=Jeffrey Pfau
 22AppPublisherURL=https://mgba.io
 23AppSupportURL=https://mgba.io
 24AppUpdatesURL=https://mgba.io
 25AppReadmeFile=README.html
 26OutputDir=.\
 27DefaultDirName={pf}\mGBA
 28DefaultGroupName=mGBA
 29AllowNoIcons=yes
 30DirExistsWarning=no
 31ChangesAssociations=True
 32AppendDefaultDirName=False
 33UninstallDisplayIcon={app}\mGBA.exe
 34MinVersion=0,6.0
 35AlwaysShowDirOnReadyPage=True
 36UsePreviousSetupType=True
 37UsePreviousTasks=True
 38AlwaysShowGroupOnReadyPage=True
 39LicenseFile=LICENSE
 40#if CurrentReleaseVersion == AppVer;
 41  #define IsRelease = 'yes'
 42  AppVerName=mGBA {#AppVer}
 43  OutputBaseFilename=mGBA-{#AppVer}-win32
 44#elif CurrentReleaseVersion != AppVer;
 45  #define IsRelease = 'no'
 46  AppVerName=mGBA (Development build)
 47  OutputBaseFilename=mGBA-setup-latest-win32
 48  #endif
 49UsePreviousLanguage=False
 50DisableWelcomePage=False
 51VersionInfoDescription=mGBA is an open-source Game Boy Advance emulator
 52VersionInfoCopyright=� 2013�2018 Jeffrey Pfau
 53VersionInfoProductName=mGBA
 54VersionInfoVersion={#AppVer}
 55Compression=lzma2/ultra64
 56SolidCompression=True
 57VersionInfoTextVersion={#AppVer}
 58VersionInfoProductVersion={#AppVer}
 59VersionInfoProductTextVersion={#AppVer}
 60
 61[Languages]
 62Name: "english"; MessagesFile: "compiler:Default.isl"
 63Name: "french"; MessagesFile: "compiler:Languages\French.isl"
 64Name: "german"; MessagesFile: "compiler:Languages\German.isl"
 65Name: "italian"; MessagesFile: "compiler:Languages\Italian.isl"
 66Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl"
 67
 68[Tasks]
 69Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"
 70Name: "gbfileassoc"; Description: "{cm:AssocFileExtension,mGBA,Game Boy}"; GroupDescription: "{cm:FileAssoc}"
 71Name: "gbcfileassoc"; Description: "{cm:AssocFileExtension,mGBA,Game Boy Color}"; GroupDescription: "{cm:FileAssoc}"
 72Name: "gbafileassoc"; Description: "{cm:AssocFileExtension,mGBA,Game Boy Advance}"; GroupDescription: "{cm:FileAssoc}"
 73
 74[Files]
 75Source: "mGBA.exe"; DestDir: "{app}"; Flags: ignoreversion
 76Source: "CHANGES"; DestDir: "{app}\"; Flags: ignoreversion isreadme
 77Source: "LICENSE"; DestDir: "{app}\"; Flags: ignoreversion
 78Source: "nointro.dat"; DestDir: "{app}\"; Flags: ignoreversion
 79Source: "README.html"; DestDir: "{app}\"; Flags: ignoreversion isreadme; Languages: english italian spanish
 80Source: "README_DE.html"; DestDir: "{app}\"; DestName: "LIESMICH.html"; Flags: ignoreversion isreadme; Languages: german                        
 81Source: "shaders\*"; DestDir: "{app}\shaders\"; Flags: ignoreversion recursesubdirs
 82Source: "licenses\*"; DestDir: "{app}\licenses\"; Flags: ignoreversion recursesubdirs
 83
 84[Icons]
 85Name: "{commonstartmenu}\mGBA"; Filename: "{app}\mGBA.exe"
 86Name: "{commondesktop}\mGBA"; Filename: "{app}\mGBA.exe"; Tasks: desktopicon
 87
 88[Run]
 89Filename: "{app}\mGBA.exe"; Description: "{cm:LaunchProgram,mGBA}"; Flags: nowait postinstall skipifsilent
 90
 91[Dirs]
 92Name: "{app}"
 93
 94[CustomMessages]
 95english.FileAssoc=Register file associations
 96french.FileAssoc=Register file associations
 97italian.FileAssoc=Register file associations
 98spanish.FileAssoc=Register file associations
 99german.FileAssoc=Dateierweiterungen registrieren
100
101[Registry]
102Root: HKCR; Subkey: ".gb"; ValueType: string; ValueName: ""; ValueData: "Game Boy ROM"; Flags: uninsdeletevalue; Tasks: gbfileassoc
103Root: HKCR; Subkey: ".gb\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\mGBA.exe,0"; Tasks: gbfileassoc
104Root: HKCR; Subkey: ".gb\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\mGBA.exe"" ""%1"""; Tasks: gbfileassoc
105Root: HKCR; Subkey: ".gbc"; ValueType: string; ValueName: ""; ValueData: "Game Boy Color ROM"; Flags: uninsdeletevalue; Tasks: gbcfileassoc
106Root: HKCR; Subkey: ".gbc\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\mGBA.exe,0"; Tasks: gbcfileassoc
107Root: HKCR; Subkey: ".gbc\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\mGBA.exe"" ""%1"""; Tasks: gbcfileassoc
108Root: HKCR; Subkey: ".gba"; ValueType: string; ValueName: ""; ValueData: "Game Boy Advance ROM"; Flags: uninsdeletevalue; Tasks: gbafileassoc
109Root: HKCR; Subkey: ".gba\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\mGBA.exe,0"; Tasks: gbafileassoc
110Root: HKCR; Subkey: ".gba\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\mGBA.exe"" ""%1"""; Tasks: gbafileassoc
111
112[Code]
113var 
114  noReleaseWarning: String;
115
116procedure InitializeWizard();
117  begin
118      if ExpandConstant('{#IsRelease}') = 'no' then
119        begin
120        if ExpandConstant('{language}') = 'english' then noReleaseWarning := 'You are about to install a development build of mGBA.' + #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.';
121        if ExpandConstant('{language}') = 'french' then noReleaseWarning := 'You are about to install a development build of mGBA.' + #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.';
122        if ExpandConstant('{language}') = 'italian' then noReleaseWarning := 'You are about to install a development build of mGBA.' + #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.';
123        if ExpandConstant('{language}') = 'spanish' then noReleaseWarning := 'You are about to install a development build of mGBA.' + #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.';
124        if ExpandConstant('{language}') = 'german' then noReleaseWarning := 'Sie m�chten eine Entwicklerversion von mGBA 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.';
125        MsgBox(noReleaseWarning, mbInformation, MB_OK);
126      end;
127  end;
128end.