Add Russian language in the setup installer

#define MyAppName "Inbox Notifier"
#define MyAppVersion "3.0.1"
#define MyAppYear GetDateTimeString('yyyy', '', '');
#define MyAppPublisher "Xavier Foucrier"
#define MyAppURL "https://github.com/xavierfoucrier/inbox-notifier"
#define MyAppExeName "Inbox Notifier.exe"
#define MyAppRegistryKeyName "Inbox Notifier"

[Setup]
AppId={{D5D279BC-098C-4CBE-BC2C-FBA3F75F773F}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppCopyright=Copyright (c) {#MyAppYear} {#MyAppPublisher}
AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
AppMutex=inboxnotifier-115e363ecbfefd771e55c6874680bc0a
DefaultDirName={autopf}\{#MyAppName}
DefaultGroupName={#MyAppName}
AllowNoIcons=yes
LicenseFile=..\LICENSE.md
OutputDir=..\setup
ArchitecturesInstallIn64BitMode=x64
OutputBaseFilename={#MyAppName} {#MyAppVersion}
SetupIconFile=setup.ico
Compression=lzma
SolidCompression=yes
WizardStyle=modern
PrivilegesRequired=admin
UsedUserAreasWarning=no
VersionInfoVersion={#MyAppVersion}
UninstallDisplayIcon={app}\{#MyAppExeName}

[Languages]
Name: "en"; MessagesFile: "compiler:Default.isl"
Name: "fr"; MessagesFile: "compiler:Languages\French.isl"
Name: "de"; MessagesFile: "compiler:Languages\German.isl"
Name: "ru"; MessagesFile: "compiler:Languages\Russian.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1
Name: "startup"; Description: "{cm:AutoStartProgram,{#MyAppName}}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: checkablealone;

[Files]
Source: "..\code\bin\Release 32 bits (x86)\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode
Source: "..\code\bin\Release 32 bits (x86)\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Check: not Is64BitInstallMode
Source: "..\code\bin\Release 64 bits (x64)\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode
Source: "..\code\bin\Release 64 bits (x64)\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Check: Is64BitInstallMode

[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon

[Run]
Filename: "{app}\{#MyAppExeName}"; Parameters: "install {language} {code:autorun}"; Flags: runhidden
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall

[Registry]
Root: HKCU; Subkey: "Software\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; ValueName: "{#MyAppRegistryKeyName}"; ValueData: "{app}\{#MyAppExeName}"; Tasks: startup; Flags: uninsdeletevalue;

[Code]
function autorun(Value: string): string;
begin
	if RegValueExists(HKCU, 'Software\Microsoft\Windows\CurrentVersion\Run', '{#MyAppRegistryKeyName}') then begin
		Result := 'auto';
	end	else begin
		Result := 'none';
	end;
end;

[UninstallDelete]
Type: filesandordirs; Name: "{localappdata}\{#MyAppName}"

#define MyAppName "Inbox Notifier"
#define MyAppVersion "3.0.1"
#define MyAppYear GetDateTimeString('yyyy', '', '');
#define MyAppPublisher "Xavier Foucrier"
#define MyAppURL "https://github.com/xavierfoucrier/inbox-notifier"
#define MyAppExeName "Inbox Notifier.exe"
#define MyAppRegistryKeyName "Inbox Notifier"

[Setup]
AppId={{D5D279BC-098C-4CBE-BC2C-FBA3F75F773F}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppCopyright=Copyright (c) {#MyAppYear} {#MyAppPublisher}
AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
AppMutex=inboxnotifier-115e363ecbfefd771e55c6874680bc0a
DefaultDirName={autopf}\{#MyAppName}
DefaultGroupName={#MyAppName}
AllowNoIcons=yes
LicenseFile=..\LICENSE.md
OutputDir=..\setup
ArchitecturesInstallIn64BitMode=x64
OutputBaseFilename={#MyAppName} {#MyAppVersion}
SetupIconFile=setup.ico
Compression=lzma
SolidCompression=yes
WizardStyle=modern
PrivilegesRequired=admin
UsedUserAreasWarning=no
VersionInfoVersion={#MyAppVersion}
UninstallDisplayIcon={app}\{#MyAppExeName}

[Languages]
Name: "en"; MessagesFile: "compiler:Default.isl"
Name: "fr"; MessagesFile: "compiler:Languages\French.isl"
Name: "de"; MessagesFile: "compiler:Languages\German.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1
Name: "startup"; Description: "{cm:AutoStartProgram,{#MyAppName}}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: checkablealone;

[Files]
Source: "..\code\bin\Release 32 bits (x86)\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode
Source: "..\code\bin\Release 32 bits (x86)\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Check: not Is64BitInstallMode
Source: "..\code\bin\Release 64 bits (x64)\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode
Source: "..\code\bin\Release 64 bits (x64)\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Check: Is64BitInstallMode

[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon

[Run]
Filename: "{app}\{#MyAppExeName}"; Parameters: "install {language} {code:autorun}"; Flags: runhidden
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall

[Registry]
Root: HKCU; Subkey: "Software\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; ValueName: "{#MyAppRegistryKeyName}"; ValueData: "{app}\{#MyAppExeName}"; Tasks: startup; Flags: uninsdeletevalue;

[Code]
function autorun(Value: string): string;
begin
	if RegValueExists(HKCU, 'Software\Microsoft\Windows\CurrentVersion\Run', '{#MyAppRegistryKeyName}') then begin
		Result := 'auto';
	end	else begin
		Result := 'none';
	end;
end;

[UninstallDelete]
Type: filesandordirs; Name: "{localappdata}\{#MyAppName}"


Git Bash icon already was created by MSYS Git installer

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

#define MyAppName "Boot2Docker for Windows"
#define MyAppVersion "1.1.2"
#define MyAppPublisher "Docker Inc"
#define MyAppURL "http://boot2docker.io"

[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.)
SetupIconFile=boot2docker.ico
;DisableProgramGroupPage=yes
;DisableReadyPage=yes

AppId={{05BD04E9-4AB5-46AC-891E-60EA8FD57D56}
AppCopyright=Docker Project
AppContact=Sven Dowideit <SvenDowideit@docker.com>
AppComments=http://docker.com/
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
ArchitecturesAllowed=x64
ArchitecturesInstallIn64BitMode=x64
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName=Docker
; lets not be annoying
;InfoBeforeFile=.\LICENSE
;DisableFinishedPage
;InfoAfterFile=
OutputBaseFilename=docker-install
Compression=lzma
SolidCompression=yes
WizardImageFile=logo-docker-side.bmp
WizardSmallImageFile=logo-docker-small.bmp
WizardImageStretch=no
WizardImageBackColor=$325461

SignTool=ksign /d $qBoot2Docker for Windows$q /du $qhttp://docker.com$q $f

; for modpath.iss
ChangesEnvironment=true

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

[Types]
Name: "full"; Description: "Full installation"
Name: "upgrade"; Description: "Upgrade Boot2Docker only"
Name: "custom"; Description: "Custom installation"; Flags: iscustom

[Tasks]
Name: modifypath; Description: &Add Boot2Docker environmental PATH; Flags:

[Components]
Name: "Boot2Docker"; Description: "Boot2Docker management script and ISO" ; Types: full upgrade
Name: "VirtualBox"; Description: "VirtualBox"; Types: full
Name: "MSYS"; Description: "MSYS-git UNIX tools"; Types: full

[Files]
Source: ".\Boot2Docker\boot2docker.iso"; DestDir: "{app}"; Flags: ignoreversion; Components: "Boot2Docker"
Source: ".\boot2docker.ico"; DestDir: "{app}"; Flags: ignoreversion; Components: "Boot2Docker"
Source: ".\Boot2Docker\boot2docker.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: "Boot2Docker"
;Source: ".\Boot2Docker\profile"; DestDir: "{app}"; Flags: ignoreversion
Source: ".\start.sh"; DestDir: "{app}"; Flags: ignoreversion; Components: "Boot2Docker"
Source: ".\delete.sh"; DestDir: "{app}"; Flags: ignoreversion; Components: "Boot2Docker"

; msys-Git
Source: ".\msys-Git\Git-1.9.0-preview20140217.exe"; DestDir: "{app}"; AfterInstall: RunInstallMSYS();  Components: "MSYS"

;VirtualBox - 64 bit only
;https://forums.virtualbox.org/viewtopic.php?f=3&t=21127
Source: ".\VirtualBox\VirtualBox-4.3.12-r93733-MultiArch_amd64.msi"; DestDir: "{app}"; Components: "VirtualBox"
Source: ".\VirtualBox\common.cab"; DestDir: "{app}"; AfterInstall: RunInstallVirtualBox(); Components: "VirtualBox"
; the cert http://www.catonrug.net/2013/03/virtualbox-silent-install-store-oracle-certificate.html
;Source: ".\VirtualBox\oracle-vbox.cer"; DestDir: "{app}"; AfterInstall: MSYSInstalled();  Components: "VirtualBox"

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

[Icons]
Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{group}\Boot2Docker Start"; WorkingDir: "{app}"; Filename: "{app}\start.sh"; IconFilename: "{app}/boot2docker.ico"
Name: "{commondesktop}\Boot2Docker Start"; WorkingDir: "{app}"; Filename: "{app}\start.sh"; IconFilename: "{app}/boot2docker.ico"
Name: "{commonprograms}\Boot2Docker Start"; WorkingDir: "{app}"; Filename: "{app}\start.sh"; IconFilename: "{app}/boot2docker.ico"
Name: "{group}\Delete Boot2Docker VM"; WorkingDir: "{app}"; Filename: "{app}\delete.sh"

[UninstallRun]
Filename: "{app}\delete.sh"

[Code]
var
  restart: boolean;
const  UninstallKey = 'Software\Microsoft\Windows\CurrentVersion\Uninstall\{#SetupSetting("AppId")}_is1';
//  32 bit on 64  HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall

function IsUpgrade: Boolean;
var
  Value: string;
begin
  Result := (RegQueryStringValue(HKLM, UninstallKey, 'UninstallString', Value) or
    RegQueryStringValue(HKCU, UninstallKey, 'UninstallString', Value)) and (Value <> '');
end;

function NeedRestart(): Boolean;
begin
  Result := restart;
end;

function NeedToInstallVirtualBox(): Boolean;
begin
  Result := False;
  if (GetEnv('VBOX_INSTALL_PATH') = '') and (GetEnv('VBOX_MSI_INSTALL_PATH') = '') then begin
    Result := True;
  end;
end;

function NeedToInstallMSYS(): Boolean;
begin
  Result := True;
  if RegKeyExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Git_is1') then begin
    Result := False;
  end;
end;

procedure CurPageChanged(CurPageID: Integer);
begin
    WizardForm.FinishedLabel.Caption := 'Docker for Windows installation completed.      The `Boot2Docker Start` icon on your desktop and in Program Files will initialize, start and connect you to your Boot2Docker virtual machine.';
  //if CurPageID = wpSelectDir then
    // to go with DisableReadyPage=yes and DisableProgramGroupPage=yes
    //WizardForm.NextButton.Caption := SetupMessage(msgButtonInstall)
  //else
    //WizardForm.NextButton.Caption := SetupMessage(msgButtonNext);
  //if CurPageID = wpFinished then
    //WizardForm.NextButton.Caption := SetupMessage(msgButtonFinish)
    if CurPageID = wpSelectComponents then
    begin
      if IsUpgrade() then
      begin
        Wizardform.TypesCombo.ItemIndex := 2
      end;
      Wizardform.ComponentsList.Checked[1] := NeedToInstallVirtualBox();
      Wizardform.ComponentsList.Checked[2] := NeedToInstallMSYS();
    end;
end;

procedure RunInstallVirtualBox();
var
  ResultCode: Integer;
begin
    //MsgBox('installing vbox', mbInformation, MB_OK);
    WizardForm.FilenameLabel.Caption := 'installing VirtualBox'
    if Exec(ExpandConstant('msiexec'), ExpandConstant('/qn /i "{app}\VirtualBox-4.3.12-r93733-MultiArch_amd64.msi"'), '', SW_HIDE,
       ewWaitUntilTerminated, ResultCode) then
    begin
      // handle success if necessary; ResultCode contains the exit code
      //MsgBox('vbox installed OK', mbInformation, MB_OK);
    end
    else begin
      // handle failure if necessary; ResultCode contains the error code
      MsgBox('vbox install failure', mbInformation, MB_OK);
    end;
    restart := True;
end;

procedure RunInstallMSYS();
var
  ResultCode: Integer;
begin
    WizardForm.FilenameLabel.Caption := 'installing MSYS Git'
    if Exec(ExpandConstant('{app}\Git-1.9.0-preview20140217.exe'), '/sp- /verysilent /norestart', '', SW_HIDE,
       ewWaitUntilTerminated, ResultCode) then
    begin
      // handle success if necessary; ResultCode contains the exit code
      //MsgBox('msys installed OK', mbInformation, MB_OK);
    end
    else begin
      // handle failure if necessary; ResultCode contains the error code
      MsgBox('msys install failure', mbInformation, MB_OK);
    end;
end;

const
	ModPathName = 'modifypath';
	ModPathType = 'user';

function ModPathDir(): TArrayOfString;
begin
	setArrayLength(Result, 1);
	Result[0] := ExpandConstant('{app}');
end;
#include "modpath.iss"

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

#define MyAppName "Boot2Docker for Windows"
#define MyAppVersion "1.1.2"
#define MyAppPublisher "Docker Inc"
#define MyAppURL "http://boot2docker.io"

[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.)
SetupIconFile=boot2docker.ico
;DisableProgramGroupPage=yes
;DisableReadyPage=yes

AppId={{05BD04E9-4AB5-46AC-891E-60EA8FD57D56}
AppCopyright=Docker Project
AppContact=Sven Dowideit <SvenDowideit@docker.com>
AppComments=http://docker.com/
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
ArchitecturesAllowed=x64
ArchitecturesInstallIn64BitMode=x64
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName=Docker
; lets not be annoying
;InfoBeforeFile=.\LICENSE
;DisableFinishedPage
;InfoAfterFile=
OutputBaseFilename=docker-install
Compression=lzma
SolidCompression=yes
WizardImageFile=logo-docker-side.bmp
WizardSmallImageFile=logo-docker-small.bmp
WizardImageStretch=no
WizardImageBackColor=$325461

SignTool=ksign /d $qBoot2Docker for Windows$q /du $qhttp://docker.com$q $f

; for modpath.iss
ChangesEnvironment=true

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

[Types]
Name: "full"; Description: "Full installation"
Name: "upgrade"; Description: "Upgrade Boot2Docker only"
Name: "custom"; Description: "Custom installation"; Flags: iscustom

[Tasks]
Name: modifypath; Description: &Add Boot2Docker environmental PATH; Flags:

[Components]
Name: "Boot2Docker"; Description: "Boot2Docker management script and ISO" ; Types: full upgrade
Name: "VirtualBox"; Description: "VirtualBox"; Types: full
Name: "MSYS"; Description: "MSYS-git UNIX tools"; Types: full

[Files]
Source: ".\Boot2Docker\boot2docker.iso"; DestDir: "{app}"; Flags: ignoreversion; Components: "Boot2Docker"
Source: ".\boot2docker.ico"; DestDir: "{app}"; Flags: ignoreversion; Components: "Boot2Docker"
Source: ".\Boot2Docker\boot2docker.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: "Boot2Docker"
;Source: ".\Boot2Docker\profile"; DestDir: "{app}"; Flags: ignoreversion
Source: ".\start.sh"; DestDir: "{app}"; Flags: ignoreversion; Components: "Boot2Docker"
Source: ".\delete.sh"; DestDir: "{app}"; Flags: ignoreversion; Components: "Boot2Docker"

; msys-Git
Source: ".\msys-Git\Git-1.9.0-preview20140217.exe"; DestDir: "{app}"; AfterInstall: RunInstallMSYS();  Components: "MSYS"

;VirtualBox - 64 bit only
;https://forums.virtualbox.org/viewtopic.php?f=3&t=21127
Source: ".\VirtualBox\VirtualBox-4.3.12-r93733-MultiArch_amd64.msi"; DestDir: "{app}"; Components: "VirtualBox"
Source: ".\VirtualBox\common.cab"; DestDir: "{app}"; AfterInstall: RunInstallVirtualBox(); Components: "VirtualBox"
; the cert http://www.catonrug.net/2013/03/virtualbox-silent-install-store-oracle-certificate.html
;Source: ".\VirtualBox\oracle-vbox.cer"; DestDir: "{app}"; AfterInstall: MSYSInstalled();  Components: "VirtualBox"

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

[Icons]
Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{group}\Boot2Docker Start"; WorkingDir: "{app}"; Filename: "{app}\start.sh"; IconFilename: "{app}/boot2docker.ico"
Name: "{commondesktop}\Boot2Docker Start"; WorkingDir: "{app}"; Filename: "{app}\start.sh"; IconFilename: "{app}/boot2docker.ico"
Name: "{commonprograms}\Boot2Docker Start"; WorkingDir: "{app}"; Filename: "{app}\start.sh"; IconFilename: "{app}/boot2docker.ico"
Name: "{group}\Delete Boot2Docker VM"; WorkingDir: "{app}"; Filename: "{app}\delete.sh"
Name: "{group}\Unix Bash"; Filename: "C:\Program Files (x86)\Git\bin\sh.exe"; Parameters: "--login -i"; Flags: dontcloseonexit

[UninstallRun]
Filename: "{app}\delete.sh"

[Code]
var
  restart: boolean;
const  UninstallKey = 'Software\Microsoft\Windows\CurrentVersion\Uninstall\{#SetupSetting("AppId")}_is1';
//  32 bit on 64  HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall

function IsUpgrade: Boolean;
var
  Value: string;
begin
  Result := (RegQueryStringValue(HKLM, UninstallKey, 'UninstallString', Value) or
    RegQueryStringValue(HKCU, UninstallKey, 'UninstallString', Value)) and (Value <> '');
end;

function NeedRestart(): Boolean;
begin
  Result := restart;
end;

function NeedToInstallVirtualBox(): Boolean;
begin
  Result := False;
  if (GetEnv('VBOX_INSTALL_PATH') = '') and (GetEnv('VBOX_MSI_INSTALL_PATH') = '') then begin
    Result := True;
  end;
end;

function NeedToInstallMSYS(): Boolean;
begin
  Result := True;
  if RegKeyExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Git_is1') then begin
    Result := False;
  end;
end;

procedure CurPageChanged(CurPageID: Integer);
begin
    WizardForm.FinishedLabel.Caption := 'Docker for Windows installation completed.      The `Boot2Docker Start` icon on your desktop and in Program Files will initialize, start and connect you to your Boot2Docker virtual machine.';
  //if CurPageID = wpSelectDir then
    // to go with DisableReadyPage=yes and DisableProgramGroupPage=yes
    //WizardForm.NextButton.Caption := SetupMessage(msgButtonInstall)
  //else
    //WizardForm.NextButton.Caption := SetupMessage(msgButtonNext);
  //if CurPageID = wpFinished then
    //WizardForm.NextButton.Caption := SetupMessage(msgButtonFinish)
    if CurPageID = wpSelectComponents then
    begin
      if IsUpgrade() then
      begin
        Wizardform.TypesCombo.ItemIndex := 2
      end;
      Wizardform.ComponentsList.Checked[1] := NeedToInstallVirtualBox();
      Wizardform.ComponentsList.Checked[2] := NeedToInstallMSYS();
    end;
end;

procedure RunInstallVirtualBox();
var
  ResultCode: Integer;
begin
    //MsgBox('installing vbox', mbInformation, MB_OK);
    WizardForm.FilenameLabel.Caption := 'installing VirtualBox'
    if Exec(ExpandConstant('msiexec'), ExpandConstant('/qn /i "{app}\VirtualBox-4.3.12-r93733-MultiArch_amd64.msi"'), '', SW_HIDE,
       ewWaitUntilTerminated, ResultCode) then
    begin
      // handle success if necessary; ResultCode contains the exit code
      //MsgBox('vbox installed OK', mbInformation, MB_OK);
    end
    else begin
      // handle failure if necessary; ResultCode contains the error code
      MsgBox('vbox install failure', mbInformation, MB_OK);
    end;
    restart := True;
end;

procedure RunInstallMSYS();
var
  ResultCode: Integer;
begin
    WizardForm.FilenameLabel.Caption := 'installing MSYS Git'
    if Exec(ExpandConstant('{app}\Git-1.9.0-preview20140217.exe'), '/sp- /verysilent /norestart', '', SW_HIDE,
       ewWaitUntilTerminated, ResultCode) then
    begin
      // handle success if necessary; ResultCode contains the exit code
      //MsgBox('msys installed OK', mbInformation, MB_OK);
    end
    else begin
      // handle failure if necessary; ResultCode contains the error code
      MsgBox('msys install failure', mbInformation, MB_OK);
    end;
end;

const
	ModPathName = 'modifypath';
	ModPathType = 'user';

function ModPathDir(): TArrayOfString;
begin
	setArrayLength(Result, 1);
	Result[0] := ExpandConstant('{app}');
end;
#include "modpath.iss"


The actual file for #308

The actual file for #308

; Inno Setup (5.5.3+) Script
; See http://www.jrsoftware.org/ishelp/
;
; Add languages for setup wizard to [Languages] section.
; The Inno Setup language (ISL) files can be found in Tools\isetup\Languages folder.
; If certain language cannot be found there, try looking on Internet for its ISL file. Probably someone already made one.
; Note that, ISL files with ".isl" extension use ANSI encoding in LanguageCodePage specified in file. ISL files with ".islu" extension use UTF-8 encoding.

#define AppId "{" + AppId
#define AppExeName AssemblyName + ".exe"
#define AppDataFolderName ProductName
#define DistDir ProjectDir + "\dist"
#define BuildOutputDir DistDir + "\PoESkillTree"
#define PortableIniFileName "Portable.ini"

[Setup]
AppId={#AppId}
AppMutex={#AppId}
AppName={#ProductName}
AppVersion={#ProductVersion}
AppPublisher={#AssemblyCompany}
AppPublisherURL={#ProductURL}
AppSupportURL={#ProductURL}
AppUpdatesURL={#ProductURL}
AppCopyright={#AssemblyCopyright}
DefaultDirName={pf}\{#ProductName}
DefaultGroupName={#ProductName}
Uninstallable=not CheckPortableMode
UninstallDisplayName={#ProductName}
UninstallDisplayIcon={app}\{#AppExeName},0
;InfoBeforeFile="Release-Notes.txt"
LicenseFile={#BuildOutputDir}\LICENSE.txt
OutputDir={#DistDir}
OutputBaseFilename={#PackageName}-{#ProductVersion}
VersionInfoVersion={#FileVersion}
SetupIconFile={#ProjectDir}\logo.ico
Compression=lzma
SolidCompression=yes

[Languages]
; Name must be set to supported culture name with all '-' characters replaced with '_'.
; Note: Name cannot contain '-' (minus) character.
Name: "en_US"; MessagesFile: "compiler:Default.isl"
Name: "sk"; MessagesFile: "compiler:Languages\Slovak.isl"
Name: "ru"; MessagesFile: "compiler:Languages\Russian.isl"
Name: "de_DE"; MessagesFile: "compiler:Languages\German.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Check: CheckStandardMode; Flags: unchecked
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Check: CheckStandardMode; Flags: unchecked; OnlyBelowVersion: 0,6.1

[Dirs]
Name: "{userappdata}\{#AppId}"; Check: CheckStandardMode

[Files]
; Program Files
Source: "{#BuildOutputDir}\*.exe"; DestDir: "{app}"
Source: "{#BuildOutputDir}\*.config"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#BuildOutputDir}\*.pdb"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#BuildOutputDir}\*.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#BuildOutputDir}\LICENSE.txt"; DestDir: "{app}"; Flags: ignoreversion
; Application Data (Standard mode)
Source: "{#BuildOutputDir}\Data\*"; DestDir: "{userappdata}\{#AppDataFolderName}\Data"; Check: CheckStandardMode; Flags: ignoreversion recursesubdirs
Source: "{#BuildOutputDir}\Locale\*"; DestDir: "{userappdata}\{#AppDataFolderName}\Locale"; Check: CheckStandardMode; Flags: ignoreversion recursesubdirs
Source: "{#BuildOutputDir}\Items.xml"; DestDir: "{userappdata}\{#AppDataFolderName}"; Check: CheckStandardMode; Flags: ignoreversion
Source: "{#BuildOutputDir}\PersistentData.xml"; DestDir: "{userappdata}\{#AppDataFolderName}"; Check: CheckStandardMode; AfterInstall: SetLanguage; Flags: ignoreversion onlyifdoesntexist uninsneveruninstall
; Application Data (Portable mode)
Source: "{#BuildOutputDir}\Data\*"; DestDir: "{app}\Data"; Check: CheckPortableMode; Flags: ignoreversion recursesubdirs
Source: "{#BuildOutputDir}\Locale\*"; DestDir: "{app}\Locale"; Check: CheckPortableMode; Flags: ignoreversion recursesubdirs
Source: "{#BuildOutputDir}\Items.xml"; DestDir: "{app}"; Check: CheckPortableMode; Flags: ignoreversion
Source: "{#BuildOutputDir}\PersistentData.xml"; DestDir: "{app}"; Check: CheckPortableMode; AfterInstall: SetLanguage; Flags: ignoreversion onlyifdoesntexist uninsneveruninstall

[INI]
Filename: "{app}\{#PortableIniFileName}"; Section: "Setup"; Key: "Language"; String: "{language}"; Check: CheckPortableMode

[Icons]
Name: "{group}\{#ProductName}"; Filename: "{app}\{#AppExeName}"; Check: CheckStandardMode
Name: "{group}\{cm:UninstallProgram,{#ProductName}}"; Filename: "{uninstallexe}"; Check: CheckStandardMode
Name: "{commondesktop}\{#ProductName}"; Filename: "{app}\{#AppExeName}"; Tasks: desktopicon
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#ProductName}"; Filename: "{app}\{#AppExeName}"; Tasks: quicklaunchicon

[Run]
; Launch program checkbox
Filename: "{app}\{#AppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(ProductName, '&', '&&')}}"; Flags: unchecked nowait postinstall skipifsilent
; Run application once silent update finished
Filename: "{app}\{#AppExeName}"; Flags: nowait skipifnotsilent

[Code]
var
	PortabilityPage: TInputOptionWizardPage;
	IsPortable: Boolean;
	IsSilent: Boolean;

function CheckPortableMode: Boolean;
begin
	Result := IsPortable;
end;

function CheckStandardMode: Boolean;
begin
	Result := not IsPortable;
end;

procedure InitializeWizard;
var
	i: Integer;
begin
	{ Create custom page }
	PortabilityPage := CreateInputOptionPage(wpLicense, CustomMessage('InstallationTypeTitle'), CustomMessage('InstallationTypeDesc'),
											 CustomMessage('InstallationTypeLabel'), True, False);
	PortabilityPage.Add(CustomMessage('InstallationTypeStandardLabel'));
	PortabilityPage.Add(CustomMessage('InstallationTypePortableLabel'));

	{ Select standard mode, unless launched with /PORTABLE=1 argument }
	if (ExpandConstant('{param:portable|0}') = '1') then
		PortabilityPage.SelectedValueIndex := 1
	else
		PortabilityPage.SelectedValueIndex := 0;

	IsSilent := False;
	for i := 1 to ParamCount do
		if CompareText(ParamStr(i), '/SILENT') = 0 then
		begin
			IsSilent := True;
			Break;
		end;
end;

function NextButtonClick(CurPageID: Integer): Boolean;
var
	InstallLocation: String;
begin
	{ Determine portable mode }
	if (CurPageID = PortabilityPage.ID) then
	begin
		IsPortable := not (PortabilityPage.SelectedValueIndex = 0);
		{ Change DefaultDirName in wizard form }
		if IsPortable then
			WizardForm.DirEdit.Text := ExpandConstant('{sd}\{#ProductName}')
		else
			begin
				{ Use InstallLocation from registry if possible }
				if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'Software\Microsoft\Windows\CurrentVersion\Uninstall\' + ExpandConstant('{#AppId}') + '_is1', 'InstallLocation', InstallLocation) then
					WizardForm.DirEdit.Text := RemoveBackslashUnlessRoot(InstallLocation)
				else
					WizardForm.DirEdit.Text := ExpandConstant('{pf}\{#ProductName}')
			end;
	end;
	{ Return True to continue with setup }
	Result := True;
end;

procedure SetLanguage;
var
    AnsiFileData: AnsiString;
	ExpandedFile: String;
	FileData: String;
	Language: String;
begin
	ExpandedFile := ExpandConstant(CurrentFileName);
	Language := ExpandConstant('{language}');
	StringChangeEx(Language, '_', '-', False);
    LoadStringFromFile(ExpandedFile, AnsiFileData);
	FileData := String(AnsiFileData);
    StringChangeEx(FileData, '%LANGUAGE%', Language, True);
    SaveStringToFile(ExpandedFile, AnsiString(FileData), False);
end;

function ShouldSkipPage(PageID: Integer): Boolean;
begin
	Result := False;

	{ Don't ask Start Menu group name if in portable mode }
	if PageID = wpSelectProgramGroup then
	begin
		Result := IsPortable;
	end;

	if IsSilent then
	begin
		if PageID = PortabilityPage.ID then
		begin
			result := True;
		end;
	end;
end;

; Inno Setup (5.5.3+) Script
; See http://www.jrsoftware.org/ishelp/
;
; Add languages for setup wizard to [Languages] section.
; The Inno Setup language (ISL) files can be found in Tools\isetup\Languages folder.
; If certain language cannot be found there, try looking on Internet for its ISL file. Probably someone already made one.
; Note that, ISL files with ".isl" extension use ANSI encoding in LanguageCodePage specified in file. ISL files with ".islu" extension use UTF-8 encoding.

#define AppId "{" + AppId
#define AppExeName AssemblyName + ".exe"
#define AppDataFolderName ProductName
#define DistDir ProjectDir + "\dist"
#define BuildOutputDir DistDir + "\PoESkillTree"
#define PortableIniFileName "Portable.ini"

[Setup]
AppId={#AppId}
AppMutex={#AppId}
AppName={#ProductName}
AppVersion={#ProductVersion}
AppPublisher={#AssemblyCompany}
AppPublisherURL={#ProductURL}
AppSupportURL={#ProductURL}
AppUpdatesURL={#ProductURL}
AppCopyright={#AssemblyCopyright}
DefaultDirName={pf}\{#ProductName}
DefaultGroupName={#ProductName}
Uninstallable=not CheckPortableMode
UninstallDisplayName={#ProductName}
UninstallDisplayIcon={app}\{#AppExeName},0
;InfoBeforeFile="Release-Notes.txt"
LicenseFile={#BuildOutputDir}\LICENSE.txt
OutputDir={#DistDir}
OutputBaseFilename={#PackageName}-{#ProductVersion}
VersionInfoVersion={#FileVersion}
SetupIconFile={#ProjectDir}\logo.ico
Compression=lzma
SolidCompression=yes

[Languages]
; Name must be set to supported culture name with all '-' characters replaced with '_'.
; Note: Name cannot contain '-' (minus) character.
Name: "en_US"; MessagesFile: "compiler:Default.isl"
Name: "sk"; MessagesFile: "compiler:Languages\Slovak.isl"
Name: "ru"; MessagesFile: "compiler:Languages\Russian.isl"
Name: "de_DE"; MessagesFile: "compiler:Languages\German.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Check: CheckStandardMode; Flags: unchecked
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Check: CheckStandardMode; Flags: unchecked; OnlyBelowVersion: 0,6.1

[Dirs]
Name: "{userappdata}\{#AppId}"; Check: CheckStandardMode

[Files]
; Program Files
Source: "{#BuildOutputDir}\*.exe"; DestDir: "{app}"
Source: "{#BuildOutputDir}\*.config"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#BuildOutputDir}\*.pdb"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#BuildOutputDir}\*.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#BuildOutputDir}\LICENSE.txt"; DestDir: "{app}"; Flags: ignoreversion
; Application Data (Standard mode)
Source: "{#BuildOutputDir}\Data\*"; DestDir: "{userappdata}\{#AppDataFolderName}\Data"; Check: CheckStandardMode; Flags: ignoreversion recursesubdirs
Source: "{#BuildOutputDir}\Locale\*"; DestDir: "{userappdata}\{#AppDataFolderName}\Locale"; Check: CheckStandardMode; Flags: ignoreversion recursesubdirs
Source: "{#BuildOutputDir}\Items.xml"; DestDir: "{userappdata}\{#AppDataFolderName}"; Check: CheckStandardMode; Flags: ignoreversion
Source: "{#BuildOutputDir}\PersistentData.xml"; DestDir: "{userappdata}\{#AppDataFolderName}"; Check: CheckStandardMode; AfterInstall: SetLanguage; Flags: ignoreversion onlyifdoesntexist uninsneveruninstall
; Application Data (Portable mode)
Source: "{#BuildOutputDir}\Data\*"; DestDir: "{app}\Data"; Check: CheckPortableMode; Flags: ignoreversion recursesubdirs
Source: "{#BuildOutputDir}\Locale\*"; DestDir: "{app}\Locale"; Check: CheckPortableMode; Flags: ignoreversion recursesubdirs
Source: "{#BuildOutputDir}\Items.xml"; DestDir: "{app}"; Check: CheckPortableMode; Flags: ignoreversion
Source: "{#BuildOutputDir}\PersistentData.xml"; DestDir: "{app}"; Check: CheckPortableMode; AfterInstall: SetLanguage; Flags: ignoreversion onlyifdoesntexist uninsneveruninstall

[INI]
Filename: "{app}\{#PortableIniFileName}"; Section: "Setup"; Key: "Language"; String: "{language}"; Check: CheckPortableMode

[Icons]
Name: "{group}\{#ProductName}"; Filename: "{app}\{#AppExeName}"; Check: CheckStandardMode
Name: "{group}\{cm:UninstallProgram,{#ProductName}}"; Filename: "{uninstallexe}"; Check: CheckStandardMode
Name: "{commondesktop}\{#ProductName}"; Filename: "{app}\{#AppExeName}"; Tasks: desktopicon
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#ProductName}"; Filename: "{app}\{#AppExeName}"; Tasks: quicklaunchicon

[Run]
; Launch program checkbox
Filename: "{app}\{#AppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(ProductName, '&', '&&')}}"; Flags: unchecked nowait postinstall skipifsilent
; Run application once silent update finished
Filename: "{app}\{#AppExeName}"; Flags: nowait skipifnotsilent

[Code]
var
	PortabilityPage: TInputOptionWizardPage;
	IsPortable: Boolean;

function CheckPortableMode: Boolean;
begin
	Result := IsPortable;
end;

function CheckStandardMode: Boolean;
begin
	Result := not IsPortable;
end;

procedure InitializeWizard;
begin
	{ Create custom page }
	PortabilityPage := CreateInputOptionPage(wpLicense, CustomMessage('InstallationTypeTitle'), CustomMessage('InstallationTypeDesc'),
											 CustomMessage('InstallationTypeLabel'), True, False);
	PortabilityPage.Add(CustomMessage('InstallationTypeStandardLabel'));
	PortabilityPage.Add(CustomMessage('InstallationTypePortableLabel'));

	{ Select standard mode, unless launched with /PORTABLE=1 argument }
	if (ExpandConstant('{param:portable|0}') = '1') then
		PortabilityPage.SelectedValueIndex := 1
	else
		PortabilityPage.SelectedValueIndex := 0
end;

function NextButtonClick(CurPageID: Integer): Boolean;
var
	InstallLocation: String;
begin
	{ Determine portable mode }
	if (CurPageID = PortabilityPage.ID) then
	begin
		IsPortable := not (PortabilityPage.SelectedValueIndex = 0);
		{ Change DefaultDirName in wizard form }
		if IsPortable then
			WizardForm.DirEdit.Text := ExpandConstant('{sd}\{#ProductName}')
		else
			begin
				{ Use InstallLocation from registry if possible }
				if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'Software\Microsoft\Windows\CurrentVersion\Uninstall\' + ExpandConstant('{#AppId}') + '_is1', 'InstallLocation', InstallLocation) then
					WizardForm.DirEdit.Text := RemoveBackslashUnlessRoot(InstallLocation)
				else
					WizardForm.DirEdit.Text := ExpandConstant('{pf}\{#ProductName}')
			end;
	end;
	{ Return True to continue with setup }
	Result := True;
end;

procedure SetLanguage;
var
    AnsiFileData: AnsiString;
	ExpandedFile: String;
	FileData: String;
	Language: String;
begin
	ExpandedFile := ExpandConstant(CurrentFileName);
	Language := ExpandConstant('{language}');
	StringChangeEx(Language, '_', '-', False);
    LoadStringFromFile(ExpandedFile, AnsiFileData);
	FileData := String(AnsiFileData);
    StringChangeEx(FileData, '%LANGUAGE%', Language, True);
    SaveStringToFile(ExpandedFile, AnsiString(FileData), False);
end;

function ShouldSkipPage(PageID: Integer): Boolean;
begin
	Result := False;

	{ Don't ask Start Menu group name if in portable mode }
	if PageID = wpSelectProgramGroup then
	begin
		Result := IsPortable;
	end;
end;