[Web] Update Installer

[Web] Update Installer

[Setup]
AppName=OpenSiv3D(0.6.0) for Web
AppVersion=0.6.0b4
WizardStyle=modern
SetupIconFile=..\..\WindowsDesktop\App\icon.ico
OutputBaseFilename=OpenSiv3D(0.6.0)Web
DefaultDirName={autopf}\OpenSiv3D(0.6.0)Web
VersionInfoVersion=0.6.0.4
VersionInfoDescription=OpenSiv3D (0.6.0) for Web Installer
Compression=lzma2
SolidCompression=yes
ChangesEnvironment=yes
PrivilegesRequired=lowest
OutputDir=userdocs:Inno Setup Examples Output

[Languages]
Name: "en"; MessagesFile: "compiler:Default.isl"
Name: "ja"; MessagesFile: "compiler:Languages\Japanese.isl"

[Files]
Source: "..\..\Siv3D\include\*"; DestDir: "{app}\include"; Flags: recursesubdirs
Source: "..\Build\libSiv3D.a"; DestDir: "{app}\lib"
Source: "..\Build\libSiv3DScript.a"; DestDir: "{app}\lib"
Source: "..\Siv3D.js"; DestDir: "{app}\lib"
Source: "..\Siv3D.pre.js"; DestDir: "{app}\lib"
Source: "..\Siv3D.post.js"; DestDir: "{app}\lib"
Source: "..\..\Siv3D\lib\Web\wasm\*"; DestDir: "{app}\lib"; Flags: recursesubdirs
Source: "..\App\resources\*"; DestDir: "{app}\resources"; Flags: recursesubdirs
Source: "..\App\example\*"; DestDir: "{app}\example"; Flags: recursesubdirs
Source: "..\VisualStudioTemplate\OpenSiv3D(0.6.0)Web.zip"; DestDir: "{%USERPROFILE|{app}}\Documents\Visual Studio 2017\Templates\ProjectTemplates"
Source: "..\VisualStudioTemplate\OpenSiv3D(0.6.0)Web.zip"; DestDir: "{%USERPROFILE|{app}}\Documents\Visual Studio 2019\Templates\ProjectTemplates"

[Registry]
Root: HKCU; Subkey: "Environment"; ValueType:string; ValueName: "SIV3D_0_6_0_WEB"; \
    ValueData: "{app}"; Flags: preservestringtype

[Setup]
AppName=OpenSiv3D(0.6.0) for Web
AppVersion=0.6.0b4
WizardStyle=modern
SetupIconFile=..\..\WindowsDesktop\App\icon.ico
OutputBaseFilename=OpenSiv3D(0.6.0)Web
DefaultDirName={autopf}\OpenSiv3D(0.6.0)Web
VersionInfoVersion=0.6.0.4
VersionInfoDescription=OpenSiv3D (0.6.0) for Web Installer
Compression=lzma2
SolidCompression=yes
ChangesEnvironment=yes
PrivilegesRequired=lowest
OutputDir=userdocs:Inno Setup Examples Output

[Languages]
Name: "en"; MessagesFile: "compiler:Default.isl"
Name: "ja"; MessagesFile: "compiler:Languages\Japanese.isl"

[Files]
Source: "..\..\Siv3D\include\*"; DestDir: "{app}\include"; Flags: recursesubdirs
Source: "..\Build\libSiv3D.a"; DestDir: "{app}\lib"
Source: "..\Build\libSiv3DScript.a"; DestDir: "{app}\lib"
Source: "..\Siv3D.js"; DestDir: "{app}\lib"
Source: "..\Siv3D.pre.js"; DestDir: "{app}\lib"
Source: "..\..\Siv3D\lib\Web\wasm\*"; DestDir: "{app}\lib"; Flags: recursesubdirs
Source: "..\App\resources\*"; DestDir: "{app}\resources"; Flags: recursesubdirs
Source: "..\App\example\*"; DestDir: "{app}\example"; Flags: recursesubdirs
Source: "..\VisualStudioTemplate\OpenSiv3D(0.6.0)Web.zip"; DestDir: "{%USERPROFILE|{app}}\Documents\Visual Studio 2017\Templates\ProjectTemplates"
Source: "..\VisualStudioTemplate\OpenSiv3D(0.6.0)Web.zip"; DestDir: "{%USERPROFILE|{app}}\Documents\Visual Studio 2019\Templates\ProjectTemplates"

[Registry]
Root: HKCU; Subkey: "Environment"; ValueType:string; ValueName: "SIV3D_0_6_0_WEB"; \
    ValueData: "{app}"; Flags: preservestringtype


updates to innosetup script

updates to innosetup script

* support installation of both x64 and x86 binaries
* add readme
* add function to convert line endings. The README.md file currently has
  Windows line endings, but if that ever changes this function will
  automatically make the file "Windows friendly".

#define I2Pd_AppName "i2pd"
#define I2Pd_ver "0.2"

[Setup]
AppName={#I2Pd_AppName}
AppVersion={#I2Pd_ver}
DefaultDirName={pf}\I2Pd
DefaultGroupName=I2Pd
UninstallDisplayIcon={app}\I2Pd.exe
Compression=lzma2
SolidCompression=yes
OutputDir=.
LicenseFile=.\..\LICENSE
OutputBaseFilename=setup_{#I2Pd_AppName}_v{#I2Pd_ver}
ArchitecturesInstallIn64BitMode=x64

[Files]
Source: "x64\Release\i2pd.exe"; DestDir: "{app}"; DestName: "i2pd.exe"; Check: Is64BitInstallMode
Source: "Release\i2pd.exe"; DestDir: "{app}"; Check: not Is64BitInstallMode
Source: "..\README.md"; DestDir: "{app}"; DestName: "Readme.txt"; AfterInstall: ConvertLineEndings

[Icons]
Name: "{group}\I2Pd"; Filename: "{app}\i2pd.exe"
Name: "{group}\Readme"; Filename: "{app}\Readme.txt"

[Code]

var
  DefaultTop,
  DefaultLeft,
  DefaultHeight,
  DefaultBackTop,
  DefaultNextTop,
  DefaultCancelTop,
  DefaultBevelTop,
  DefaultOuterHeight: Integer;

const
  LicenseHeight = 400;
   LF = #10;
   CR = #13;
   CRLF = CR + LF;

procedure ConvertLineEndings();
  var
     FilePath : String;
     FileContents : String;
begin
   FilePath := ExpandConstant(CurrentFileName)
   LoadStringFromFile(FilePath, FileContents);
   StringChangeEx(FileContents, LF, CRLF, False);
   SaveStringToFile(FilePath, FileContents, False);
end;

procedure InitializeWizard();
begin
  DefaultTop := WizardForm.Top;
  DefaultLeft := WizardForm.Left;
  DefaultHeight := WizardForm.Height;
  DefaultBackTop := WizardForm.BackButton.Top;
  DefaultNextTop := WizardForm.NextButton.Top;
  DefaultCancelTop := WizardForm.CancelButton.Top;
  DefaultBevelTop := WizardForm.Bevel.Top;
  DefaultOuterHeight := WizardForm.OuterNotebook.Height;

  WizardForm.InnerPage.Height := WizardForm.InnerPage.Height + (LicenseHeight - DefaultHeight);
  WizardForm.InnerNotebook.Height :=  WizardForm.InnerNotebook.Height + (LicenseHeight - DefaultHeight);
  WizardForm.LicensePage.Height := WizardForm.LicensePage.Height + (LicenseHeight - DefaultHeight);
  WizardForm.LicenseMemo.Height := WizardForm.LicenseMemo.Height + (LicenseHeight - DefaultHeight);
  WizardForm.LicenseNotAcceptedRadio.Top := WizardForm.LicenseNotAcceptedRadio.Top + (LicenseHeight - DefaultHeight);
  WizardForm.LicenseAcceptedRadio.Top := WizardForm.LicenseAcceptedRadio.Top + (LicenseHeight - DefaultHeight);

end;

procedure CurPageChanged(CurPageID: Integer);
begin
  if CurPageID = wpLicense then
  begin
    WizardForm.Top := DefaultTop - (LicenseHeight - DefaultHeight) div 2;
    WizardForm.Height := LicenseHeight;
    WizardForm.OuterNotebook.Height := WizardForm.OuterNotebook.Height + (LicenseHeight - DefaultHeight);
    WizardForm.CancelButton.Top := DefaultCancelTop + (LicenseHeight - DefaultHeight);
    WizardForm.NextButton.Top := DefaultNextTop + (LicenseHeight - DefaultHeight);
    WizardForm.BackButton.Top := DefaultBackTop + (LicenseHeight - DefaultHeight);
    WizardForm.Bevel.Top := DefaultBevelTop + (LicenseHeight - DefaultHeight);
  end
  else
  begin
    WizardForm.Top := DefaultTop;
    WizardForm.Left := DefaultLeft;
    WizardForm.Height := DefaultHeight;
    WizardForm.OuterNotebook.Height := DefaultOuterHeight;
    WizardForm.CancelButton.Top := DefaultCancelTop;
    WizardForm.NextButton.Top := DefaultNextTop;
    WizardForm.BackButton.Top := DefaultBackTop;
    WizardForm.Bevel.Top := DefaultBevelTop;
  end;
end;

#define I2Pd_AppName "i2pd"
#define I2Pd_ver "0.1"

[Setup]
AppName={#I2Pd_AppName}
AppVersion={#I2Pd_ver}
DefaultDirName={pf}\I2Pd
DefaultGroupName=I2Pd
UninstallDisplayIcon={app}\I2Pd.exe
Compression=lzma2
SolidCompression=yes
OutputDir=.
LicenseFile=.\..\LICENSE
OutputBaseFilename=setup_{#I2Pd_AppName}_v{#I2Pd_ver}

[Files]
Source: "i2pd.exe"; DestDir: "{app}"

[Icons]
Name: "{group}\I2Pd"; Filename: "{app}\i2pd.exe"

[Code]

var
  DefaultTop,
  DefaultLeft,
  DefaultHeight,
  DefaultBackTop,
  DefaultNextTop,
  DefaultCancelTop,
  DefaultBevelTop,
  DefaultOuterHeight: Integer;

const
  LicenseHeight = 400;

procedure InitializeWizard();
begin
  DefaultTop := WizardForm.Top;
  DefaultLeft := WizardForm.Left;
  DefaultHeight := WizardForm.Height;
  DefaultBackTop := WizardForm.BackButton.Top;
  DefaultNextTop := WizardForm.NextButton.Top;
  DefaultCancelTop := WizardForm.CancelButton.Top;
  DefaultBevelTop := WizardForm.Bevel.Top;
  DefaultOuterHeight := WizardForm.OuterNotebook.Height;

  WizardForm.InnerPage.Height := WizardForm.InnerPage.Height + (LicenseHeight - DefaultHeight);
  WizardForm.InnerNotebook.Height :=  WizardForm.InnerNotebook.Height + (LicenseHeight - DefaultHeight);
  WizardForm.LicensePage.Height := WizardForm.LicensePage.Height + (LicenseHeight - DefaultHeight);
  WizardForm.LicenseMemo.Height := WizardForm.LicenseMemo.Height + (LicenseHeight - DefaultHeight);
  WizardForm.LicenseNotAcceptedRadio.Top := WizardForm.LicenseNotAcceptedRadio.Top + (LicenseHeight - DefaultHeight);
  WizardForm.LicenseAcceptedRadio.Top := WizardForm.LicenseAcceptedRadio.Top + (LicenseHeight - DefaultHeight);

end;

procedure CurPageChanged(CurPageID: Integer);
begin
  if CurPageID = wpLicense then
  begin
    WizardForm.Top := DefaultTop - (LicenseHeight - DefaultHeight) div 2;
    WizardForm.Height := LicenseHeight;
    WizardForm.OuterNotebook.Height := WizardForm.OuterNotebook.Height + (LicenseHeight - DefaultHeight);
    WizardForm.CancelButton.Top := DefaultCancelTop + (LicenseHeight - DefaultHeight);
    WizardForm.NextButton.Top := DefaultNextTop + (LicenseHeight - DefaultHeight);
    WizardForm.BackButton.Top := DefaultBackTop + (LicenseHeight - DefaultHeight);
    WizardForm.Bevel.Top := DefaultBevelTop + (LicenseHeight - DefaultHeight);
  end
  else
  begin
    WizardForm.Top := DefaultTop;
    WizardForm.Left := DefaultLeft;
    WizardForm.Height := DefaultHeight;
    WizardForm.OuterNotebook.Height := DefaultOuterHeight;
    WizardForm.CancelButton.Top := DefaultCancelTop;
    WizardForm.NextButton.Top := DefaultNextTop;
    WizardForm.BackButton.Top := DefaultBackTop;
    WizardForm.Bevel.Top := DefaultBevelTop;
  end;
end;


Win32: Add German README file to the installer script

;For automation purposes it is highly recommended to copy the files from
;\tools\windows\ to the directory that contains the win32 distribution files!

;Set CurrentReleaseVersion to the number of the latest stable mGBA build.
#define CurrentReleaseVersion = '0.6.1'

#define VerMajor
#define VerMinor
#define VerRev
#define VerBuild
#define FullVersion=ParseVersion('mGBA.exe', VerMajor, VerMinor, VerRev, VerBuild)
#define AppVer = Str(VerMajor) + "." + Str(VerMinor) + "." + Str(VerRev)

[Setup]
SourceDir=.\
SetupIconFile=mgba-setupiconfile.ico
WizardImageFile=mgba-wizardimagefile.bmp

AppName=mGBA
AppVersion={#AppVer}
AppPublisher=Jeffrey Pfau
AppPublisherURL=https://mgba.io
AppSupportURL=https://mgba.io
AppUpdatesURL=https://mgba.io
AppReadmeFile=README.html
OutputDir=.\
DefaultDirName={pf}\mGBA
DefaultGroupName=mGBA
AllowNoIcons=yes
DirExistsWarning=no
ChangesAssociations=True
AppendDefaultDirName=False
UninstallDisplayIcon={app}\mGBA.exe
MinVersion=0,6.0
AlwaysShowDirOnReadyPage=True
UsePreviousSetupType=True
UsePreviousTasks=True
AlwaysShowGroupOnReadyPage=True
LicenseFile=LICENSE.txt
#if CurrentReleaseVersion == AppVer;
  #define IsRelease = 'yes'
  AppVerName=mGBA {#AppVer}
  OutputBaseFilename=mGBA-{#AppVer}-win32
#elif CurrentReleaseVersion != AppVer;
  #define IsRelease = 'no'
  AppVerName=mGBA (Development build)
  OutputBaseFilename=mGBA-setup-latest-win32
  #endif
UsePreviousLanguage=False
DisableWelcomePage=False
VersionInfoDescription=mGBA is an open-source Game Boy Advance emulator
VersionInfoCopyright= 20132017 Jeffrey Pfau
VersionInfoProductName=mGBA
VersionInfoVersion={#AppVer}
Compression=lzma2/ultra64
SolidCompression=True
VersionInfoTextVersion={#AppVer}
VersionInfoProductVersion={#AppVer}
VersionInfoProductTextVersion={#AppVer}

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "german"; MessagesFile: "compiler:Languages\German.isl"
Name: "italian"; MessagesFile: "compiler:Languages\Italian.isl"
Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"
Name: "gbfileassoc"; Description: "{cm:AssocFileExtension,mGBA,Game Boy}"; GroupDescription: "{cm:FileAssoc}"
Name: "gbcfileassoc"; Description: "{cm:AssocFileExtension,mGBA,Game Boy Color}"; GroupDescription: "{cm:FileAssoc}"
Name: "gbafileassoc"; Description: "{cm:AssocFileExtension,mGBA,Game Boy Advance}"; GroupDescription: "{cm:FileAssoc}"

[Files]
Source: "mGBA.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "CHANGES.txt"; DestDir: "{app}\"; Flags: ignoreversion
Source: "LICENSE.txt"; DestDir: "{app}\"; Flags: ignoreversion
Source: "mGBA.exe"; DestDir: "{app}\"; Flags: ignoreversion
Source: "nointro.dat"; DestDir: "{app}\"; Flags: ignoreversion
Source: "README.html"; DestDir: "{app}\"; Flags: ignoreversion
Source: "README_DE.html"; DestDir: "{app}\"; DestName: "LIESMICH.html"; Flags: ignoreversion isreadme; Languages: german
Source: "shaders\agb001.shader\agb001.fs"; DestDir: "{app}\shaders\agb001.shader\"; Flags: ignoreversion
Source: "shaders\agb001.shader\manifest.ini"; DestDir: "{app}\shaders\agb001.shader\"; Flags: ignoreversion
Source: "shaders\ags001.shader\ags001-light.fs"; DestDir: "{app}\shaders\ags001.shader\"; Flags: ignoreversion
Source: "shaders\ags001.shader\ags001.fs"; DestDir: "{app}\shaders\ags001.shader\"; Flags: ignoreversion
Source: "shaders\ags001.shader\manifest.ini"; DestDir: "{app}\shaders\ags001.shader\"; Flags: ignoreversion
Source: "shaders\fish.shader\fish.fs"; DestDir: "{app}\shaders\fish.shader\"; Flags: ignoreversion
Source: "shaders\fish.shader\manifest.ini"; DestDir: "{app}\shaders\fish.shader\"; Flags: ignoreversion
Source: "shaders\gba-color.shader\gba-color.fs"; DestDir: "{app}\shaders\gba-color.shader\"; Flags: ignoreversion
Source: "shaders\gba-color.shader\manifest.ini"; DestDir: "{app}\shaders\gba-color.shader\"; Flags: ignoreversion
Source: "shaders\lcd.shader\lcd.fs"; DestDir: "{app}\shaders\lcd.shader\"; Flags: ignoreversion
Source: "shaders\lcd.shader\manifest.ini"; DestDir: "{app}\shaders\lcd.shader\"; Flags: ignoreversion
Source: "shaders\motion_blur.shader\manifest.ini"; DestDir: "{app}\shaders\motion_blur.shader\"; Flags: ignoreversion
Source: "shaders\motion_blur.shader\motion_blur.fs"; DestDir: "{app}\shaders\motion_blur.shader\"; Flags: ignoreversion
Source: "shaders\pixelate.shader\manifest.ini"; DestDir: "{app}\shaders\pixelate.shader\"; Flags: ignoreversion
Source: "shaders\scanlines.shader\manifest.ini"; DestDir: "{app}\shaders\scanlines.shader\"; Flags: ignoreversion
Source: "shaders\scanlines.shader\scanlines.fs"; DestDir: "{app}\shaders\scanlines.shader\"; Flags: ignoreversion
Source: "shaders\soften.shader\manifest.ini"; DestDir: "{app}\shaders\soften.shader\"; Flags: ignoreversion
Source: "shaders\soften.shader\soften.fs"; DestDir: "{app}\shaders\soften.shader\"; Flags: ignoreversion
Source: "shaders\vba_pixelate.shader\manifest.ini"; DestDir: "{app}\shaders\vba_pixelate.shader\"; Flags: ignoreversion
Source: "shaders\vba_pixelate.shader\vba_pixelate.fs"; DestDir: "{app}\shaders\vba_pixelate.shader\"; Flags: ignoreversion
Source: "shaders\vignette.shader\manifest.ini"; DestDir: "{app}\shaders\vignette.shader\"; Flags: ignoreversion
Source: "shaders\vignette.shader\vignette.fs"; DestDir: "{app}\shaders\vignette.shader\"; Flags: ignoreversion
Source: "shaders\wiiu.shader\manifest.ini"; DestDir: "{app}\shaders\wiiu.shader\"; Flags: ignoreversion
Source: "shaders\wiiu.shader\wiiu.fs"; DestDir: "{app}\shaders\wiiu.shader\"; Flags: ignoreversion
Source: "shaders\xbr-lv2.shader\manifest.ini"; DestDir: "{app}\shaders\xbr-lv2.shader\"; Flags: ignoreversion
Source: "shaders\xbr-lv2.shader\xbr.fs"; DestDir: "{app}\shaders\xbr-lv2.shader\"; Flags: ignoreversion
Source: "shaders\xbr-lv2.shader\xbr.vs"; DestDir: "{app}\shaders\xbr-lv2.shader\"; Flags: ignoreversion
Source: "shaders\xbr-lv3.shader\manifest.ini"; DestDir: "{app}\shaders\xbr-lv3.shader\"; Flags: ignoreversion
Source: "shaders\xbr-lv3.shader\xbr.fs"; DestDir: "{app}\shaders\xbr-lv3.shader\"; Flags: ignoreversion
Source: "shaders\xbr-lv3.shader\xbr.vs"; DestDir: "{app}\shaders\xbr-lv3.shader\"; Flags: ignoreversion
Source: "third-party\LICENSE.blip-buf"; DestDir: "{app}\third-party\"; Flags: ignoreversion
Source: "third-party\LICENSE.ffmpeg"; DestDir: "{app}\third-party\"; Flags: ignoreversion
Source: "third-party\LICENSE.imagemagick"; DestDir: "{app}\third-party\"; Flags: ignoreversion
Source: "third-party\LICENSE.inih"; DestDir: "{app}\third-party\"; Flags: ignoreversion
Source: "third-party\LICENSE.lame"; DestDir: "{app}\third-party\"; Flags: ignoreversion
Source: "third-party\LICENSE.libvpx"; DestDir: "{app}\third-party\"; Flags: ignoreversion
Source: "third-party\LICENSE.opus"; DestDir: "{app}\third-party\"; Flags: ignoreversion
Source: "third-party\LICENSE.qt5"; DestDir: "{app}\third-party\"; Flags: ignoreversion
Source: "third-party\LICENSE.sdl2"; DestDir: "{app}\third-party\"; Flags: ignoreversion
Source: "third-party\LICENSE.x264"; DestDir: "{app}\third-party\"; Flags: ignoreversion
Source: "third-party\LICENSE.xvid"; DestDir: "{app}\third-party\"; Flags: ignoreversion

[Icons]
Name: "{commonstartmenu}\mGBA"; Filename: "{app}\mGBA.exe"
Name: "{commondesktop}\mGBA"; Filename: "{app}\mGBA.exe"; Tasks: desktopicon

[Run]
Filename: "{app}\mGBA.exe"; Description: "{cm:LaunchProgram,mGBA}"; Flags: nowait postinstall skipifsilent
Filename: "{app}\README.html"; Description: "View README"; Flags: nowait postinstall skipifsilent unchecked; Languages: english
Filename: "{app}\README.html"; Description: "View README"; Flags: nowait postinstall skipifsilent unchecked; Languages: italian
Filename: "{app}\README.html"; Description: "View README"; Flags: nowait postinstall skipifsilent unchecked; Languages: spanish
Filename: "{app}\README_DE.html"; Description: "README anzeigen"; Flags: nowait postinstall skipifsilent unchecked; Languages: german
Filename: "{app}\CHANGES.txt"; Description: "View Changelog"; Flags: nowait postinstall skipifsilent unchecked; Languages: english
Filename: "{app}\CHANGES.txt"; Description: "View Changelog"; Flags: nowait postinstall skipifsilent unchecked; Languages: italian
Filename: "{app}\CHANGES.txt"; Description: "View Changelog"; Flags: nowait postinstall skipifsilent unchecked; Languages: spanish
Filename: "{app}\CHANGES.txt"; Description: "Changelog anzeigen"; Flags: nowait postinstall skipifsilent unchecked; Languages: german

[Dirs]
Name: "{app}\shaders\"
Name: "{app}\shaders\agb001.shader\"
Name: "{app}\shaders\ags001.shader\"
Name: "{app}\shaders\fish.shader\"
Name: "{app}\shaders\gba-color.shader\"
Name: "{app}\shaders\lcd.shader\"
Name: "{app}\shaders\motion_blur.shader\"
Name: "{app}\shaders\pixelate.shader\"
Name: "{app}\shaders\scanlines.shader\"
Name: "{app}\shaders\soften.shader\"
Name: "{app}\shaders\vba_pixelate.shader\"
Name: "{app}\shaders\vignette.shader\"
Name: "{app}\shaders\wiiu.shader\"
Name: "{app}\shaders\xbr-lv2.shader\"
Name: "{app}\shaders\xbr-lv3.shader\"
Name: "{app}\third-party\"

[CustomMessages]
english.FileAssoc=Register file associations
italian.FileAssoc=Register file associations
spanish.FileAssoc=Register file associations
german.FileAssoc=Dateierweiterungen registrieren

[Registry]
Root: HKCR; Subkey: ".gb"; ValueType: string; ValueName: ""; ValueData: "Game Boy ROM"; Flags: uninsdeletevalue; Tasks: gbfileassoc
Root: HKCR; Subkey: ".gb\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\mGBA.exe,0"; Tasks: gbfileassoc
Root: HKCR; Subkey: ".gb\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\mGBA.exe"" ""%1"""; Tasks: gbfileassoc
Root: HKCR; Subkey: ".gbc"; ValueType: string; ValueName: ""; ValueData: "Game Boy Color ROM"; Flags: uninsdeletevalue; Tasks: gbcfileassoc
Root: HKCR; Subkey: ".gbc\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\mGBA.exe,0"; Tasks: gbcfileassoc
Root: HKCR; Subkey: ".gbc\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\mGBA.exe"" ""%1"""; Tasks: gbcfileassoc
Root: HKCR; Subkey: ".gba"; ValueType: string; ValueName: ""; ValueData: "Game Boy Advance ROM"; Flags: uninsdeletevalue; Tasks: gbafileassoc
Root: HKCR; Subkey: ".gba\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\mGBA.exe,0"; Tasks: gbafileassoc
Root: HKCR; Subkey: ".gba\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\mGBA.exe"" ""%1"""; Tasks: gbafileassoc

[Code]
var
  noReleaseWarning: String;

procedure InitializeWizard();
  begin
      if ExpandConstant('{#IsRelease}') = 'no' then
        begin
        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.';
        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.';
        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.';
        if ExpandConstant('{language}') = 'german' then noReleaseWarning := 'Sie mchten eine Entwicklerversion von mGBA installieren.' + #13#10#13#10 + 'Entwicklerversionen knnen bislang noch nicht endeckte Fehler beinhalten. Bitte melden Sie alle Fehler, die Sie finden knnen, auf der GitHub-Projektseite.';
        MsgBox(noReleaseWarning, mbInformation, MB_OK);
      end;
  end;
end.

;For automation purposes it is highly recommended to copy the files from
;\tools\windows\ to the directory that contains the win32 distribution files!

;Set CurrentReleaseVersion to the number of the latest stable mGBA build.
#define CurrentReleaseVersion = '0.6.1'

#define VerMajor
#define VerMinor
#define VerRev
#define VerBuild
#define FullVersion=ParseVersion('mGBA.exe', VerMajor, VerMinor, VerRev, VerBuild)
#define AppVer = Str(VerMajor) + "." + Str(VerMinor) + "." + Str(VerRev)

[Setup]
SourceDir=.\
SetupIconFile=mgba-setupiconfile.ico
WizardImageFile=mgba-wizardimagefile.bmp

AppName=mGBA
AppVersion={#AppVer}
AppPublisher=Jeffrey Pfau
AppPublisherURL=https://mgba.io
AppSupportURL=https://mgba.io
AppUpdatesURL=https://mgba.io
AppReadmeFile=README.html
OutputDir=.\
DefaultDirName={pf}\mGBA
DefaultGroupName=mGBA
AllowNoIcons=yes
DirExistsWarning=no
ChangesAssociations=True
AppendDefaultDirName=False
UninstallDisplayIcon={app}\mGBA.exe
MinVersion=0,6.0
AlwaysShowDirOnReadyPage=True
UsePreviousSetupType=True
UsePreviousTasks=True
AlwaysShowGroupOnReadyPage=True
LicenseFile=LICENSE.txt
#if CurrentReleaseVersion == AppVer;
  #define IsRelease = 'yes'
  AppVerName=mGBA {#AppVer}
  OutputBaseFilename=mGBA-{#AppVer}-win32
#elif CurrentReleaseVersion != AppVer;
  #define IsRelease = 'no'
  AppVerName=mGBA (Development build)
  OutputBaseFilename=mGBA-setup-latest-win32
  #endif
UsePreviousLanguage=False
DisableWelcomePage=False
VersionInfoDescription=mGBA is an open-source Game Boy Advance emulator
VersionInfoCopyright= 20132017 Jeffrey Pfau
VersionInfoProductName=mGBA
VersionInfoVersion={#AppVer}
Compression=lzma2/ultra64
SolidCompression=True
VersionInfoTextVersion={#AppVer}
VersionInfoProductVersion={#AppVer}
VersionInfoProductTextVersion={#AppVer}

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "german"; MessagesFile: "compiler:Languages\German.isl"
Name: "italian"; MessagesFile: "compiler:Languages\Italian.isl"
Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"
Name: "gbfileassoc"; Description: "{cm:AssocFileExtension,mGBA,Game Boy}"; GroupDescription: "{cm:FileAssoc}"
Name: "gbcfileassoc"; Description: "{cm:AssocFileExtension,mGBA,Game Boy Color}"; GroupDescription: "{cm:FileAssoc}"
Name: "gbafileassoc"; Description: "{cm:AssocFileExtension,mGBA,Game Boy Advance}"; GroupDescription: "{cm:FileAssoc}"

[Files]
Source: "mGBA.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "CHANGES.txt"; DestDir: "{app}\"; Flags: ignoreversion
Source: "LICENSE.txt"; DestDir: "{app}\"; Flags: ignoreversion
Source: "mGBA.exe"; DestDir: "{app}\"; Flags: ignoreversion
Source: "nointro.dat"; DestDir: "{app}\"; Flags: ignoreversion
Source: "README.html"; DestDir: "{app}\"; Flags: ignoreversion
Source: "shaders\agb001.shader\agb001.fs"; DestDir: "{app}\shaders\agb001.shader\"; Flags: ignoreversion
Source: "shaders\agb001.shader\manifest.ini"; DestDir: "{app}\shaders\agb001.shader\"; Flags: ignoreversion
Source: "shaders\ags001.shader\ags001-light.fs"; DestDir: "{app}\shaders\ags001.shader\"; Flags: ignoreversion
Source: "shaders\ags001.shader\ags001.fs"; DestDir: "{app}\shaders\ags001.shader\"; Flags: ignoreversion
Source: "shaders\ags001.shader\manifest.ini"; DestDir: "{app}\shaders\ags001.shader\"; Flags: ignoreversion
Source: "shaders\fish.shader\fish.fs"; DestDir: "{app}\shaders\fish.shader\"; Flags: ignoreversion
Source: "shaders\fish.shader\manifest.ini"; DestDir: "{app}\shaders\fish.shader\"; Flags: ignoreversion
Source: "shaders\gba-color.shader\gba-color.fs"; DestDir: "{app}\shaders\gba-color.shader\"; Flags: ignoreversion
Source: "shaders\gba-color.shader\manifest.ini"; DestDir: "{app}\shaders\gba-color.shader\"; Flags: ignoreversion
Source: "shaders\lcd.shader\lcd.fs"; DestDir: "{app}\shaders\lcd.shader\"; Flags: ignoreversion
Source: "shaders\lcd.shader\manifest.ini"; DestDir: "{app}\shaders\lcd.shader\"; Flags: ignoreversion
Source: "shaders\motion_blur.shader\manifest.ini"; DestDir: "{app}\shaders\motion_blur.shader\"; Flags: ignoreversion
Source: "shaders\motion_blur.shader\motion_blur.fs"; DestDir: "{app}\shaders\motion_blur.shader\"; Flags: ignoreversion
Source: "shaders\pixelate.shader\manifest.ini"; DestDir: "{app}\shaders\pixelate.shader\"; Flags: ignoreversion
Source: "shaders\scanlines.shader\manifest.ini"; DestDir: "{app}\shaders\scanlines.shader\"; Flags: ignoreversion
Source: "shaders\scanlines.shader\scanlines.fs"; DestDir: "{app}\shaders\scanlines.shader\"; Flags: ignoreversion
Source: "shaders\soften.shader\manifest.ini"; DestDir: "{app}\shaders\soften.shader\"; Flags: ignoreversion
Source: "shaders\soften.shader\soften.fs"; DestDir: "{app}\shaders\soften.shader\"; Flags: ignoreversion
Source: "shaders\vba_pixelate.shader\manifest.ini"; DestDir: "{app}\shaders\vba_pixelate.shader\"; Flags: ignoreversion
Source: "shaders\vba_pixelate.shader\vba_pixelate.fs"; DestDir: "{app}\shaders\vba_pixelate.shader\"; Flags: ignoreversion
Source: "shaders\vignette.shader\manifest.ini"; DestDir: "{app}\shaders\vignette.shader\"; Flags: ignoreversion
Source: "shaders\vignette.shader\vignette.fs"; DestDir: "{app}\shaders\vignette.shader\"; Flags: ignoreversion
Source: "shaders\wiiu.shader\manifest.ini"; DestDir: "{app}\shaders\wiiu.shader\"; Flags: ignoreversion
Source: "shaders\wiiu.shader\wiiu.fs"; DestDir: "{app}\shaders\wiiu.shader\"; Flags: ignoreversion
Source: "shaders\xbr-lv2.shader\manifest.ini"; DestDir: "{app}\shaders\xbr-lv2.shader\"; Flags: ignoreversion
Source: "shaders\xbr-lv2.shader\xbr.fs"; DestDir: "{app}\shaders\xbr-lv2.shader\"; Flags: ignoreversion
Source: "shaders\xbr-lv2.shader\xbr.vs"; DestDir: "{app}\shaders\xbr-lv2.shader\"; Flags: ignoreversion
Source: "shaders\xbr-lv3.shader\manifest.ini"; DestDir: "{app}\shaders\xbr-lv3.shader\"; Flags: ignoreversion
Source: "shaders\xbr-lv3.shader\xbr.fs"; DestDir: "{app}\shaders\xbr-lv3.shader\"; Flags: ignoreversion
Source: "shaders\xbr-lv3.shader\xbr.vs"; DestDir: "{app}\shaders\xbr-lv3.shader\"; Flags: ignoreversion
Source: "third-party\LICENSE.blip-buf"; DestDir: "{app}\third-party\"; Flags: ignoreversion
Source: "third-party\LICENSE.ffmpeg"; DestDir: "{app}\third-party\"; Flags: ignoreversion
Source: "third-party\LICENSE.imagemagick"; DestDir: "{app}\third-party\"; Flags: ignoreversion
Source: "third-party\LICENSE.inih"; DestDir: "{app}\third-party\"; Flags: ignoreversion
Source: "third-party\LICENSE.lame"; DestDir: "{app}\third-party\"; Flags: ignoreversion
Source: "third-party\LICENSE.libvpx"; DestDir: "{app}\third-party\"; Flags: ignoreversion
Source: "third-party\LICENSE.opus"; DestDir: "{app}\third-party\"; Flags: ignoreversion
Source: "third-party\LICENSE.qt5"; DestDir: "{app}\third-party\"; Flags: ignoreversion
Source: "third-party\LICENSE.sdl2"; DestDir: "{app}\third-party\"; Flags: ignoreversion
Source: "third-party\LICENSE.x264"; DestDir: "{app}\third-party\"; Flags: ignoreversion
Source: "third-party\LICENSE.xvid"; DestDir: "{app}\third-party\"; Flags: ignoreversion

[Icons]
Name: "{commonstartmenu}\mGBA"; Filename: "{app}\mGBA.exe"
Name: "{commondesktop}\mGBA"; Filename: "{app}\mGBA.exe"; Tasks: desktopicon

[Run]
Filename: "{app}\mGBA.exe"; Description: "{cm:LaunchProgram,mGBA}"; Flags: nowait postinstall skipifsilent
Filename: "{app}\README.html"; Description: "View README"; Flags: nowait postinstall skipifsilent unchecked; Languages: english
Filename: "{app}\README.html"; Description: "View README"; Flags: nowait postinstall skipifsilent unchecked; Languages: italian
Filename: "{app}\README.html"; Description: "View README"; Flags: nowait postinstall skipifsilent unchecked; Languages: spanish
Filename: "{app}\README.html"; Description: "README anzeigen"; Flags: nowait postinstall skipifsilent unchecked; Languages: german
Filename: "{app}\CHANGES.txt"; Description: "View Changelog"; Flags: nowait postinstall skipifsilent unchecked; Languages: english
Filename: "{app}\CHANGES.txt"; Description: "View Changelog"; Flags: nowait postinstall skipifsilent unchecked; Languages: italian
Filename: "{app}\CHANGES.txt"; Description: "View Changelog"; Flags: nowait postinstall skipifsilent unchecked; Languages: spanish
Filename: "{app}\CHANGES.txt"; Description: "Changelog anzeigen"; Flags: nowait postinstall skipifsilent unchecked; Languages: german

[Dirs]
Name: "{app}\shaders\"
Name: "{app}\shaders\agb001.shader\"
Name: "{app}\shaders\ags001.shader\"
Name: "{app}\shaders\fish.shader\"
Name: "{app}\shaders\gba-color.shader\"
Name: "{app}\shaders\lcd.shader\"
Name: "{app}\shaders\motion_blur.shader\"
Name: "{app}\shaders\pixelate.shader\"
Name: "{app}\shaders\scanlines.shader\"
Name: "{app}\shaders\soften.shader\"
Name: "{app}\shaders\vba_pixelate.shader\"
Name: "{app}\shaders\vignette.shader\"
Name: "{app}\shaders\wiiu.shader\"
Name: "{app}\shaders\xbr-lv2.shader\"
Name: "{app}\shaders\xbr-lv3.shader\"
Name: "{app}\third-party\"

[CustomMessages]
english.FileAssoc=Register file associations
italian.FileAssoc=Register file associations
spanish.FileAssoc=Register file associations
german.FileAssoc=Dateierweiterungen registrieren

[Registry]
Root: HKCR; Subkey: ".gb"; ValueType: string; ValueName: ""; ValueData: "Game Boy ROM"; Flags: uninsdeletevalue; Tasks: gbfileassoc
Root: HKCR; Subkey: ".gb\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\mGBA.exe,0"; Tasks: gbfileassoc
Root: HKCR; Subkey: ".gb\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\mGBA.exe"" ""%1"""; Tasks: gbfileassoc
Root: HKCR; Subkey: ".gbc"; ValueType: string; ValueName: ""; ValueData: "Game Boy Color ROM"; Flags: uninsdeletevalue; Tasks: gbcfileassoc
Root: HKCR; Subkey: ".gbc\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\mGBA.exe,0"; Tasks: gbcfileassoc
Root: HKCR; Subkey: ".gbc\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\mGBA.exe"" ""%1"""; Tasks: gbcfileassoc
Root: HKCR; Subkey: ".gba"; ValueType: string; ValueName: ""; ValueData: "Game Boy Advance ROM"; Flags: uninsdeletevalue; Tasks: gbafileassoc
Root: HKCR; Subkey: ".gba\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\mGBA.exe,0"; Tasks: gbafileassoc
Root: HKCR; Subkey: ".gba\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\mGBA.exe"" ""%1"""; Tasks: gbafileassoc

[Code]
var
  noReleaseWarning: String;

procedure InitializeWizard();
  begin
      if ExpandConstant('{#IsRelease}') = 'no' then
        begin
        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.';
        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.';
        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.';
        if ExpandConstant('{language}') = 'german' then noReleaseWarning := 'Sie mchten eine Entwicklerversion von mGBA installieren.' + #13#10#13#10 + 'Entwicklerversionen knnen bislang noch nicht endeckte Fehler beinhalten. Bitte melden Sie alle Fehler, die Sie finden knnen, auf der GitHub-Projektseite.';
        MsgBox(noReleaseWarning, mbInformation, MB_OK);
      end;
  end;
end.


Modified GUID for navx-micro app in installer, to disambiguate from navX-MXP & VMX-pi.

; Script generated by the Inno Script Studio Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "navX-Micro"
#define MyAppVersion "0.0.000"
#define MyAppPublisher "KauaiLabs, Inc."
#define MyAppURL "http://navx-micro.kauailabs.com"

[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{B8D8466D-9D83-4F6A-922B-9BE227E48E5C}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\Kauai Labs\navX-Micro
DisableDirPage=yes
DefaultGroupName=Kauai Labs\navX-Micro
DisableProgramGroupPage=yes
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes
OutputDir=.\Output_navX-Micro
SignTool=signtool

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Icons]
Name: "{group}\navXConfig"; Filename: "{app}\navXConfig\navXConfig.exe"; WorkingDir: "{app}\navXConfig"; IconFilename: "{app}\graphics\configuration.ico"
Name: "{group}\navXMagCalibrator"; Filename: "{app}\navXMagCalibrator\navXMagCalibrator.exe"; WorkingDir: "{app}\navXMagCalibrator"
Name: "{group}\navXFirmwareUpdater"; Filename: "{app}\navXFirmwareUpdater\navXFirmwareUpdater.exe"; WorkingDir: "{app}\navXFirmwareUpdater"; IconFilename: "{app}\graphics\download.ico"
Name: "{group}\navXUI"; Filename: "{app}\navXUI\navXUI"; WorkingDir: "{app}\navXUI"; IconFilename: "{app}\graphics\dashboard.ico"
Name: "{group}\Online Documentation"; Filename: "{app}\navx-micro-software.url"; IconFilename: "{app}\graphics\information.ico"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{group}\FTC Libaries & Samples"; Filename: "{win}\explorer"; Parameters: "{%HOMEPATH}\navx-micro"

[Files]
Source: "..\drivers\windows\vcp\*.*"; DestDir: "{app}\installers\vcp"; Flags: recursesubdirs
Source: "..\drivers\windows\dfu\*.*"; DestDir: "{app}\installers\dfu"; Flags: recursesubdirs
Source: "..\c#\navXMagCalibrator\bin\Release\*.*"; DestDir: "{app}\navXMagCalibrator"; Flags: recursesubdirs
Source: "..\c#\navXConfig\bin\Release\*.*"; DestDir: "{app}\navXConfig"; Flags: recursesubdirs
Source: "..\c#\navXFirmwareUpdater\bin\Release\*.*"; DestDir: "{app}\navXFirmwareUpdater"; Flags: recursesubdirs
; Include additional 32-bit Visual Studio 2013 Redistributable files (MFC120.dll; MSVCR120.dll; vcredist_x86
; these files are referenced by the STMicroelectronics-provided STDUFiles.dll
Source: "..\installers\visual_studio\*.*"; DestDir: "{app}\navXFirmwareUpdater"; Flags: recursesubdirs
Source: "..\processing_output\*.*"; DestDir: "{app}\navXUI"; Flags: recursesubdirs
Source: "weblinks\navx-micro-software.url"; DestDir: "{app}"

Source: "graphics\*.*"; DestDir: "{app}\graphics"; Flags: recursesubdirs
;Source: "..\roborio\java\navx_frc\src\com\*.*"; DestDir: "{%HOMEPATH}\navx-mxp\java\src\com"; Flags: recursesubdirs
;Source: "..\roborio\java\navx_frc\src\docs\*.*"; DestDir: "{%HOMEPATH}\navx-mxp\java\docs"; Flags: recursesubdirs
;Source: "..\roborio\java\navx_frc\jar\navx_frc.jar"; DestDir: "{%HOMEPATH}\navx-mxp\java\lib"
;Source: "..\roborio\java\navXMXP_Java_DataMonitor\*.*"; Excludes: "build,dist,bin"; DestDir: "{%HOMEPATH}\navx-mxp\java\examples\DataMonitor"; Flags: createallsubdirs recursesubdirs
;Source: "..\roborio\java\navXMXP_Java_FieldCentricDrive\*.*"; Excludes: "build,dist,bin"; DestDir: "{%HOMEPATH}\navx-mxp\java\examples\FieldCentricDrive"; Flags: createallsubdirs recursesubdirs
;Source: "..\roborio\java\navXMXP_Java_RotateToAngle\*.*"; Excludes: "build,dist,bin"; DestDir: "{%HOMEPATH}\navx-mxp\java\examples\RotateToAngle"; Flags: createallsubdirs recursesubdirs
;Source: "..\roborio\java\navXMXP_Java_AutoBalance\*.*"; Excludes: "build,dist,bin"; DestDir: "{%HOMEPATH}\navx-mxp\java\examples\AutoBalance"; Flags: createallsubdirs recursesubdirs
;Source: "..\roborio\java\navXMXP_Java_CollisionDetection\*.*"; Excludes: "build,dist,bin"; DestDir: "{%HOMEPATH}\navx-mxp\java\examples\CollisionDetection"; Flags: createallsubdirs recursesubdirs
;Source: "..\roborio\java\navXMXP_Java_MotionDetection\*.*"; Excludes: "build,dist,bin"; DestDir: "{%HOMEPATH}\navx-mxp\java\examples\MotionDetection"; Flags: createallsubdirs recursesubdirs
;Source: "..\roborio\java\navXMXP_ExpansionIO\*.*"; Excludes: "build,dist,bin"; DestDir: "{%HOMEPATH}\navx-mxp\java\examples\ExpansionIO"; Flags: createallsubdirs recursesubdirs

Source: "..\android\navx_ftc\build\outputs\aar\*.aar"; DestDir: "{%HOMEPATH}\navx-micro\android\libs"
Source: "..\android\OpModes\*.*"; DestDir: "{%HOMEPATH}\navx-micro\android\examples"; Flags: createallsubdirs recursesubdirs
Source: "..\android\navx_ftc\docs\*.*"; DestDir: "{%HOMEPATH}\navx-micro\android\docs"; Flags: recursesubdirs

Source: "..\stm32\bin\navx-micro*.hex"; DestDir: "{%HOMEPATH}\navx-micro\firmware"; Flags:

[Run]
Filename: "{app}\installers\vcp\Win7\dpinst_amd64.exe"; Parameters: "/SW"; Flags: 64bit; OnlyBelowVersion: 0,6.2; Check: IsWin64
Filename: "{app}\installers\vcp\Win7\dpinst_x86.exe"; Parameters: "/SW"; Flags: 32bit; OnlyBelowVersion: 0,6.2; Check: not IsWin64
Filename: "{app}\installers\vcp\Win8\dpinst_amd64.exe"; Parameters: "/SW"; Flags: 64bit; MinVersion: 0,6.2; Check: IsWin64
Filename: "{app}\installers\vcp\Win8\dpinst_x86.exe"; Parameters: "/SW"; Flags: 32bit; MinVersion: 0,6.2; Check: not IsWin64
Filename: "{app}\installers\dfu\dpinst_amd64.exe"; Parameters: "/SW"; Flags: 64bit; Check: IsWin64
Filename: "{app}\installers\dfu\dpinst_x86.exe"; Parameters: "/SW"; Flags: 32bit; Check: not IsWin64
Filename: "{app}\navXFirmwareUpdater\vcredist_x86.exe"; Parameters: "/install /passive /norestart"; Flags:
Filename: "{app}\navXFirmwareUpdater\vcredist_x86_vs2005SP1_redist_KB2538242.exe"; Parameters: "/q:a"; Flags:

[Dirs]
Name: "{app}\navXFirmwareUpdater"; Flags: uninsalwaysuninstall
Name: "{app}\navXConfig"; Flags: uninsalwaysuninstall
Name: "{app}\navXMagCalibrator"; Flags: uninsalwaysuninstall
Name: "{app}\installers"
Name: "{app}\navXUI"; Flags: uninsalwaysuninstall

[Code]
function InitializeSetup(): Boolean;
var
 ErrorCode: Integer;
 JavaInstalled : Boolean;
 ResultMsg : Boolean;
 Versions: TArrayOfString;
 I: Integer;
 regRoot: Integer;
begin
 // Check which view of registry should be taken:
 regRoot := HKLM
 begin
  if IsWin64 then
  begin
   regRoot := HKLM64
  end;
 end;
 if (RegGetSubkeyNames(regRoot, 'SOFTWARE\JavaSoft\Java Runtime Environment', Versions)) or (RegGetSubkeyNames(regRoot, 'SOFTWARE\JavaSoft\Java Development Kit', Versions)) then
 begin
  for I := 0 to GetArrayLength(Versions)-1 do
   if JavaInstalled = true then
   begin
    //do nothing
   end else
   begin
    if ( Versions[I][2]='.' ) and ( ( StrToInt(Versions[I][1]) > 1 ) or ( ( StrToInt(Versions[I][1]) = 1 ) and ( StrToInt(Versions[I][3]) >= 7 ) ) ) then
    begin
     JavaInstalled := true;
    end else
    begin
     JavaInstalled := false;
    end;
   end;
 end else
 begin
  JavaInstalled := false;
 end;

 if JavaInstalled then
 begin
  Result := true;
 end else
    begin
  ResultMsg := MsgBox('Oracle Java v1.7 or newer not found in the system. Java 1.7 or later is required to run this application (can be installed after this installation too). Do you want to continue?',
   mbConfirmation, MB_YESNO) = idYes;
  if ResultMsg = false then
  begin
   Result := false;
  end else
  begin
   Result := true;
   ShellExec('open',
    'http://www.java.com/getjava/',
    '','',SW_SHOWNORMAL,ewNoWait,ErrorCode);
  end;
    end;
end;

end.

; Script generated by the Inno Script Studio Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "navX-Micro"
#define MyAppVersion "0.0.000"
#define MyAppPublisher "KauaiLabs, Inc."
#define MyAppURL "http://navx-micro.kauailabs.com"

[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{B8D8466D-9D83-4F6A-922B-9BE227E48E5B}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\Kauai Labs\navX-Micro
DisableDirPage=yes
DefaultGroupName=Kauai Labs\navX-Micro
DisableProgramGroupPage=yes
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes
OutputDir=.\Output_navX-Micro
SignTool=signtool

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Icons]
Name: "{group}\navXConfig"; Filename: "{app}\navXConfig\navXConfig.exe"; WorkingDir: "{app}\navXConfig"; IconFilename: "{app}\graphics\configuration.ico"
Name: "{group}\navXMagCalibrator"; Filename: "{app}\navXMagCalibrator\navXMagCalibrator.exe"; WorkingDir: "{app}\navXMagCalibrator"
Name: "{group}\navXFirmwareUpdater"; Filename: "{app}\navXFirmwareUpdater\navXFirmwareUpdater.exe"; WorkingDir: "{app}\navXFirmwareUpdater"; IconFilename: "{app}\graphics\download.ico"
Name: "{group}\navXUI"; Filename: "{app}\navXUI\navXUI"; WorkingDir: "{app}\navXUI"; IconFilename: "{app}\graphics\dashboard.ico"
Name: "{group}\Online Documentation"; Filename: "{app}\navx-micro-software.url"; IconFilename: "{app}\graphics\information.ico"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{group}\FTC Libaries & Samples"; Filename: "{win}\explorer"; Parameters: "{%HOMEPATH}\navx-micro"

[Files]
Source: "..\drivers\windows\vcp\*.*"; DestDir: "{app}\installers\vcp"; Flags: recursesubdirs
Source: "..\drivers\windows\dfu\*.*"; DestDir: "{app}\installers\dfu"; Flags: recursesubdirs
Source: "..\c#\navXMagCalibrator\bin\Release\*.*"; DestDir: "{app}\navXMagCalibrator"; Flags: recursesubdirs
Source: "..\c#\navXConfig\bin\Release\*.*"; DestDir: "{app}\navXConfig"; Flags: recursesubdirs
Source: "..\c#\navXFirmwareUpdater\bin\Release\*.*"; DestDir: "{app}\navXFirmwareUpdater"; Flags: recursesubdirs
; Include additional 32-bit Visual Studio 2013 Redistributable files (MFC120.dll; MSVCR120.dll; vcredist_x86
; these files are referenced by the STMicroelectronics-provided STDUFiles.dll
Source: "..\installers\visual_studio\*.*"; DestDir: "{app}\navXFirmwareUpdater"; Flags: recursesubdirs
Source: "..\processing_output\*.*"; DestDir: "{app}\navXUI"; Flags: recursesubdirs
Source: "weblinks\navx-micro-software.url"; DestDir: "{app}"

Source: "graphics\*.*"; DestDir: "{app}\graphics"; Flags: recursesubdirs
;Source: "..\roborio\java\navx_frc\src\com\*.*"; DestDir: "{%HOMEPATH}\navx-mxp\java\src\com"; Flags: recursesubdirs
;Source: "..\roborio\java\navx_frc\src\docs\*.*"; DestDir: "{%HOMEPATH}\navx-mxp\java\docs"; Flags: recursesubdirs
;Source: "..\roborio\java\navx_frc\jar\navx_frc.jar"; DestDir: "{%HOMEPATH}\navx-mxp\java\lib"
;Source: "..\roborio\java\navXMXP_Java_DataMonitor\*.*"; Excludes: "build,dist,bin"; DestDir: "{%HOMEPATH}\navx-mxp\java\examples\DataMonitor"; Flags: createallsubdirs recursesubdirs
;Source: "..\roborio\java\navXMXP_Java_FieldCentricDrive\*.*"; Excludes: "build,dist,bin"; DestDir: "{%HOMEPATH}\navx-mxp\java\examples\FieldCentricDrive"; Flags: createallsubdirs recursesubdirs
;Source: "..\roborio\java\navXMXP_Java_RotateToAngle\*.*"; Excludes: "build,dist,bin"; DestDir: "{%HOMEPATH}\navx-mxp\java\examples\RotateToAngle"; Flags: createallsubdirs recursesubdirs
;Source: "..\roborio\java\navXMXP_Java_AutoBalance\*.*"; Excludes: "build,dist,bin"; DestDir: "{%HOMEPATH}\navx-mxp\java\examples\AutoBalance"; Flags: createallsubdirs recursesubdirs
;Source: "..\roborio\java\navXMXP_Java_CollisionDetection\*.*"; Excludes: "build,dist,bin"; DestDir: "{%HOMEPATH}\navx-mxp\java\examples\CollisionDetection"; Flags: createallsubdirs recursesubdirs
;Source: "..\roborio\java\navXMXP_Java_MotionDetection\*.*"; Excludes: "build,dist,bin"; DestDir: "{%HOMEPATH}\navx-mxp\java\examples\MotionDetection"; Flags: createallsubdirs recursesubdirs
;Source: "..\roborio\java\navXMXP_ExpansionIO\*.*"; Excludes: "build,dist,bin"; DestDir: "{%HOMEPATH}\navx-mxp\java\examples\ExpansionIO"; Flags: createallsubdirs recursesubdirs

Source: "..\android\navx_ftc\build\outputs\aar\*.aar"; DestDir: "{%HOMEPATH}\navx-micro\android\libs"
Source: "..\android\OpModes\*.*"; DestDir: "{%HOMEPATH}\navx-micro\android\examples"; Flags: createallsubdirs recursesubdirs
Source: "..\android\navx_ftc\docs\*.*"; DestDir: "{%HOMEPATH}\navx-micro\android\docs"; Flags: recursesubdirs

Source: "..\stm32\bin\navx-micro*.hex"; DestDir: "{%HOMEPATH}\navx-micro\firmware"; Flags:

[Run]
Filename: "{app}\installers\vcp\Win7\dpinst_amd64.exe"; Parameters: "/SW"; Flags: 64bit; OnlyBelowVersion: 0,6.2; Check: IsWin64
Filename: "{app}\installers\vcp\Win7\dpinst_x86.exe"; Parameters: "/SW"; Flags: 32bit; OnlyBelowVersion: 0,6.2; Check: not IsWin64
Filename: "{app}\installers\vcp\Win8\dpinst_amd64.exe"; Parameters: "/SW"; Flags: 64bit; MinVersion: 0,6.2; Check: IsWin64
Filename: "{app}\installers\vcp\Win8\dpinst_x86.exe"; Parameters: "/SW"; Flags: 32bit; MinVersion: 0,6.2; Check: not IsWin64
Filename: "{app}\installers\dfu\dpinst_amd64.exe"; Parameters: "/SW"; Flags: 64bit; Check: IsWin64
Filename: "{app}\installers\dfu\dpinst_x86.exe"; Parameters: "/SW"; Flags: 32bit; Check: not IsWin64
Filename: "{app}\navXFirmwareUpdater\vcredist_x86.exe"; Parameters: "/install /passive /norestart"; Flags:
Filename: "{app}\navXFirmwareUpdater\vcredist_x86_vs2005SP1_redist_KB2538242.exe"; Parameters: "/q:a"; Flags:

[Dirs]
Name: "{app}\navXFirmwareUpdater"; Flags: uninsalwaysuninstall
Name: "{app}\navXConfig"; Flags: uninsalwaysuninstall
Name: "{app}\navXMagCalibrator"; Flags: uninsalwaysuninstall
Name: "{app}\installers"
Name: "{app}\navXUI"; Flags: uninsalwaysuninstall

[Code]
function InitializeSetup(): Boolean;
var
 ErrorCode: Integer;
 JavaInstalled : Boolean;
 ResultMsg : Boolean;
 Versions: TArrayOfString;
 I: Integer;
 regRoot: Integer;
begin
 // Check which view of registry should be taken:
 regRoot := HKLM
 begin
  if IsWin64 then
  begin
   regRoot := HKLM64
  end;
 end;
 if (RegGetSubkeyNames(regRoot, 'SOFTWARE\JavaSoft\Java Runtime Environment', Versions)) or (RegGetSubkeyNames(regRoot, 'SOFTWARE\JavaSoft\Java Development Kit', Versions)) then
 begin
  for I := 0 to GetArrayLength(Versions)-1 do
   if JavaInstalled = true then
   begin
    //do nothing
   end else
   begin
    if ( Versions[I][2]='.' ) and ( ( StrToInt(Versions[I][1]) > 1 ) or ( ( StrToInt(Versions[I][1]) = 1 ) and ( StrToInt(Versions[I][3]) >= 7 ) ) ) then
    begin
     JavaInstalled := true;
    end else
    begin
     JavaInstalled := false;
    end;
   end;
 end else
 begin
  JavaInstalled := false;
 end;

 if JavaInstalled then
 begin
  Result := true;
 end else
    begin
  ResultMsg := MsgBox('Oracle Java v1.7 or newer not found in the system. Java 1.7 or later is required to run this application (can be installed after this installation too). Do you want to continue?',
   mbConfirmation, MB_YESNO) = idYes;
  if ResultMsg = false then
  begin
   Result := false;
  end else
  begin
   Result := true;
   ShellExec('open',
    'http://www.java.com/getjava/',
    '','',SW_SHOWNORMAL,ewNoWait,ErrorCode);
  end;
    end;
end;

end.


only uninstall gdal/python when installed by us

; Script generated by the Inno Script Studio Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "AvNav"
#define MyAppVersion "1.0"
#define MyAppPublisher "Andreas Vogel"
#define MyAppURL "http://www.wellenvogel.de/software/avnav"
#define MyAppExeName "AvChartConvert.exe"
#define RegKey "Software\AvNav"
#define PythonMSI "python-2.7.10.msi"
#define PythonCode "{{E2B51919-207A-43EB-AE78-733F9C6797C2}"
#define PythonDir "python"
#define GdalMSI "gdal-111-1500-core.msi"
#define GdalCode "{{A811F26E-D8EE-4DDB-8E23-ED5386E98695}"
#define GdalDir "gdal"
#define GdalPythonMSI "GDAL-1.11.0.win32-py2.7.msi"
#define GdalPythonCode "{{B086ED88-4BB5-46E0-9CDA-8AA8ED2BF906}"
#define KeyInstalledPython "installedPython"
#define KeyInstalledGdal "installedGdal"

[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{832C93A9-F8FA-4EE4-9447-2645D4340A13}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
AllowNoIcons=yes
;OutputDir=C:\Users\andreas\Documents\GitHub\avnav\windows\installer
OutputBaseFilename=AvNavSetup
Compression=lzma
SolidCompression=yes

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

[Files]
Source: "..\AvChartConvert.exe"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
Source: "..\avnav_server_home.xml"; DestDir: "{app}"; DestName: "avnav_server.xml"
Source: "..\..\server\*.py"; DestDir: "{app}\scripts"
Source: "..\..\chartconvert\*.py"; DestDir: "{app}\scripts"
Source: "library\{#PythonMSI}"; DestDir: "{tmp}"
Source: "library\{#GdalMSI}"; DestDir: "{tmp}"
Source: "library\{#GdalPythonMSI}"; DestDir: "{tmp}"
Source: "..\..\viewer\avnav_min.js"; DestDir: "{app}\viewer"
Source: "..\..\viewer\loader.js"; DestDir: "{app}\viewer"
Source: "..\..\viewer\version.js"; DestDir: "{app}\viewer"
Source: "..\..\viewer\avnav_viewer.html"; DestDir: "{app}\viewer"
Source: "..\..\viewer\avnav_viewer.less"; DestDir: "{app}\viewer"
Source: "..\..\viewer\base.js"; DestDir: "{app}\viewer"
Source: "..\..\viewer\images\*.png"; DestDir: "{app}\viewer\images"
Source: "..\..\libraries\*"; DestDir: "{app}\libraries"; Flags: recursesubdirs; Excludes: "*.pyc,*debug.js"

[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon

[Run]
Filename: "{app}\{#MyAppExeName}"; Flags: nowait postinstall skipifsilent; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"
Filename: "msiexec.exe"; Parameters: "/i ""{tmp}\{#PythonMSI}"" /qb TARGETDIR=""{app}\{#PythonDir}"""; WorkingDir: "{tmp}"
Filename: "msiexec.exe"; Parameters: "/i ""{tmp}\{#GdalMSI}"" /qb TARGETDIR=""{app}\{#GdalDir}"" INSTALLDIR=""{app}\{#GdalDir}"""; WorkingDir: "{tmp}"
Filename: "msiexec.exe"; Parameters: "/i ""{tmp}\{#GdalPythonMSI}"" /qb TARGETDIR=""{app}\{#GdalDir}"" INSTALLDIR=""{app}\{#GdalDir}"""; WorkingDir: "{tmp}"

[Registry]
Root: "HKLM"; Subkey: "{#RegKey}"; ValueType: string; ValueName: "InstallDir"; ValueData: "{app}"; Flags: createvalueifdoesntexist
Root: "HKLM"; Subkey: "{#RegKey}"; ValueType: string; ValueName: "{#KeyInstalledPython}"; ValueData: "true"; Flags: createvalueifdoesntexist
Root: "HKLM"; Subkey: "{#RegKey}"; ValueType: string; ValueName: "{#KeyInstalledGdal}"; ValueData: "true"; Flags: createvalueifdoesntexist
[Code]
function CheckFeature(Name:String;Key:String): Boolean;
var
  path: String;
  isInstalledByUs: string;
begin
  Result:= False;
  if RegQueryStringValue(HKEY_LOCAL_MACHINE,ExpandConstant('{#RegKey}'),Key,isInstalledByUs) then begin
    if isInstalledByUs = 'true' then begin
      if RegQueryStringValue(HKEY_LOCAL_MACHINE, ExpandConstant('{#RegKey}'),'InstallDir', path) then  begin
        Result:=DirExists(path+'\'+Name);
      end
      else begin
        MsgBox('unable to read reg ',mbInformation, MB_OK);
      end;
    end;
  end;
end;

procedure DeinstallFeature(name:String;ikey: String;fkey:String);
var
  ResultCode: Integer;
begin
  if CheckFeature(name,ikey) then begin
    Exec('msiexec.exe', '/x '+fkey+' /qb', '', SW_SHOW,
     ewWaitUntilTerminated, ResultCode)
    Log('Deinstall for '+name+' ended with '+IntToStr(ResultCode));
  end else begin
    Log('Deinstall for '+name+' skipped');
  end;
end;

//take the uninstall id from the properties of the MSI
//getmsiinfo.py library\python-2.7.10.msi "ProductCode"
//would be better to check for the python install dir...
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
begin
  if CurUninstallStep = usPostUninstall then begin
    DeinstallFeature(ExpandConstant('{#PythonDir}'),ExpandConstant('{#KeyInstalledPython}'),ExpandConstant('{#PythonCode}'));
    DeinstallFeature(ExpandConstant('{#GdalDir}'),ExpandConstant('{#KeyInstalledGdal}'),ExpandConstant('{#GdalCode}'));
    DeinstallFeature(ExpandConstant('{#GdalDir}'),ExpandConstant('{#KeyInstalledGdal}'),ExpandConstant('{#GdalPythonCode}'));
  end;
end;

; Script generated by the Inno Script Studio Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "AvNav"
#define MyAppVersion "1.0"
#define MyAppPublisher "Andreas Vogel"
#define MyAppURL "http://www.wellenvogel.de/software/avnav"
#define MyAppExeName "AvChartConvert.exe"
#define RegKey "Software\AvNav"
#define PythonMSI "python-2.7.10.msi"
#define PythonCode "{{E2B51919-207A-43EB-AE78-733F9C6797C2}"
#define PythonDir "python"
#define GdalMSI "gdal-111-1500-core.msi"
#define GdalCode "{{A811F26E-D8EE-4DDB-8E23-ED5386E98695}"
#define GdalDir "gdal"
#define GdalPythonMSI "GDAL-1.11.0.win32-py2.7.msi"
#define GdalPythonCode "{{B086ED88-4BB5-46E0-9CDA-8AA8ED2BF906}"

[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{832C93A9-F8FA-4EE4-9447-2645D4340A13}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
AllowNoIcons=yes
;OutputDir=C:\Users\andreas\Documents\GitHub\avnav\windows\installer
OutputBaseFilename=AvNavSetup
Compression=lzma
SolidCompression=yes

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

[Files]
Source: "..\AvChartConvert.exe"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
Source: "..\avnav_server_home.xml"; DestDir: "{app}"; DestName: "avnav_server.xml"
Source: "..\..\server\*.py"; DestDir: "{app}\scripts"
Source: "..\..\chartconvert\*.py"; DestDir: "{app}\scripts"
Source: "library\{#PythonMSI}"; DestDir: "{tmp}"
Source: "library\{#GdalMSI}"; DestDir: "{tmp}"
Source: "library\{#GdalPythonMSI}"; DestDir: "{tmp}"
Source: "..\..\viewer\avnav_min.js"; DestDir: "{app}\viewer"
Source: "..\..\viewer\loader.js"; DestDir: "{app}\viewer"
Source: "..\..\viewer\version.js"; DestDir: "{app}\viewer"
Source: "..\..\viewer\avnav_viewer.html"; DestDir: "{app}\viewer"
Source: "..\..\viewer\avnav_viewer.less"; DestDir: "{app}\viewer"
Source: "..\..\viewer\base.js"; DestDir: "{app}\viewer"
Source: "..\..\viewer\images\*.png"; DestDir: "{app}\viewer\images"
Source: "..\..\libraries\*"; DestDir: "{app}\libraries"; Flags: recursesubdirs; Excludes: "*.pyc,*debug.js"

[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon

[Run]
Filename: "{app}\{#MyAppExeName}"; Flags: nowait postinstall skipifsilent; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"
Filename: "msiexec.exe"; Parameters: "/i ""{tmp}\{#PythonMSI}"" /qb TARGETDIR=""{app}\{#PythonDir}"""; WorkingDir: "{tmp}"
Filename: "msiexec.exe"; Parameters: "/i ""{tmp}\{#GdalMSI}"" /qb TARGETDIR=""{app}\{#GdalDir}"" INSTALLDIR=""{app}\{#GdalDir}"""; WorkingDir: "{tmp}"
Filename: "msiexec.exe"; Parameters: "/i ""{tmp}\{#GdalPythonMSI}"" /qb TARGETDIR=""{app}\{#GdalDir}"" INSTALLDIR=""{app}\{#GdalDir}"""; WorkingDir: "{tmp}"

[Registry]
Root: "HKLM"; Subkey: "{#RegKey}"; ValueType: string; ValueName: "InstallDir"; ValueData: "{app}"; Flags: createvalueifdoesntexist

[Code]
function CheckFeature(Name:String): Boolean;
var
  path: String;
begin
  Result:= False;
  if RegQueryStringValue(HKEY_LOCAL_MACHINE, ExpandConstant('{#RegKey}'),'InstallDir', path) then  begin
     Result:=DirExists(path+'\'+Name);
  end
  else begin
     MsgBox('unable to read reg ',mbInformation, MB_OK);
  end;
end;

procedure DeinstallFeature(name:String;fkey:String);
var
  ResultCode: Integer;
begin
  if CheckFeature(name) then begin
    Exec('msiexec.exe', '/x '+fkey+' /qb', '', SW_SHOW,
     ewWaitUntilTerminated, ResultCode)
    Log('Deinstall for '+name+' ended with '+IntToStr(ResultCode));
  end else begin
    Log('Deinstall for '+name+' skipped');
  end;
end;

//take the uninstall id from the properties of the MSI
//getmsiinfo.py library\python-2.7.10.msi "ProductCode"
//would be better to check for the python install dir...
procedure DeinitializeUninstall();
begin
  DeinstallFeature(ExpandConstant('{#PythonDir}'),ExpandConstant('{#PythonCode}'));
  DeinstallFeature(ExpandConstant('{#GdalDir}'),ExpandConstant('{#GdalCode}'));
  DeinstallFeature(ExpandConstant('{#GdalDir}'),ExpandConstant('{#GdalPythonCode}'));
end;


the [Icons] section is actually where the program shortcuts are defined!!

git-svn-id: 03a8048b5ee8463be5048a3801110fb50f378627@4741 d0ab736e-dc22-4aeb-8dc9-08def0aa14fd

; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

[Setup]
AppName=Micro-Manager-1.4
AppVerName=Micro-Manager-1.4
AppPublisher=UCSF
AppPublisherURL=http://www.micro-manager.org
AppSupportURL=http://www.micro-manager.org
AppUpdatesURL=http://www.micro-manager.org
DefaultDirName=C:/Program Files/Micro-Manager-1.4
DefaultGroupName=Micro-Manager-1.4
OutputBaseFilename=MMSetup_
Compression=lzma
SolidCompression=true
VersionInfoVersion=1.4
VersionInfoCompany=(c)University of California San Francisco
VersionInfoCopyright=(c)University of California San Francisco, (c)100XImaging Inc
AppCopyright=University of California San Francisco, 100XImaging Inc
ShowLanguageDialog=yes
AppVersion=1.4
AppID=31830087-F23D-4198-B67D-AD4A2A69147F
ArchitecturesAllowed=x64
; "ArchitecturesInstallIn64BitMode=x64" requests that the install be
; done in "64-bit mode" on x64, meaning it should use the native
; 64-bit Program Files directory and the 64-bit view of the registry.
ArchitecturesInstallIn64BitMode=x64

[Languages]
Name: eng; MessagesFile: compiler:Default.isl

[Tasks]
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked

[Files]
;Source: ..\..\3rdparty\Microsoft\VisualC++\lib\x86\Microsoft.VC90.CRT\msvcm90.dll ; DestDir: {app}; Flags: ignoreversion
;Source: ..\..\3rdparty\Microsoft\VisualC++\lib\x86\Microsoft.VC90.CRT\msvcp90.dll ; DestDir: {app}; Flags: ignoreversion
;Source: ..\..\3rdparty\Microsoft\VisualC++\lib\x86\Microsoft.VC90.CRT\msvcr90.dll ; DestDir: {app}; Flags: ignoreversion
;Source: ..\..\3rdparty\Microsoft\VisualC++\lib\x86\Microsoft.VC90.MFC\mfc90.dll ; DestDir: {app}; Flags: ignoreversion
;Source: ..\..\3rdparty\Microsoft\VisualC++\lib\x86\Microsoft.VC90.MFC\mfc90u.dll ; DestDir: {app}; Flags: ignoreversion
;Source: ..\..\3rdparty\Microsoft\VisualC++\lib\x86\Microsoft.VC90.MFC\mfcm90.dll ; DestDir: {app}; Flags: ignoreversion
;Source: ..\..\3rdparty\Microsoft\VisualC++\lib\x86\Microsoft.VC90.MFC\mfcm90u.dll ; DestDir: {app}; Flags: ignoreversion
;Source: ..\..\3rdparty\Microsoft\VisualC++\lib\x86\Microsoft.VC90.ATL\atl90.dll ; DestDir: {app}; Flags: ignoreversion

; device libraries

Source: micro-manager\inpoutx64.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\libusb0.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\MMCoreJ_wrap.dll; DestDir: {app}; Flags: ignoreversion

Source: micro-manager\mmgr_dal_AndorLaserCombiner.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_Apogee.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_Arduino.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_ASIFW1000.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_ASIStage.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_ASIwptr.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_CoherentCube.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_Conix.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_Corvus.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_CSUX.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_DemoCamera.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_DemoStreamingCamera.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_DLP4000.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_GenericSLM.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_Hamamatsu.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_K8055.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_K8061.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_LeicaDMI.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_LeicaDMR.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_Ludl.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_Marzhauser.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_Neos.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_Nikon.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_NikonAZ100.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_NikonTE2000.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_NikonTI.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_Olympus.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_ParallelPort.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_Pecon.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_PI.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_PI_GCS.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_PrecisExcite.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_Prior.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_SerialManager.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_SimpleAutofocus.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_SpectralLMM5.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_SpotCamera.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_SutterLambda.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_ThorlabsFilterWheel.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_ThorlabsSC10.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_TIScam.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_TwainCamera.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_USBManager.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_Utilities.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_Vincent.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_Yokogawa.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_ZeissCAN.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_ZeissCAN29.dll; DestDir: {app}; Flags: ignoreversion
; python wrapper
Source: micro-manager\_MMCorePy.pyd; DestDir: {app}; Flags: ignoreversion skipifsourcedoesntexist
Source: micro-manager\MMCorePy.py; DestDir: {app}; Flags: ignoreversion skipifsourcedoesntexist
Source: micro-manager\MMCoreWrapDemo.py; DestDir: {app}; Flags: ignoreversion skipifsourcedoesntexist

; drivers
Source: micro-manager\drivers\*; DestDir: {app}\drivers; Flags: ignoreversion

; beanshell scripts
Source: ..\scripts\*; DestDir: {app}\scripts; Flags: ignoreversion

; configuration files
Source: micro-manager\MMConfig_demo.cfg; DestDir: {app}; Flags: ignoreversion
;Source: micro-manager\MMDeviceList.txt; DestDir: {app}; Flags: ignoreversion

; ImageJ files
Source: micro-manager\ImageJ.exe; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\LaunchMicroManager.bat; DestDir: {app}; Flags: ignoreversion

;Source: micro-manager\ImageJ.cfg; DestDir: {app}; Flags: onlyifdoesntexist
Source: ..\classext\ij.jar; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\IJ_Prefs.txt; DestDir: {app}; Flags: onlyifdoesntexist
Source: micro-manager\macros\*; DestDir: {app}\macros; Flags: ignoreversion recursesubdirs createallsubdirs
Source: micro-manager\plugins\*; DestDir: {app}\plugins; Flags: ignoreversion recursesubdirs createallsubdirs
;Source: micro-manager\mmplugins\*; DestDir: {app}\mmplugins; Flags: ignoreversion recursesubdirs createallsubdirs
Source: micro-manager\mmautofocus\*; DestDir: {app}\mmautofocus; Flags: ignoreversion recursesubdirs createallsubdirs

; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Name: {group}\Micro-Manager-1.4; Filename: {app}\LaunchMicroManager.bat; WorkingDir: {app}
Name: {group}\{cm:UninstallProgram,Micro-Manager-1.4}; Filename: {uninstallexe}
Name: {commondesktop}\Micro-Manager 1.4; Filename: {app}\LaunchMicroManager.bat; Tasks: desktopicon; WorkingDir: {app}; IconIndex: 0

[Run]
Filename: {app}\LaunchMicroManager.bat; Description: {cm:LaunchProgram,Micro-Manager-1.4}; Flags: nowait postinstall

; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

[Setup]
AppName=Micro-Manager-1.4
AppVerName=Micro-Manager-1.4
AppPublisher=UCSF
AppPublisherURL=http://www.micro-manager.org
AppSupportURL=http://www.micro-manager.org
AppUpdatesURL=http://www.micro-manager.org
DefaultDirName=C:/Program Files/Micro-Manager-1.4
DefaultGroupName=Micro-Manager-1.4
OutputBaseFilename=MMSetup_
Compression=lzma
SolidCompression=true
VersionInfoVersion=1.4
VersionInfoCompany=(c)University of California San Francisco
VersionInfoCopyright=(c)University of California San Francisco, (c)100XImaging Inc
AppCopyright=University of California San Francisco, 100XImaging Inc
ShowLanguageDialog=yes
AppVersion=1.4
AppID=31830087-F23D-4198-B67D-AD4A2A69147F
ArchitecturesAllowed=x64
; "ArchitecturesInstallIn64BitMode=x64" requests that the install be
; done in "64-bit mode" on x64, meaning it should use the native
; 64-bit Program Files directory and the 64-bit view of the registry.
ArchitecturesInstallIn64BitMode=x64

[Languages]
Name: eng; MessagesFile: compiler:Default.isl

[Tasks]
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked

[Files]
;Source: ..\..\3rdparty\Microsoft\VisualC++\lib\x86\Microsoft.VC90.CRT\msvcm90.dll ; DestDir: {app}; Flags: ignoreversion
;Source: ..\..\3rdparty\Microsoft\VisualC++\lib\x86\Microsoft.VC90.CRT\msvcp90.dll ; DestDir: {app}; Flags: ignoreversion
;Source: ..\..\3rdparty\Microsoft\VisualC++\lib\x86\Microsoft.VC90.CRT\msvcr90.dll ; DestDir: {app}; Flags: ignoreversion
;Source: ..\..\3rdparty\Microsoft\VisualC++\lib\x86\Microsoft.VC90.MFC\mfc90.dll ; DestDir: {app}; Flags: ignoreversion
;Source: ..\..\3rdparty\Microsoft\VisualC++\lib\x86\Microsoft.VC90.MFC\mfc90u.dll ; DestDir: {app}; Flags: ignoreversion
;Source: ..\..\3rdparty\Microsoft\VisualC++\lib\x86\Microsoft.VC90.MFC\mfcm90.dll ; DestDir: {app}; Flags: ignoreversion
;Source: ..\..\3rdparty\Microsoft\VisualC++\lib\x86\Microsoft.VC90.MFC\mfcm90u.dll ; DestDir: {app}; Flags: ignoreversion
;Source: ..\..\3rdparty\Microsoft\VisualC++\lib\x86\Microsoft.VC90.ATL\atl90.dll ; DestDir: {app}; Flags: ignoreversion

; device libraries

Source: micro-manager\inpoutx64.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\libusb0.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\MMCoreJ_wrap.dll; DestDir: {app}; Flags: ignoreversion

Source: micro-manager\mmgr_dal_AndorLaserCombiner.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_Apogee.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_Arduino.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_ASIFW1000.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_ASIStage.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_ASIwptr.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_CoherentCube.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_Conix.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_Corvus.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_CSUX.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_DemoCamera.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_DemoStreamingCamera.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_DLP4000.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_GenericSLM.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_Hamamatsu.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_K8055.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_K8061.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_LeicaDMI.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_LeicaDMR.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_Ludl.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_Marzhauser.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_Neos.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_Nikon.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_NikonAZ100.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_NikonTE2000.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_NikonTI.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_Olympus.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_ParallelPort.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_Pecon.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_PI.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_PI_GCS.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_PrecisExcite.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_Prior.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_SerialManager.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_SimpleAutofocus.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_SpectralLMM5.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_SpotCamera.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_SutterLambda.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_ThorlabsFilterWheel.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_ThorlabsSC10.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_TIScam.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_TwainCamera.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_USBManager.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_Utilities.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_Vincent.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_Yokogawa.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_ZeissCAN.dll; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\mmgr_dal_ZeissCAN29.dll; DestDir: {app}; Flags: ignoreversion
; python wrapper
Source: micro-manager\_MMCorePy.pyd; DestDir: {app}; Flags: ignoreversion skipifsourcedoesntexist
Source: micro-manager\MMCorePy.py; DestDir: {app}; Flags: ignoreversion skipifsourcedoesntexist
Source: micro-manager\MMCoreWrapDemo.py; DestDir: {app}; Flags: ignoreversion skipifsourcedoesntexist

; drivers
Source: micro-manager\drivers\*; DestDir: {app}\drivers; Flags: ignoreversion

; beanshell scripts
Source: ..\scripts\*; DestDir: {app}\scripts; Flags: ignoreversion

; configuration files
Source: micro-manager\MMConfig_demo.cfg; DestDir: {app}; Flags: ignoreversion
;Source: micro-manager\MMDeviceList.txt; DestDir: {app}; Flags: ignoreversion

; ImageJ files
Source: micro-manager\ImageJ.exe; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\LaunchMicroManager.bat; DestDir: {app}; Flags: ignoreversion

;Source: micro-manager\ImageJ.cfg; DestDir: {app}; Flags: onlyifdoesntexist
Source: ..\classext\ij.jar; DestDir: {app}; Flags: ignoreversion
Source: micro-manager\IJ_Prefs.txt; DestDir: {app}; Flags: onlyifdoesntexist
Source: micro-manager\macros\*; DestDir: {app}\macros; Flags: ignoreversion recursesubdirs createallsubdirs
Source: micro-manager\plugins\*; DestDir: {app}\plugins; Flags: ignoreversion recursesubdirs createallsubdirs
;Source: micro-manager\mmplugins\*; DestDir: {app}\mmplugins; Flags: ignoreversion recursesubdirs createallsubdirs
Source: micro-manager\mmautofocus\*; DestDir: {app}\mmautofocus; Flags: ignoreversion recursesubdirs createallsubdirs

; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Name: {group}\Micro-Manager-1.4; Filename: {app}\ImageJ.exe; WorkingDir: {app}
Name: {group}\{cm:UninstallProgram,Micro-Manager-1.4}; Filename: {uninstallexe}
Name: {commondesktop}\Micro-Manager 1.4; Filename: {app}\ImageJ.exe; Tasks: desktopicon; WorkingDir: {app}; IconIndex: 0

[Run]
Filename: {app}\LaunchMicroManager.bat; Description: {cm:LaunchProgram,Micro-Manager-1.4}; Flags: nowait postinstall


Windows: removed unnecessary program files menu shortcuts

#define FileHandle FileOpen("version.txt")
#define MyAppVer FileRead(FileHandle)

#define FileHandle FileOpen("version-name.txt")
#define MyAppVerName FileRead(FileHandle)

#define FileHandle FileOpen("stage.txt")
#define MyAppStage FileRead(FileHandle)

#define FileHandle FileOpen("stage-name.txt")
#define MyAppStageName FileRead(FileHandle)

#if MyAppStage == "stable"
#define MyAppStage
#define MyAppStageName
#endif

[Setup]
AppName=SoundRTS {#MyAppStageName}
AppVerName=SoundRTS {#MyAppVerName}
AppPublisher=SoundMud
AppPublisherURL=http://jlpo.free.fr/soundrts
AppSupportURL=http://jlpo.free.fr/soundrts
AppUpdatesURL=http://jlpo.free.fr/soundrts
DefaultDirName={pf}\SoundRTS {#MyAppStage}
DefaultGroupName=SoundRTS {#MyAppStageName}
Compression=lzma
SolidCompression=true
OutputBaseFilename=soundrts-{#MyAppVer}
OutputDir=..\dist
ShowLanguageDialog=auto
PrivilegesRequired=none

[Files]
Source: soundrts-{#MyAppVer}-windows\*; Excludes: \user; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs

[Dirs]
Name: {userappdata}\SoundRTS {#MyAppStage}

[Icons]
Name: {group}\SoundRTS {#MyAppStageName}; Filename: {app}\soundrts.exe; WorkingDir: {app}
Name: {group}\Website; Filename: http://jlpo.free.fr/soundrts
Name: {group}\{cm:UninstallProgram, SoundRTS}; Filename: {uninstallexe}

[Languages]
Name: English; MessagesFile: compiler:Default.isl
Name: BrazilianPortuguese; MessagesFile: compiler:Languages\BrazilianPortuguese.isl
Name: Chinese; MessagesFile: ChineseSimp-12-5.1.11.isl
Name: Czech; MessagesFile: compiler:Languages\Czech.isl
Name: Dutch; MessagesFile: compiler:Languages\Dutch.isl
Name: French; MessagesFile: compiler:Languages\French.isl
Name: German; MessagesFile: compiler:Languages\German.isl
Name: Italian; MessagesFile: compiler:Languages\Italian.isl
Name: Polish; MessagesFile: compiler:Languages\Polish.isl
Name: Russian; MessagesFile: compiler:Languages\Russian.isl
Name: Slovak; MessagesFile: compiler:Languages\Slovak.isl
Name: Spanish; MessagesFile: compiler:Languages\Spanish.isl

[_ISTool]
UseAbsolutePaths=true

#define FileHandle FileOpen("version.txt")
#define MyAppVer FileRead(FileHandle)

#define FileHandle FileOpen("version-name.txt")
#define MyAppVerName FileRead(FileHandle)

#define FileHandle FileOpen("stage.txt")
#define MyAppStage FileRead(FileHandle)

#define FileHandle FileOpen("stage-name.txt")
#define MyAppStageName FileRead(FileHandle)

#if MyAppStage == "stable"
#define MyAppStage
#define MyAppStageName
#endif

[Setup]
AppName=SoundRTS {#MyAppStageName}
AppVerName=SoundRTS {#MyAppVerName}
AppPublisher=SoundMud
AppPublisherURL=http://jlpo.free.fr/soundrts
AppSupportURL=http://jlpo.free.fr/soundrts
AppUpdatesURL=http://jlpo.free.fr/soundrts
DefaultDirName={pf}\SoundRTS {#MyAppStage}
DefaultGroupName=SoundRTS {#MyAppStageName}
Compression=lzma
SolidCompression=true
OutputBaseFilename=soundrts-{#MyAppVer}
OutputDir=..\dist
ShowLanguageDialog=auto
PrivilegesRequired=none

[Files]
Source: soundrts-{#MyAppVer}-windows\*; Excludes: \user; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs

[Dirs]
Name: {userappdata}\SoundRTS {#MyAppStage}

[Icons]
Name: {group}\SoundRTS {#MyAppStageName}; Filename: {app}\soundrts.exe; WorkingDir: {app}
Name: {group}\SoundRTS with soundpack; Filename: {app}\soundrts.exe; Parameters: --mods=soundpack; WorkingDir: {app}
Name: {group}\CrazyMod\CrazyMod 8.2a; Filename: {app}\soundrts.exe; Parameters: --mods=soundpack,CrazyMod8.2; WorkingDir: {app}
Name: {group}\CrazyMod\Website; Filename: http://pragmapragma.free.fr/soundrts-crazymod/
Name: {group}\Mini mods\Orcs; Filename: {app}\soundrts.exe; Parameters: --mods=orc; WorkingDir: {app}
Name: {group}\Mini mods\Teleportation; Filename: {app}\soundrts.exe; Parameters: --mods=teleportation; WorkingDir: {app}
Name: {group}\Mini mods\Vanilla (no mod); Filename: {app}\soundrts.exe; Parameters: --mods=; WorkingDir: {app}
Name: {group}\Manual; Filename: {app}\doc\help-index.htm
Name: {group}\Website; Filename: http://jlpo.free.fr/soundrts
Name: {group}\{cm:UninstallProgram, SoundRTS}; Filename: {uninstallexe}
Name: {group}\user; Filename: {userappdata}\SoundRTS {#MyAppStage}

[Languages]
Name: English; MessagesFile: compiler:Default.isl
Name: BrazilianPortuguese; MessagesFile: compiler:Languages\BrazilianPortuguese.isl
Name: Chinese; MessagesFile: ChineseSimp-12-5.1.11.isl
Name: Czech; MessagesFile: compiler:Languages\Czech.isl
Name: Dutch; MessagesFile: compiler:Languages\Dutch.isl
Name: French; MessagesFile: compiler:Languages\French.isl
Name: German; MessagesFile: compiler:Languages\German.isl
Name: Italian; MessagesFile: compiler:Languages\Italian.isl
Name: Polish; MessagesFile: compiler:Languages\Polish.isl
Name: Russian; MessagesFile: compiler:Languages\Russian.isl
Name: Slovak; MessagesFile: compiler:Languages\Slovak.isl
Name: Spanish; MessagesFile: compiler:Languages\Spanish.isl

[_ISTool]
UseAbsolutePaths=true