simplify the installation triggers

simplify the installation triggers

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

#define MyAppName "Docker for Windows"
#define MyAppVersion "0.12.0"
#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 $qDocker for Windows$q /du $qhttp://docker.com$q $f

[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

[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') = '' 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 Program Files will initialise, 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;

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

#define MyAppName "Docker for Windows"
#define MyAppVersion "0.12.0"
#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 $qDocker for Windows$q /du $qhttp://docker.com$q $f

[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

[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}"; 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: VBoxInstalled(); 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') = '' 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 Program Files will initialise, 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 VBoxInstalled();
var
  ResultCode: Integer;
begin
  if GetEnv('VBOX_INSTALL_PATH') = '' then
  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 else begin
    //MsgBox('NOT installing vbox', mbInformation, MB_OK);
  end;
end;

procedure MSYSInstalled();
var
  ResultCode: Integer;
begin
  if RegKeyExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Git_is1') then
  begin
    //MsgBox('NOT installing msys', mbInformation, MB_OK);
  end
  else begin
    //MsgBox('installing msys', mbInformation, MB_OK);
    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;
end;


Remove obsolete windows version constraint

#include "InstallDependancies.iss"

#define MyAppName "BCUninstaller"
#define MyAppNameShort "BCUninstaller"
#define MyAppPublisher "Marcin Szeniak"
#define MyAppURL "http://klocmansoftware.weebly.com/"
#define MyAppExeName "BCUninstaller.exe"
#define MyAppCopyright "Copyright 2018 Marcin Szeniak"

#define MyAppVersion "4.15.0.0"
#define MyAppVersionShort "4.15.0"

#include "Scripts\PortablePage.iss"
#include "Scripts\PortableIcons.iss"
#include "Scripts\Ngen.iss"

[Setup]
AppId={{f4fef76c-1aa9-441c-af7e-d27f58d898d1}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppVerName={#MyAppName}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
UninstallDisplayIcon={app}\{#MyAppExeName}

WizardImageFile=bigImage.bmp
WizardSmallImageFile=smallImage.bmp
SetupIconFile=logo.ico

AllowNoIcons=yes
DisableDirPage=no
LicenseFile=Input\Licence.txt
OutputBaseFilename={#MyAppNameShort}_{#MyAppVersionShort}_setup

Compression=lzma2/ultra
SolidCompression=yes

PrivilegesRequired=admin
ArchitecturesAllowed=x86 x64 ia64
ArchitecturesInstallIn64BitMode=x64 ia64

VersionInfoCompany={#MyAppPublisher}
;VersionInfoDescription=desc
VersionInfoCopyright={#MyAppCopyright}
VersionInfoProductName={#MyAppName}
VersionInfoProductVersion={#MyAppVersion}
VersionInfoProductTextVersion={#MyAppVersion}
VersionInfoVersion={#MyAppVersion}
VersionInfoTextVersion={#MyAppVersion}

[Languages]
Name: "en"; MessagesFile: "compiler:Default.isl"
Name: "fr"; MessagesFile: "compiler:Languages\French.isl"
Name: "pl"; MessagesFile: "compiler:Languages\Polish.isl"
Name: "de"; MessagesFile: "compiler:Languages\German.isl"
Name: "hu"; MessagesFile: "compiler:Languages\Hungarian.isl"
Name: "sl"; MessagesFile: "compiler:Languages\Slovenian.isl"
Name: "nl"; MessagesFile: "compiler:Languages\Dutch.isl"
Name: "es"; MessagesFile: "compiler:Languages\Spanish.isl"
Name: "bpt"; MessagesFile: "compiler:Languages\BrazilianPortuguese.isl"

[Components]
Name: "main"; Description: "Main Files"; Types: full compact custom; Flags: fixed
Name: "lang"; Description: "Extra Languages"; Types: full

[Files]
Source: "Input\BCUninstaller.exe"; DestDir: "{app}"; Components: main; Flags: ignoreversion
Source: "Input\BCU_manual.html"; DestDir: "{app}"; Components: main; Flags: ignoreversion isreadme
Source: "Input\CleanLogs.bat"; DestDir: "{app}"; Components: main; Check: IsPortable(); Flags: ignoreversion
Source: "Input\*"; DestDir: "{app}"; Components: main; Flags: ignoreversion; Excludes: "CleanLogs.bat"
Source: "Input\Resources\*"; DestDir: "{app}\Resources"; Components: main; Flags: ignoreversion recursesubdirs

Source: "Input\*"; DestDir: "{app}"; Components: lang; Flags: ignoreversion recursesubdirs; Excludes: "CleanLogs.bat"

[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent shellexec

#include "InstallDependancies.iss"

#define MyAppName "BCUninstaller"
#define MyAppNameShort "BCUninstaller"
#define MyAppPublisher "Marcin Szeniak"
#define MyAppURL "http://klocmansoftware.weebly.com/"
#define MyAppExeName "BCUninstaller.exe"
#define MyAppCopyright "Copyright 2018 Marcin Szeniak"

#define MyAppVersion "4.15.0.0"
#define MyAppVersionShort "4.15.0"

#include "Scripts\PortablePage.iss"
#include "Scripts\PortableIcons.iss"
#include "Scripts\Ngen.iss"

[Setup]
AppId={{f4fef76c-1aa9-441c-af7e-d27f58d898d1}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppVerName={#MyAppName}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
UninstallDisplayIcon={app}\{#MyAppExeName}

WizardImageFile=bigImage.bmp
WizardSmallImageFile=smallImage.bmp
SetupIconFile=logo.ico

AllowNoIcons=yes
DisableDirPage=no
LicenseFile=Input\Licence.txt
OutputBaseFilename={#MyAppNameShort}_{#MyAppVersionShort}_setup

Compression=lzma2/ultra
SolidCompression=yes

;MinVersion default value: "0,5.0 (Windows 2000+) if Unicode Inno Setup, else 4.0,4.0 (Windows 95+)"
MinVersion=0,5.0
PrivilegesRequired=admin
ArchitecturesAllowed=x86 x64 ia64
ArchitecturesInstallIn64BitMode=x64 ia64

VersionInfoCompany={#MyAppPublisher}
;VersionInfoDescription=desc
VersionInfoCopyright={#MyAppCopyright}
VersionInfoProductName={#MyAppName}
VersionInfoProductVersion={#MyAppVersion}
VersionInfoProductTextVersion={#MyAppVersion}
VersionInfoVersion={#MyAppVersion}
VersionInfoTextVersion={#MyAppVersion}

[Languages]
Name: "en"; MessagesFile: "compiler:Default.isl"
Name: "fr"; MessagesFile: "compiler:Languages\French.isl"
Name: "pl"; MessagesFile: "compiler:Languages\Polish.isl"
Name: "de"; MessagesFile: "compiler:Languages\German.isl"
Name: "hu"; MessagesFile: "compiler:Languages\Hungarian.isl"
Name: "sl"; MessagesFile: "compiler:Languages\Slovenian.isl"
Name: "nl"; MessagesFile: "compiler:Languages\Dutch.isl"
Name: "es"; MessagesFile: "compiler:Languages\Spanish.isl"
Name: "bpt"; MessagesFile: "compiler:Languages\BrazilianPortuguese.isl"

[Components]
Name: "main"; Description: "Main Files"; Types: full compact custom; Flags: fixed
Name: "lang"; Description: "Extra Languages"; Types: full

[Files]
Source: "Input\BCUninstaller.exe"; DestDir: "{app}"; Components: main; Flags: ignoreversion
Source: "Input\BCU_manual.html"; DestDir: "{app}"; Components: main; Flags: ignoreversion isreadme
Source: "Input\CleanLogs.bat"; DestDir: "{app}"; Components: main; Check: IsPortable(); Flags: ignoreversion
Source: "Input\*"; DestDir: "{app}"; Components: main; Flags: ignoreversion; Excludes: "CleanLogs.bat"
Source: "Input\Resources\*"; DestDir: "{app}\Resources"; Components: main; Flags: ignoreversion recursesubdirs

Source: "Input\*"; DestDir: "{app}"; Components: lang; Flags: ignoreversion recursesubdirs; Excludes: "CleanLogs.bat"

[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent shellexec


fix mismatched quotes

fix mismatched quotes

;
;          _\|/_
;          (o o)
; +-----oOO-{_}-OOo------------------------------------------------------+
; |                                                                      |
; |  Flexible Isometric Free Engine - Inno Setup Script File             |
; |  -------------------------------------------------------             |
; |                                                                      |
; |  Author:   Jens A. Koch <jakoch@web.de>                              |
; |  License:  MIT                                                       |
; |                                                                      |
; |  For the full copyright and license information, please view         |
; |  the LICENSE file that was distributed with this source code.        |
; |                                                                      |
; |  Note for developers                                                 |
; |  -------------------                                                 |
; |  A good resource for developing and understanding                    |
; |  Inno Setup Script files is the official "Inno Setup Help".          |
; |  Website:  http://jrsoftware.org/ishelp/index.php                    |
; |                                                                      |
; +---------------------------------------------------------------------<3

; version is set here, when the version isn't passed to the compiler on invocation
#ifndef APP_VERSION
#define APP_VERSION          "0.0.1"
#endif

#define APP_NAME             "FifeSDK"
#define APP_COMPILER         "VC14"
#define APP_PUBLISHER        "FIFE Team"
#define APP_URL              "http://fifengine.net/"
#define APP_SUPPORT_URL      "https://github.com/fifengine/fifengine/issues"
#define COPYRIGHT_YEAR        GetDateTimeString('yyyy', '', '');

[Setup]
AppId={{8A27DF0C-689B-4B76-8BFC-AFCDD90C1A31}

; set application meta-data
AppName={#APP_NAME}
AppVerName={#APP_NAME} {#APP_VERSION}
AppVersion={#APP_VERSION}
AppCopyright=© {#APP_PUBLISHER}
AppPublisher={#APP_PUBLISHER}
AppPublisherURL={#APP_URL}
AppSupportURL={#APP_SUPPORT_URL}
AppUpdatesURL={#APP_URL}

; default installation folder is "c:\fife". users might change this via dialog.
DefaultDirName={pf}\FIFE\
DefaultGroupName={#APP_NAME}
DirExistsWarning=No
EnableDirDoesntExistWarning=Yes
AllowNoIcons=yes

; compression
Compression=lzma2/ultra
LZMAUseSeparateProcess=yes
LZMANumBlockThreads=2
InternalCompressLevel=max
SolidCompression=true

; style
WizardImageFile=images\WizardImage.bmp
WizardSmallImageFile=images\WizardSmallImage.bmp
SetupIconFile=images\fife.ico

; this creates the installer executable in the build folder
; for example: "_build\FifeSDK-0.4.0-Setup-VC14-x86.exe"
OutputBaseFilename={#APP_NAME}-{#APP_VERSION}-Setup-{#APP_COMPILER}-x86
OutputDir=..\_build

; disable wizard pages: Welcome (by default), Ready
DisableReadyPage=yes

; enable wizard pages: Select Destination Location
DisableDirPage=no

; Tell Windows Explorer to reload the environment, because Registry change (env PATH change)
ChangesEnvironment=yes

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

; Define the types of installations
; The user gets a drop-down list to select one of these types.
; Selecting a type will selected a set of components.
[Types]
Name: "full";          Description: "Full installation (build-tools, engine, dependencies, demos, tools)"
Name: "build-tools";   Description: "Build-tools only (CMake, Python, Boost, Swig)"
Name: "fife-only";     Description: "Engine only"
;Name: "fife-demos";    Description: "Engine and Demos"
Name: "custom";        Description: "Custom installation"; Flags: iscustom

; Define components to install
[Components]
Name: fifengine;       Description: "[fifengine] Fifengine - Isometric Game Engine";    Types: full fife-only
;Name: fifengine;       Description: "[fifengine] Fifengine - Isometric Game Engine";    Types: full fife-only fife-demos
Name: dependencies;    Description: "[fifengine] Dependencies";                         Types: full;
;Name: demos;           Description: "[fifengine] Demos";                                Types: full fife-demos
Name: cmake;           Description: "[build tools] CMake - build system";               Types: full build-tools
Name: "Python";        Description: "[build tools] Python - programming language";
Name: "Python\py27";   Description: "[build tools] Python v2.7";                        Types: full build-tools; Flags: exclusive
Name: "Python\py35";   Description: "[build tools] Python v3.5";                        Types: full build-tools; Flags: exclusive
Name: swig;            Description: "[build tools] SWIG - interface generator";         Types: full build-tools;

[Files]
Source: "..\repackage\fifengine-includes\*";    DestDir: "{app}\fifengine-includes";    Flags: recursesubdirs ignoreversion; Components: dependencies
Source: "..\repackage\cmake\*";                 DestDir: "{app}\cmake";                 Flags: recursesubdirs ignoreversion; Components: cmake
Source: "..\repackage\swig\*";                  DestDir: "{app}\swig";                  Flags: recursesubdirs ignoreversion; Components: swig
; include Python from Appveyor
; https://www.appveyor.com/docs/installed-software/#python
Source: "C:\Python27\*";                        DestDir: "{app}\python";                Flags: recursesubdirs ignoreversion; Components: "Python\py27"
Source: "C:\Python35\*";                        DestDir: "{app}\python";                Flags: recursesubdirs ignoreversion; Components: "Python\py35"
; Fifengine below Python, because we are installing the python library into the Python installation folder
Source: "..\repackage\libfife.win32-py2.7.msi"; DestDir: "{app}\libfife";               Flags: recursesubdirs;               Components: fifengine

; Define items to run automatically on installation...
[Run]
; install "libfife for python2.7" only when "python27" and "fifengine" are selected
; install silently into the target dir
Filename: "msiexec.exe"; WorkingDir: "{app}\libfife"; Parameters: "/i libfife.win32-py2.7.msi TARGETDIR=""{app}\python"" /qn"; StatusMsg: "Installing libFife for Python2.7"; Components: Python\py27 and fifengine

; Define items to run automatically on un-installation...
[UninstallRun]
; un-install "libfife"
Filename: "msiexec.exe"; WorkingDir: "{app}\libfife"; Parameters: "/x libfife.win32-py2.7.msi /qn"; StatusMsg: "Uninstalling libFife for Python2.7"; Flags: runascurrentuser runhidden

[Registry]
; A registry change needs the following directive: [SETUP] ChangesEnvironment=yes
; add path to python
Root: HKCU; Subkey: "Environment"; ValueType:string; ValueName:"PATH"; ValueData:"{olddata};{app}\python"; Flags: preservestringtype; Check: NeedsAddPath(ExpandConstant('{app}\python')); Components: Python\py27 or Python\py35;
; add path to libfife
Root: HKCU; Subkey: "Environment"; ValueType:string; ValueName:"PATH"; ValueData:"{olddata};{app}\python\Lib\site-packages\fife"; Flags: preservestringtype; Check: NeedsAddPath(ExpandConstant('{app}\python\Lib\site-packages\fife')); Components: fifengine;

[Code]
// modification and path lookup helper for env PATH
#include "includes\envpath.iss"

procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
var
  appDir: string;
begin
  appDir := ExpandConstant('{app}');
  // finally, remove paths from the ENV path
  if (CurUninstallStep = usPostUninstall) then begin
     RemovePathFromEnvironmentPath(appDir + '\python');
     RemovePathFromEnvironmentPath(appDir + '\python\Lib\site-packages\fife');
     RemovePathFromEnvironmentPath(appDir);
  end;
end;

;
;          _\|/_
;          (o o)
; +-----oOO-{_}-OOo------------------------------------------------------+
; |                                                                      |
; |  Flexible Isometric Free Engine - Inno Setup Script File             |
; |  -------------------------------------------------------             |
; |                                                                      |
; |  Author:   Jens A. Koch <jakoch@web.de>                              |
; |  License:  MIT                                                       |
; |                                                                      |
; |  For the full copyright and license information, please view         |
; |  the LICENSE file that was distributed with this source code.        |
; |                                                                      |
; |  Note for developers                                                 |
; |  -------------------                                                 |
; |  A good resource for developing and understanding                    |
; |  Inno Setup Script files is the official "Inno Setup Help".          |
; |  Website:  http://jrsoftware.org/ishelp/index.php                    |
; |                                                                      |
; +---------------------------------------------------------------------<3

; version is set here, when the version isn't passed to the compiler on invocation
#ifndef APP_VERSION
#define APP_VERSION          "0.0.1"
#endif

#define APP_NAME             "FifeSDK"
#define APP_COMPILER         "VC14"
#define APP_PUBLISHER        "FIFE Team"
#define APP_URL              "http://fifengine.net/"
#define APP_SUPPORT_URL      "https://github.com/fifengine/fifengine/issues"
#define COPYRIGHT_YEAR        GetDateTimeString('yyyy', '', '');

[Setup]
AppId={{8A27DF0C-689B-4B76-8BFC-AFCDD90C1A31}

; set application meta-data
AppName={#APP_NAME}
AppVerName={#APP_NAME} {#APP_VERSION}
AppVersion={#APP_VERSION}
AppCopyright=© {#APP_PUBLISHER}
AppPublisher={#APP_PUBLISHER}
AppPublisherURL={#APP_URL}
AppSupportURL={#APP_SUPPORT_URL}
AppUpdatesURL={#APP_URL}

; default installation folder is "c:\fife". users might change this via dialog.
DefaultDirName={pf}\FIFE\
DefaultGroupName={#APP_NAME}
DirExistsWarning=No
EnableDirDoesntExistWarning=Yes
AllowNoIcons=yes

; compression
Compression=lzma2/ultra
LZMAUseSeparateProcess=yes
LZMANumBlockThreads=2
InternalCompressLevel=max
SolidCompression=true

; style
WizardImageFile=images\WizardImage.bmp
WizardSmallImageFile=images\WizardSmallImage.bmp
SetupIconFile=images\fife.ico

; this creates the installer executable in the build folder
; for example: "_build\FifeSDK-0.4.0-Setup-VC14-x86.exe"
OutputBaseFilename={#APP_NAME}-{#APP_VERSION}-Setup-{#APP_COMPILER}-x86
OutputDir=..\_build

; disable wizard pages: Welcome (by default), Ready
DisableReadyPage=yes

; enable wizard pages: Select Destination Location
DisableDirPage=no

; Tell Windows Explorer to reload the environment, because Registry change (env PATH change)
ChangesEnvironment=yes

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

; Define the types of installations
; The user gets a drop-down list to select one of these types.
; Selecting a type will selected a set of components.
[Types]
Name: "full";          Description: "Full installation (build-tools, engine, dependencies, demos, tools)"
Name: "build-tools";   Description: "Build-tools only (CMake, Python, Boost, Swig)"
Name: "fife-only";     Description: "Engine only"
;Name: "fife-demos";    Description: "Engine and Demos"
Name: "custom";        Description: "Custom installation"; Flags: iscustom

; Define components to install
[Components]
Name: fifengine;       Description: "[fifengine] Fifengine - Isometric Game Engine";    Types: full fife-only
;Name: fifengine;       Description: "[fifengine] Fifengine - Isometric Game Engine";    Types: full fife-only fife-demos
Name: dependencies;    Description: "[fifengine] Dependencies";                         Types: full;
;Name: demos;           Description: "[fifengine] Demos";                                Types: full fife-demos
Name: cmake;           Description: "[build tools] CMake - build system";               Types: full build-tools
Name: "Python";        Description: "[build tools] Python - programming language";
Name: "Python\py27";   Description: "[build tools] Python v2.7";                        Types: full build-tools; Flags: exclusive
Name: "Python\py35";   Description: "[build tools] Python v3.5";                        Types: full build-tools; Flags: exclusive
Name: swig;            Description: "[build tools] SWIG - interface generator";         Types: full build-tools;

[Files]
Source: "..\repackage\fifengine-includes\*";    DestDir: "{app}\fifengine-includes";    Flags: recursesubdirs ignoreversion; Components: dependencies
Source: "..\repackage\cmake\*";                 DestDir: "{app}\cmake";                 Flags: recursesubdirs ignoreversion; Components: cmake
Source: "..\repackage\swig\*";                  DestDir: "{app}\swig";                  Flags: recursesubdirs ignoreversion; Components: swig
; include Python from Appveyor
; https://www.appveyor.com/docs/installed-software/#python
Source: "C:\Python27\*";                        DestDir: "{app}\python";                Flags: recursesubdirs ignoreversion; Components: "Python\py27"
Source: "C:\Python35\*";                        DestDir: "{app}\python";                Flags: recursesubdirs ignoreversion; Components: "Python\py35"
; Fifengine below Python, because we are installing the python library into the Python installation folder
Source: "..\repackage\libfife.win32-py2.7.msi"; DestDir: "{app}\libfife";               Flags: recursesubdirs;               Components: fifengine

; Define items to run automatically on installation...
[Run]
; install "libfife for python2.7" only when "python27" and "fifengine" are selected
; install silently into the target dir
Filename: "msiexec.exe"; WorkingDir: "{app}\libfife"; Parameters: "/i libfife.win32-py2.7.msi" TARGETDIR=""{app}\python"" /qn"; StatusMsg: "Installing libFife for Python2.7"; Components: Python\py27 and fifengine

; Define items to run automatically on un-installation...
[UninstallRun]
; un-install "libfife"
Filename: "msiexec.exe"; WorkingDir: "{app}\libfife"; Parameters: "/x libfife.win32-py2.7.msi" /qn"; StatusMsg: "Uninstalling libFife for Python2.7"; Flags: runascurrentuser runhidden

[Registry]
; A registry change needs the following directive: [SETUP] ChangesEnvironment=yes
; add path to python
Root: HKCU; Subkey: "Environment"; ValueType:string; ValueName:"PATH"; ValueData:"{olddata};{app}\python"; Flags: preservestringtype; Check: NeedsAddPath(ExpandConstant('{app}\python')); Components: Python\py27 or Python\py35;
; add path to libfife
Root: HKCU; Subkey: "Environment"; ValueType:string; ValueName:"PATH"; ValueData:"{olddata};{app}\python\Lib\site-packages\fife"; Flags: preservestringtype; Check: NeedsAddPath(ExpandConstant('{app}\python\Lib\site-packages\fife')); Components: fifengine;

[Code]
// modification and path lookup helper for env PATH
#include "includes\envpath.iss"

procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
var
  appDir: string;
begin
  appDir := ExpandConstant('{app}');
  // finally, remove paths from the ENV path
  if (CurUninstallStep = usPostUninstall) then begin
     RemovePathFromEnvironmentPath(appDir + '\python');
     RemovePathFromEnvironmentPath(appDir + '\python\Lib\site-packages\fife');
     RemovePathFromEnvironmentPath(appDir);
  end;
end;


Changed default portable install dir to C:\BCUninstaller

[Setup]
Uninstallable=not IsPortable()
DisableProgramGroupPage=no

[CustomMessages]
InstallPortableTitle =Portable Installation
pl.InstallPortableTitle =Instalacja przenośna
de.InstallPortableTitle =Tragbar Installation
fr.InstallPortableTitle =Installation Portable
hu.InstallPortableTitle =Portable telepítés
sl.InstallPortableTitle =Prenosna namestitev
nl.InstallPortableTitle =Portabele installatie
es.InstallPortableTitle =Instalación portable
bpt.InstallPortableTitle =Instalação Portátil

InstallTypeChoiceTitle =Installation type
pl.InstallTypeChoiceTitle =Typ instalacji
de.InstallTypeChoiceTitle =Installationstyp
fr.InstallTypeChoiceTitle =Type d'installation
hu.InstallTypeChoiceTitle =Telepítési típus
sl.InstallTypeChoiceTitle =Vrsta namestitve
nl.InstallTypeChoiceTitle =Installatie type
es.InstallTypeChoiceTitle =Tipo de instalación
bpt.InstallTypeChoiceTitle =Tipo Instalação

InstallStandardTitle =Standard Installation
pl.InstallStandardTitle =Instalacja standardowa
de.InstallStandardTitle =Standardinstallation
fr.InstallStandardTitle =Installation Standard
hu.InstallStandardTitle =Szabványos telepítés
sl.InstallStandardTitle =Standardna namestitev
nl.InstallStandardTitle =Standaad installatie
es.InstallStandardTitle =Instalación estándar
bpt.InstallStandardTitle =Instalação Padrão

InstallPortableInfo =Portable installation will not register itself in the system, it will only extract files to the specified directory. You can set the directory to anything you''d like, for example to a USB drive. You will be able to move this directory freely since the whole app is inside of it.
pl.InstallPortableInfo =Instalacja przenośna nie zostanie zarejestrowana w systemie, zostaną tylko wypakowane pliki. Pliki mogą zostać wypakowane do dowolnego folderu i mogą być bez problemu przenoszone. Wszystkie pliki używane przez tą aplikację będą przechowywane w wybranym folderze.
de.InstallPortableInfo =Die Portable Installation registriert sich nicht selbst im System, es werden nur Dateien in das angegebene Verzeichnis entpackt. Sie können das Verzeichnis beliebig festlegen, z.B. auf einem USB-Laufwerk. Dieses Verzeichnis können Sie frei verschieben, da darin die gesamte Anwendung ist.
fr.InstallPortableInfo =L'installation Portable ne s'enregistrera pas elle-même dans le système, elle extraira seulement les fichiers dans le dossier spécifié. Vous pouvez placer le dossier sur tout ce que vous souhaitez, par exemple sur un lecteur USB. Vous pourrez déplacer librement ce dossier du moment que l'application complète se trouve à l'intérieur.
hu.InstallPortableInfo =A hordozható telepítés esetén a program nem jegyzi ba magát a rendszerbe, a fájljai csak kicsomagolásra kerülnek a megadott könyvtárba. Ez a könyvtár bárhol lehet, akár egy USB meghajtón is. Ezzel a könyvtárat bárhova magával viheti, mivel az az egész alkalmazást tartalmazza.
sl.InstallPortableInfo =Prenosna namestitev se ne bo prijavila v sistem, ampak bo samo izpisala datoteke v doloceni imenik. Imenik lahko nastavite na vse, kar vam je všec, na primer na pogon USB. Ta imenik boste lahko prosto premaknili, saj je celotna aplikacija znotraj nje.
nl.InstallPortableInfo =Portabele installatie registreert zich zelf niet in het systeem, het pakt alleen bestanden uit in de opgegeven map. U kunt naar eigen voorkeur een map opgeven, bijvoorbeeld op een USB schijf. Het is mogelijk om deze map later te verplaatsen, omdat daarin het hele programma zit.
es.InstallPortableInfo =La instalación portable no se registrará en el sistema, sólo extrae los archivos al directorio especificado. Puede colocarlo en cualquier sitio, por ejemplo en una unidad USB. Podrá moverlo libremente ya que la aplicación está dentro del directorio.
bpt.InstallPortableInfo =A instalação portátil não se registrará no sistema, ela só extrairá arquivos para o diretório especificado. Você pode configurar o diretório para qualquer coisa que você gostaria, por exemplo, para uma unidade USB. Você poderá mover este diretório livremente, já que todo o aplicativo está dentro dele.

InstallStandardInfo =This option will install BCUninstaller on your computer as a normal application. Standard uninstaller will be created and it will be visible under "Programs and Features" as well as in other third-party uninstallers.
pl.InstallStandardInfo =Ta aplikacja zostanie zainstalowana i zarejestrowana w tym systemie. Zostanie stworzony deinstalator i będzie on widoczny w panelu sterowania i innych deinstalatorach.
de.InstallStandardInfo =Diese Option installiert BCUninstaller auf Ihrem Computer als normale Anwendung. Ein normales Deinstallationsprogramm wird erstellt, und der Eintrag wird unter "Programme und Features" ebenso wie in anderen Drittanbieter-Uninstallern angezeigt.
fr.InstallStandardInfo =Cette option installera BCUninstaller sur votre ordinateur comme une application normale. Un désinstalleur standard sera créé et sera visible sous "Programmes et Fonctionnalités" aussi bien que pour tout autre désinstalleur tiers.
hu.InstallStandardInfo =Ezzel a lehetõséggel úgy kerül telepítésre a BCUninstaller, mint egy normál alkalmazás. A szabványos eltávolítója megtalálható lesz a "Programok és szolgáltatások" ablakban, valamint az egyéb eltávolítókban.
sl.InstallStandardInfo =Ta možnost bo BCUninstaller namestila v racunalnik kot obicajno aplikacijo. Ustvarjen bo standardni odstranjevalec, ki bo viden v razdelku  "Programi in funkcije", kot tudi v drugih odstranjevalcih  tretjih avtorjev.
nl.InstallStandardInfo =Deze optie installeert BCUnistaller op uw computer als een normaal programma. Er wordt een standaard uninstaller gecreëerd en deze wordt zichtbaar onder "Programma's en Features" net zoals in andere derde-partij uninstallers.
es.InstallStandardInfo =Esta opción instalará BCUninstaller en su equipo como una aplicación normal. Se creará un desinstalador estándar y estará visible en "Programas y características", así como otros desinstaladores de terceros.
bpt.InstallStandardInfo =Esta opção irá instalar o BCUninstaller em seu computador como um aplicativo normal. O desinstalador padrão será criado e estará visível em "Programas e recursos", bem como em outros desinstaladores de terceiros.

[Code]
var
  CustomPage: TWizardPage;
  StandardDescLabel: TLabel;
  {*StandardRadioButton: TNewRadioButton;
  AdvancedRadioButton: TNewRadioButton;    *}
  AdvancedDescLabel: TLabel;
  StandardRadioButton: TNewRadioButton;
  AdvancedRadioButton: TNewRadioButton;

function IsPortable(): Boolean;
begin
  if(StandardRadioButton.Checked = True) then
  Result := False
  else
  Result := True;
end;
function IsNotPortable(): Boolean;
begin
  if(StandardRadioButton.Checked = True) then
  Result := True
  else
  Result := False;
end;

procedure InitializeWizard;

begin
  CustomPage := CreateCustomPage(wpWelcome, CustomMessage('InstallTypeChoiceTitle'), '');
  StandardRadioButton := TNewRadioButton.Create(WizardForm);
  StandardRadioButton.Parent := CustomPage.Surface;
  StandardRadioButton.Checked := True;
  StandardRadioButton.Top := 16;
  StandardRadioButton.Width := CustomPage.SurfaceWidth;
  StandardRadioButton.Font.Style := [fsBold];
  StandardRadioButton.Font.Size := 9;
  StandardRadioButton.Caption := CustomMessage('InstallStandardTitle');
  StandardDescLabel := TLabel.Create(WizardForm);
  StandardDescLabel.Parent := CustomPage.Surface;
  StandardDescLabel.Left := 8;
  StandardDescLabel.Top := StandardRadioButton.Top + StandardRadioButton.Height + 8;
  StandardDescLabel.Width := CustomPage.SurfaceWidth - 10;
  StandardDescLabel.Height := 60;
  StandardDescLabel.AutoSize := False;
  StandardDescLabel.Wordwrap := True;
  StandardDescLabel.Caption := CustomMessage('InstallStandardInfo');
  AdvancedRadioButton := TNewRadioButton.Create(WizardForm);
  AdvancedRadioButton.Parent := CustomPage.Surface;
  AdvancedRadioButton.Top := StandardDescLabel.Top + StandardDescLabel.Height + 16;
  AdvancedRadioButton.Width := CustomPage.SurfaceWidth;
  AdvancedRadioButton.Font.Style := [fsBold];
  AdvancedRadioButton.Font.Size := 9;
  AdvancedRadioButton.Caption := CustomMessage('InstallPortableTitle');
  AdvancedDescLabel := TLabel.Create(WizardForm);
  AdvancedDescLabel.Parent := CustomPage.Surface;
  AdvancedDescLabel.Left := 8;
  AdvancedDescLabel.Top := AdvancedRadioButton.Top + AdvancedRadioButton.Height + 8;
  AdvancedDescLabel.Width := CustomPage.SurfaceWidth - 10;
  AdvancedDescLabel.Height := 60;
  AdvancedDescLabel.AutoSize := False;
  AdvancedDescLabel.Wordwrap := True;
  AdvancedDescLabel.Caption := CustomMessage('InstallPortableInfo');
end;

function ShouldSkipPage(PageID: Integer): Boolean;
begin
  // initialize result to not skip any page (not necessary, but safer)
  Result := False;

  if PageID = wpSelectProgramGroup then
    Result := IsPortable();
end;

procedure CurPageChanged(CurPageID: Integer);
begin
  // Change the default install path if user selected portable install
  if CurPageID = wpLicense then begin
    if(AdvancedRadioButton.Checked = True) then
      WizardForm.DirEdit.Text := ExpandConstant('{sd}\{#MyAppName}');
  end;
end;


only include HTML, not DocBook, docs files in Windows installer

git-svn-id: bd2c15cabedda08daa94fbf2043b3f8588072843@1254 34294538-1d18-489e-82e9-bb8ff975a0eb

; This script was first created by ISTool
; http://www.lerstad.com/istool/

#define VERSION          "0.2.3"

[Setup]
OutputBaseFilename=bakefile-{#VERSION}-setup
AppName=Bakefile
AppVerName=Bakefile {#VERSION}

ChangesAssociations=false
AlwaysShowComponentsList=true
SourceDir=.
DefaultDirName={pf}\Bakefile

DefaultGroupName=Bakefile
AllowNoIcons=true

OutputDir=.

Compression=lzma/ultra64

WindowShowCaption=true
WindowStartMaximized=false
FlatComponentsList=true
WindowResizable=false
ShowTasksTreeLines=false
DisableProgramGroupPage=true
LicenseFile=COPYING
SolidCompression=true
InternalCompressLevel=ultra64
ShowLanguageDialog=no
VersionInfoVersion={#VERSION}
PrivilegesRequired=none
AppSupportURL=http://www.bakefile.org
AppUpdatesURL=http://www.bakefile.org/download.html
AppVersion={#VERSION}
AppID={{AD092360-A98A-4CDC-BDAA-5CB09C593AC2}
AppContact=http://www.bakefile.org/wiki
UninstallDisplayName=Bakefile
ChangesEnvironment=true
UninstallFilesDir={app}\uninst

[Files]
Source: bakefile.exe; DestDir: {app}; Components: base
Source: bakefile_gen.exe; DestDir: {app}; Components: base
Source: src\*.py; DestDir: {app}\src; Components: base
Source: src\*.pyd; DestDir: {app}\src; Components: base
Source: src\empy\*; DestDir: {app}\src\empy; Flags: recursesubdirs; Components: base
Source: autoconf\*; DestDir: {app}\autoconf; Flags: recursesubdirs; Components: base
Source: rules\*; DestDir: {app}\rules; Flags: recursesubdirs; Components: base
Source: presets\*; DestDir: {app}\presets; Flags: recursesubdirs; Components: base
Source: output\*; DestDir: {app}\output; Flags: recursesubdirs; Components: base
Source: tests\*; DestDir: {app}\tests; Flags: recursesubdirs; Components: tests
Source: schema\*; DestDir: {app}\schema; Flags: recursesubdirs; Components: base
Source: doc\html\*; DestDir: {app}\doc; Flags: recursesubdirs; Components: doc
Source: py-runtime\*; DestDir: {app}; Flags: recursesubdirs; Components: python
Source: README; DestDir: {app}; Components: base
Source: NEWS; DestDir: {app}; Components: base; AfterInstall: InstallSetupPath
Source: THANKS; DestDir: {app}; Components: base
Source: COPYING; DestDir: {app}; Components: base
Source: AUTHORS; DestDir: {app}; Components: base

[Registry]

[Icons]

[Run]

[_ISTool]
EnableISX=true
UseAbsolutePaths=false

[Dirs]

[_ISToolPreCompile]

[Components]
Name: base; Description: Bakefile code; Flags: fixed; Types: custom compact full
Name: python; Description: Python runtime; Flags: fixed; Types: custom compact full
Name: doc; Description: Documentation; Types: custom full
Name: tests; Description: Tests and examples; Types: custom full

[Messages]
BeveledLabel=Bakefile

[InstallDelete]
; these are deprecated files from older Bakefile versions; some of
; them are just useless junk, some (datafiles, gettext) would cause
; conflicts and break Bakefile
Name: {app}\rules\datafiles.bkl; Type: files
Name: {app}\rules\gettext; Type: filesandordirs
Name: {app}\src\bakefile.exe; Type: files
Name: {app}\src\bakefile_gen.exe; Type: files
Name: {app}\src\python*; Type: files
Name: {app}\src\w9xpopen.exe; Type: files
Name: {app}\src\lib; Type: filesandordirs
Name: {app}\src\DLLs; Type: filesandordirs
Name: {app}\src\py25modules; Type: filesandordirs

[UninstallDelete]
Name: {app}\src; Type: filesandordirs
Name: {app}\output; Type: filesandordirs
Name: {app}\lib; Type: filesandordirs

[Tasks]
Name: addpath; Description: Add Bakefile to PATH environment variable; Flags: checkedonce

[Code]
// -----------------------------------------------------------------
//                    code for changing PATH
// -----------------------------------------------------------------

//
// Inno Setup Extensions Knowledge Base
// Article 44 - Native ISX procedures for PATH modification
// http://www13.brinkster.com/vincenzog/isxart.asp?idart=44
// Author: Thomas Vedel
//

// Version log:
// 03/31/2003: Initial release (thv@lr.dk)

const
  // Modification method
  pmAddToBeginning = $1;      // Add dir to beginning of Path
  pmAddToEnd = $2;            // Add dir to end of Path
  pmAddAllways = $4;          // Add also if specified dir is already included in existing path
  pmAddOnlyIfDirExists = $8;  // Add only if specified dir actually exists
  pmRemove = $10;             // Remove dir from path
  pmRemoveSubdirsAlso = $20;  // Remove dir and all subdirs from path

  // Scope
  psCurrentUser = 1;          // Modify path for current user
  psAllUsers = 2;             // Modify path for all users

  // Error results
  mpOK = 0;                   // No errors
  mpMissingRights = -1;       // User has insufficient rights
  mpAutoexecNoWriteacc = -2;  // Autoexec can not be written (may be readonly)
  mpBothAddAndRemove = -3;    // User has specified that dir should both be removed from and added to path

{ Helper procedure: Split a path environment variable into individual dirnames }
procedure SplitPath(Path: string; var Dirs: TStringList);
var
  pos: integer;
  s: string;
begin
  Dirs.Clear;
  s := '';
  pos := 1;
  while (pos<=Length(Path)) do
  begin
    if (Path[pos]<>';') then
      s := s + Path[pos];
    if ((Path[pos]=';') or (pos=Length(Path))) then
    begin
      s := Trim(s);
      s := RemoveQuotes(s);
      s := Trim(s);
      if (s <> '') then
        Dirs.Add(s);
      s := '';
    end;
    Pos := Pos + 1;
  end;
end; // procedure SplitPath

{ Helper procedure: Concatenate individual dirnames into a path environment variable }
procedure ConcatPath(Dirs: TStringList; Quotes: boolean; var Path: string);
var
  Index, MaxIndex: integer;
  s: string;
begin
  MaxIndex := Dirs.Count-1;
  Path := '';
  for Index := 0 to MaxIndex do
  begin
    s := Dirs.Strings[Index];
    if ((Quotes) and (pos(' ',s) > 0)) then
      s := AddQuotes(s);
    Path := Path + s;
    if (Index < MaxIndex) then
      Path := Path + ';'
  end;
end; // procedure ConcatPath

{ Helper function: Modifies path environment string }
procedure ModifyPathString(OldPath, DirName: string; Method: integer; Quotes: boolean; var ResultPath: string);
var
  Dirs: TStringList;
  DirNotInPath: Boolean;
  i: integer;
begin
  // Create Dirs variable
  Dirs := TStringList.Create;

  // Remove quotes form DirName
  DirName := Trim(DirName);
  DirName := RemoveQuotes(DirName);
  DirName := Trim(DirName);

  // Split old path in individual directory names
  SplitPath(OldPath, Dirs);

  // Check if dir is allready in path
  DirNotInPath := True;
  for i:=Dirs.Count-1 downto 0 do
  begin
    if (uppercase(Dirs.Strings[i]) = uppercase(DirName)) then
      DirNotInPath := False;
  end;

  // Should dir be removed from existing Path?
  if ((Method and (pmRemove or pmRemoveSubdirsAlso)) > 0) then
  begin
    for i:=Dirs.Count-1 downto 0 do
    begin
      if (((Method and pmRemoveSubdirsAlso) > 0) and (pos(uppercase(DirName)+'\', uppercase(Dirs.Strings[i])) = 1)) or
         (((Method and (pmRemove) or (pmRemoveSubdirsAlso)) > 0) and (uppercase(DirName) = uppercase(Dirs.Strings[i])))
      then
        Dirs.Delete(i);
    end;
  end;

  // Should dir be added to existing Path?
  if ((Method and (pmAddToBeginning or pmAddToEnd)) > 0) then
  begin
    // Add dir to path
    if (((Method and pmAddAllways) > 0) or DirNotInPath) then
    begin
      // Dir is not in path allready or should be added anyway
      if (((Method and pmAddOnlyIfDirExists) = 0) or (DirExists(DirName))) then
      begin
        // Dir actually exsists or should be added anyway
        if ((Method and pmAddToBeginning) > 0) then
          Dirs.Insert(0, DirName)
        else
          Dirs.Append(DirName);
      end;
    end;
  end;

  // Concatenate directory names into one single path variable
  ConcatPath(Dirs, Quotes, ResultPath);
  // Finally free Dirs object
  Dirs.Free;
end; // ModifyPathString

{ Helper function: Modify path on Windows 9x }
function ModifyPath9x(DirName: string; Method: integer): integer;
var
  AutoexecLines: TStringList;
  ActualLine: String;
  PathLineNos: TStringList;
  FirstPathLineNo: Integer;
  OldPath, ResultPath: String;
  LineNo, CharNo, Index: integer;

  TempString: String;
begin
  // Expect everything to be OK
  result := mpOK;

  // Create stringslists
  AutoexecLines := TStringList.Create;
  PathLineNos := TStringList.Create;

  // Read existing path
  OldPath := '';
  LoadStringFromFile('c:\Autoexec.bat', TempString);
  AutoexecLines.Text := TempString;
  PathLineNos.Clear;
  // Read Autoexec line by line
  for LineNo := 0 to AutoexecLines.Count - 1 do begin
    ActualLine := AutoexecLines.Strings[LineNo];
    // Check if line starts with "PATH=" after first stripping spaces and other "fill-chars"
    if Pos('=', ActualLine) > 0 then
    begin
      for CharNo := Pos('=', ActualLine)-1 downto 1 do
        if (ActualLine[CharNo]=' ') or (ActualLine[CharNo]=#9) then
          Delete(ActualLine, CharNo, 1);
      if Pos('@', ActualLine) = 1 then
        Delete(ActualLine, 1, 1);
      if (Pos('PATH=', uppercase(ActualLine))=1) or (Pos('SETPATH=', uppercase(ActualLine))=1) then
      begin
        // Remove 'PATH=' and add path to "OldPath" variable
        Delete(ActualLine, 1, pos('=', ActualLine));
        // Check if an earlier PATH variable is referenced, but there has been no previous PATH defined in Autoexec
        if (pos('%PATH%',uppercase(ActualLine))>0) and (PathLineNos.Count=0) then
          OldPath := ExpandConstant('{win}') + ';' + ExpandConstant('{win}')+'\COMMAND';
        if (pos('%PATH%',uppercase(ActualLine))>0) then
        begin
          ActualLine := Copy(ActualLine, 1, pos('%PATH%',uppercase(ActualLine))-1) +
                        OldPath +
                        Copy(ActualLine, pos('%PATH%',uppercase(ActualLine))+6, Length(ActualLine));
        end;
        OldPath := ActualLine;

        // Update list of line numbers holding path variables
        PathLineNos.Add(IntToStr(LineNo));
      end;
    end;
  end;

  // Save first line number in Autoexec.bat which modifies path environment variable
  if PathLineNos.Count > 0 then
    FirstPathLineNo := StrToInt(PathLineNos.Strings[0])
  else
    FirstPathLineNo := 0;

  // Modify path
  ModifyPathString(OldPath, DirName, Method, True, ResultPath);

  // Write Modified path back to Autoexec.bat
  // First delete all existing path references from Autoexec.bat
  Index := PathLineNos.Count-1;
  while (Index>=0) do
  begin
    AutoexecLines.Delete(StrToInt(PathLineNos.Strings[Index]));
    Index := Index-1;
  end;
  // Then insert new path variable into Autoexec.bat
  AutoexecLines.Insert(FirstPathLineNo, '@PATH='+ResultPath);
  // Delete old Autoexec.bat from disk
  if not DeleteFile('c:\Autoexec.bat') then
    result := mpAutoexecNoWriteAcc;
  Sleep(500);
  // And finally write Autoexec.bat back to disk
  if not (result=mpAutoexecNoWriteAcc) then
    SaveStringToFile('c:\Autoexec.bat', AutoexecLines.Text, false);

  // Free stringlists
  PathLineNos.Free;
  AutoexecLines.Free;
end; // ModifyPath9x

{ Helper function: Modify path on Windows NT, 2000 and XP }
function ModifyPathNT(DirName: string; Method, Scope: integer): integer;
var
  RegRootKey: integer;
  RegSubKeyName: string;
  RegValueName: string;
  OldPath, ResultPath: string;
  OK: boolean;
begin
  // Expect everything to be OK
  result := mpOK;

  // Initialize registry key and value names to reflect if changes should be global or local to current user only
  case Scope of
    psCurrentUser:
      begin
        RegRootKey := HKEY_CURRENT_USER;
        RegSubKeyName := 'Environment';
        RegValueName := 'Path';
      end;
    psAllUsers:
      begin
        RegRootKey := HKEY_LOCAL_MACHINE;
        RegSubKeyName := 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment';
        RegValueName := 'Path';
      end;
  end;

  // Read current path value from registry
  OK := RegQueryStringValue(RegRootKey, RegSubKeyName, RegValueName, OldPath);
  if not OK then
  begin
    result := mpMissingRights;
    Exit;
  end;

  // Modify path
  ModifyPathString(OldPath, DirName, Method, False, ResultPath);

  // Write new path value to registry
  if not RegWriteStringValue(RegRootKey, RegSubKeyName, RegValueName, ResultPath) then
  begin
    result := mpMissingRights;
    Exit;

  end;
end; // ModifyPathNT

{ Main function: Modify path }
function ModifyPath(Path: string; Method, Scope: integer): integer;
begin
  // Check if both add and remove has been specified (= error!)
  if (Method and (pmAddToBeginning or pmAddToEnd) and (pmRemove or pmRemoveSubdirsAlso)) > 0 then
  begin
    result := mpBothAddAndRemove;
    Exit;
  end;

  // Perform directory constant expansion
  Path := ExpandConstantEx(Path, ' ', ' ');

  // Test if Win9x
  if InstallOnThisVersion('4,0','0,0') = irInstall then
    ModifyPath9x(Path, Method);

  // Test if WinNT, 2000 or XP
  if InstallOnThisVersion('0,4','0,0') = irInstall then
    ModifyPathNT(Path, Method, Scope);
end; // ModifyPath

// -----------------------------------------------------------------
//                     install script hooks
// -----------------------------------------------------------------

procedure SetupPATH;
var
  p : string;
  scope : integer;
begin
  p:= ExpandConstant('{app}');
  if IsAdminLoggedOn then
    scope:= psAllUsers
  else
    scope:= psCurrentUser;
  ModifyPath(p, pmAddToEnd, scope);
end;

procedure InstallSetupPath;
begin
    if IsTaskSelected('addpath') then
		SetupPATH;
end;

; This script was first created by ISTool
; http://www.lerstad.com/istool/

#define VERSION          "0.2.3"

[Setup]
OutputBaseFilename=bakefile-{#VERSION}-setup
AppName=Bakefile
AppVerName=Bakefile {#VERSION}

ChangesAssociations=false
AlwaysShowComponentsList=true
SourceDir=.
DefaultDirName={pf}\Bakefile

DefaultGroupName=Bakefile
AllowNoIcons=true

OutputDir=.

Compression=lzma/ultra64

WindowShowCaption=true
WindowStartMaximized=false
FlatComponentsList=true
WindowResizable=false
ShowTasksTreeLines=false
DisableProgramGroupPage=true
LicenseFile=COPYING
SolidCompression=true
InternalCompressLevel=ultra64
ShowLanguageDialog=no
VersionInfoVersion={#VERSION}
PrivilegesRequired=none
AppSupportURL=http://www.bakefile.org
AppUpdatesURL=http://www.bakefile.org/download.html
AppVersion={#VERSION}
AppID={{AD092360-A98A-4CDC-BDAA-5CB09C593AC2}
AppContact=http://www.bakefile.org/wiki
UninstallDisplayName=Bakefile
ChangesEnvironment=true
UninstallFilesDir={app}\uninst

[Files]
Source: bakefile.exe; DestDir: {app}; Components: base
Source: bakefile_gen.exe; DestDir: {app}; Components: base
Source: src\*.py; DestDir: {app}\src; Components: base
Source: src\*.pyd; DestDir: {app}\src; Components: base
Source: src\empy\*; DestDir: {app}\src\empy; Flags: recursesubdirs; Components: base
Source: autoconf\*; DestDir: {app}\autoconf; Flags: recursesubdirs; Components: base
Source: rules\*; DestDir: {app}\rules; Flags: recursesubdirs; Components: base
Source: presets\*; DestDir: {app}\presets; Flags: recursesubdirs; Components: base
Source: output\*; DestDir: {app}\output; Flags: recursesubdirs; Components: base
Source: tests\*; DestDir: {app}\tests; Flags: recursesubdirs; Components: tests
Source: schema\*; DestDir: {app}\schema; Flags: recursesubdirs; Components: base
Source: doc\*; DestDir: {app}\doc; Flags: recursesubdirs; Components: doc
Source: py-runtime\*; DestDir: {app}; Flags: recursesubdirs; Components: python
Source: README; DestDir: {app}; Components: base
Source: NEWS; DestDir: {app}; Components: base; AfterInstall: InstallSetupPath
Source: THANKS; DestDir: {app}; Components: base
Source: COPYING; DestDir: {app}; Components: base
Source: AUTHORS; DestDir: {app}; Components: base

[Registry]

[Icons]

[Run]

[_ISTool]
EnableISX=true
UseAbsolutePaths=false

[Dirs]

[_ISToolPreCompile]

[Components]
Name: base; Description: Bakefile code; Flags: fixed; Types: custom compact full
Name: python; Description: Python runtime; Flags: fixed; Types: custom compact full
Name: doc; Description: Documentation; Types: custom full
Name: tests; Description: Tests and examples; Types: custom full

[Messages]
BeveledLabel=Bakefile

[InstallDelete]
; these are deprecated files from older Bakefile versions; some of
; them are just useless junk, some (datafiles, gettext) would cause
; conflicts and break Bakefile
Name: {app}\rules\datafiles.bkl; Type: files
Name: {app}\rules\gettext; Type: filesandordirs
Name: {app}\src\bakefile.exe; Type: files
Name: {app}\src\bakefile_gen.exe; Type: files
Name: {app}\src\python*; Type: files
Name: {app}\src\w9xpopen.exe; Type: files
Name: {app}\src\lib; Type: filesandordirs
Name: {app}\src\DLLs; Type: filesandordirs
Name: {app}\src\py25modules; Type: filesandordirs

[UninstallDelete]
Name: {app}\src; Type: filesandordirs
Name: {app}\output; Type: filesandordirs
Name: {app}\lib; Type: filesandordirs

[Tasks]
Name: addpath; Description: Add Bakefile to PATH environment variable; Flags: checkedonce

[Code]
// -----------------------------------------------------------------
//                    code for changing PATH
// -----------------------------------------------------------------

//
// Inno Setup Extensions Knowledge Base
// Article 44 - Native ISX procedures for PATH modification
// http://www13.brinkster.com/vincenzog/isxart.asp?idart=44
// Author: Thomas Vedel
//

// Version log:
// 03/31/2003: Initial release (thv@lr.dk)

const
  // Modification method
  pmAddToBeginning = $1;      // Add dir to beginning of Path
  pmAddToEnd = $2;            // Add dir to end of Path
  pmAddAllways = $4;          // Add also if specified dir is already included in existing path
  pmAddOnlyIfDirExists = $8;  // Add only if specified dir actually exists
  pmRemove = $10;             // Remove dir from path
  pmRemoveSubdirsAlso = $20;  // Remove dir and all subdirs from path

  // Scope
  psCurrentUser = 1;          // Modify path for current user
  psAllUsers = 2;             // Modify path for all users

  // Error results
  mpOK = 0;                   // No errors
  mpMissingRights = -1;       // User has insufficient rights
  mpAutoexecNoWriteacc = -2;  // Autoexec can not be written (may be readonly)
  mpBothAddAndRemove = -3;    // User has specified that dir should both be removed from and added to path

{ Helper procedure: Split a path environment variable into individual dirnames }
procedure SplitPath(Path: string; var Dirs: TStringList);
var
  pos: integer;
  s: string;
begin
  Dirs.Clear;
  s := '';
  pos := 1;
  while (pos<=Length(Path)) do
  begin
    if (Path[pos]<>';') then
      s := s + Path[pos];
    if ((Path[pos]=';') or (pos=Length(Path))) then
    begin
      s := Trim(s);
      s := RemoveQuotes(s);
      s := Trim(s);
      if (s <> '') then
        Dirs.Add(s);
      s := '';
    end;
    Pos := Pos + 1;
  end;
end; // procedure SplitPath

{ Helper procedure: Concatenate individual dirnames into a path environment variable }
procedure ConcatPath(Dirs: TStringList; Quotes: boolean; var Path: string);
var
  Index, MaxIndex: integer;
  s: string;
begin
  MaxIndex := Dirs.Count-1;
  Path := '';
  for Index := 0 to MaxIndex do
  begin
    s := Dirs.Strings[Index];
    if ((Quotes) and (pos(' ',s) > 0)) then
      s := AddQuotes(s);
    Path := Path + s;
    if (Index < MaxIndex) then
      Path := Path + ';'
  end;
end; // procedure ConcatPath

{ Helper function: Modifies path environment string }
procedure ModifyPathString(OldPath, DirName: string; Method: integer; Quotes: boolean; var ResultPath: string);
var
  Dirs: TStringList;
  DirNotInPath: Boolean;
  i: integer;
begin
  // Create Dirs variable
  Dirs := TStringList.Create;

  // Remove quotes form DirName
  DirName := Trim(DirName);
  DirName := RemoveQuotes(DirName);
  DirName := Trim(DirName);

  // Split old path in individual directory names
  SplitPath(OldPath, Dirs);

  // Check if dir is allready in path
  DirNotInPath := True;
  for i:=Dirs.Count-1 downto 0 do
  begin
    if (uppercase(Dirs.Strings[i]) = uppercase(DirName)) then
      DirNotInPath := False;
  end;

  // Should dir be removed from existing Path?
  if ((Method and (pmRemove or pmRemoveSubdirsAlso)) > 0) then
  begin
    for i:=Dirs.Count-1 downto 0 do
    begin
      if (((Method and pmRemoveSubdirsAlso) > 0) and (pos(uppercase(DirName)+'\', uppercase(Dirs.Strings[i])) = 1)) or
         (((Method and (pmRemove) or (pmRemoveSubdirsAlso)) > 0) and (uppercase(DirName) = uppercase(Dirs.Strings[i])))
      then
        Dirs.Delete(i);
    end;
  end;

  // Should dir be added to existing Path?
  if ((Method and (pmAddToBeginning or pmAddToEnd)) > 0) then
  begin
    // Add dir to path
    if (((Method and pmAddAllways) > 0) or DirNotInPath) then
    begin
      // Dir is not in path allready or should be added anyway
      if (((Method and pmAddOnlyIfDirExists) = 0) or (DirExists(DirName))) then
      begin
        // Dir actually exsists or should be added anyway
        if ((Method and pmAddToBeginning) > 0) then
          Dirs.Insert(0, DirName)
        else
          Dirs.Append(DirName);
      end;
    end;
  end;

  // Concatenate directory names into one single path variable
  ConcatPath(Dirs, Quotes, ResultPath);
  // Finally free Dirs object
  Dirs.Free;
end; // ModifyPathString

{ Helper function: Modify path on Windows 9x }
function ModifyPath9x(DirName: string; Method: integer): integer;
var
  AutoexecLines: TStringList;
  ActualLine: String;
  PathLineNos: TStringList;
  FirstPathLineNo: Integer;
  OldPath, ResultPath: String;
  LineNo, CharNo, Index: integer;

  TempString: String;
begin
  // Expect everything to be OK
  result := mpOK;

  // Create stringslists
  AutoexecLines := TStringList.Create;
  PathLineNos := TStringList.Create;

  // Read existing path
  OldPath := '';
  LoadStringFromFile('c:\Autoexec.bat', TempString);
  AutoexecLines.Text := TempString;
  PathLineNos.Clear;
  // Read Autoexec line by line
  for LineNo := 0 to AutoexecLines.Count - 1 do begin
    ActualLine := AutoexecLines.Strings[LineNo];
    // Check if line starts with "PATH=" after first stripping spaces and other "fill-chars"
    if Pos('=', ActualLine) > 0 then
    begin
      for CharNo := Pos('=', ActualLine)-1 downto 1 do
        if (ActualLine[CharNo]=' ') or (ActualLine[CharNo]=#9) then
          Delete(ActualLine, CharNo, 1);
      if Pos('@', ActualLine) = 1 then
        Delete(ActualLine, 1, 1);
      if (Pos('PATH=', uppercase(ActualLine))=1) or (Pos('SETPATH=', uppercase(ActualLine))=1) then
      begin
        // Remove 'PATH=' and add path to "OldPath" variable
        Delete(ActualLine, 1, pos('=', ActualLine));
        // Check if an earlier PATH variable is referenced, but there has been no previous PATH defined in Autoexec
        if (pos('%PATH%',uppercase(ActualLine))>0) and (PathLineNos.Count=0) then
          OldPath := ExpandConstant('{win}') + ';' + ExpandConstant('{win}')+'\COMMAND';
        if (pos('%PATH%',uppercase(ActualLine))>0) then
        begin
          ActualLine := Copy(ActualLine, 1, pos('%PATH%',uppercase(ActualLine))-1) +
                        OldPath +
                        Copy(ActualLine, pos('%PATH%',uppercase(ActualLine))+6, Length(ActualLine));
        end;
        OldPath := ActualLine;

        // Update list of line numbers holding path variables
        PathLineNos.Add(IntToStr(LineNo));
      end;
    end;
  end;

  // Save first line number in Autoexec.bat which modifies path environment variable
  if PathLineNos.Count > 0 then
    FirstPathLineNo := StrToInt(PathLineNos.Strings[0])
  else
    FirstPathLineNo := 0;

  // Modify path
  ModifyPathString(OldPath, DirName, Method, True, ResultPath);

  // Write Modified path back to Autoexec.bat
  // First delete all existing path references from Autoexec.bat
  Index := PathLineNos.Count-1;
  while (Index>=0) do
  begin
    AutoexecLines.Delete(StrToInt(PathLineNos.Strings[Index]));
    Index := Index-1;
  end;
  // Then insert new path variable into Autoexec.bat
  AutoexecLines.Insert(FirstPathLineNo, '@PATH='+ResultPath);
  // Delete old Autoexec.bat from disk
  if not DeleteFile('c:\Autoexec.bat') then
    result := mpAutoexecNoWriteAcc;
  Sleep(500);
  // And finally write Autoexec.bat back to disk
  if not (result=mpAutoexecNoWriteAcc) then
    SaveStringToFile('c:\Autoexec.bat', AutoexecLines.Text, false);

  // Free stringlists
  PathLineNos.Free;
  AutoexecLines.Free;
end; // ModifyPath9x

{ Helper function: Modify path on Windows NT, 2000 and XP }
function ModifyPathNT(DirName: string; Method, Scope: integer): integer;
var
  RegRootKey: integer;
  RegSubKeyName: string;
  RegValueName: string;
  OldPath, ResultPath: string;
  OK: boolean;
begin
  // Expect everything to be OK
  result := mpOK;

  // Initialize registry key and value names to reflect if changes should be global or local to current user only
  case Scope of
    psCurrentUser:
      begin
        RegRootKey := HKEY_CURRENT_USER;
        RegSubKeyName := 'Environment';
        RegValueName := 'Path';
      end;
    psAllUsers:
      begin
        RegRootKey := HKEY_LOCAL_MACHINE;
        RegSubKeyName := 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment';
        RegValueName := 'Path';
      end;
  end;

  // Read current path value from registry
  OK := RegQueryStringValue(RegRootKey, RegSubKeyName, RegValueName, OldPath);
  if not OK then
  begin
    result := mpMissingRights;
    Exit;
  end;

  // Modify path
  ModifyPathString(OldPath, DirName, Method, False, ResultPath);

  // Write new path value to registry
  if not RegWriteStringValue(RegRootKey, RegSubKeyName, RegValueName, ResultPath) then
  begin
    result := mpMissingRights;
    Exit;

  end;
end; // ModifyPathNT

{ Main function: Modify path }
function ModifyPath(Path: string; Method, Scope: integer): integer;
begin
  // Check if both add and remove has been specified (= error!)
  if (Method and (pmAddToBeginning or pmAddToEnd) and (pmRemove or pmRemoveSubdirsAlso)) > 0 then
  begin
    result := mpBothAddAndRemove;
    Exit;
  end;

  // Perform directory constant expansion
  Path := ExpandConstantEx(Path, ' ', ' ');

  // Test if Win9x
  if InstallOnThisVersion('4,0','0,0') = irInstall then
    ModifyPath9x(Path, Method);

  // Test if WinNT, 2000 or XP
  if InstallOnThisVersion('0,4','0,0') = irInstall then
    ModifyPathNT(Path, Method, Scope);
end; // ModifyPath

// -----------------------------------------------------------------
//                     install script hooks
// -----------------------------------------------------------------

procedure SetupPATH;
var
  p : string;
  scope : integer;
begin
  p:= ExpandConstant('{app}');
  if IsAdminLoggedOn then
    scope:= psAllUsers
  else
    scope:= psCurrentUser;
  ModifyPath(p, pmAddToEnd, scope);
end;

procedure InstallSetupPath;
begin
    if IsTaskSelected('addpath') then
		SetupPATH;
end;


Updated Windows installer generator to include SVG dependencies.

[Setup]
AppName=Shotwell
AppPublisher=Yorba Foundation
AppPublisherURL=http://yorba.org
AppVerName=Shotwell 0.3.1
DefaultDirName={pf}\Shotwell
DefaultGroupName=Shotwell
LicenseFile=COPYING
OutputDir=.
SourceDir=..
Uninstallable=yes

[Icons]
Name: "{commonprograms}\{groupname}\Shotwell"; Filename: "{app}\bin\shotwell.exe"

[Files]
Source: "c:\MinGW\bin\gspawn-win32-helper.exe"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\gspawn-win32-helper-console.exe"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\intl.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\jpeg62.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\libatk-1.0-0.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\libcairo-2.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\libcroco-0.6-3.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\libexif-12.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\libgconf-2-4.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\libgdk_pixbuf-2.0-0.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\libgdk-win32-2.0-0.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\libgio-2.0-0.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\libglib-2.0-0.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\libgmodule-2.0-0.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\libgobject-2.0-0.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\libgsf-1-114.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\libgthread-2.0-0.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\libgtk-win32-2.0-0.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\libORBit-2-0.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\libpango-1.0-0.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\libpangocairo-1.0-0.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\libpangowin32-1.0-0.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\libpng12-0.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\librsvg-2-2.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\libxml2-2.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\sqlite3.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\zlib1.dll"; DestDir: "{app}\bin"

Source: "c:\MinGW\etc\gconf\2\*"; DestDir: "{app}\etc\gconf\2"; Flags: recursesubdirs
Source: "c:\MinGW\etc\gtk-2.0\gdk-pixbuf.loaders"; DestDir: "{app}\etc\gtk-2.0"

Source: "c:\MinGW\lib\GConf\2\libgconfbackend-xml.dll"; DestDir: "{app}\lib\GConf\2"
Source: "c:\MinGW\lib\gtk-2.0\2.10.0\engines\libwimp.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"
Source: "c:\MinGW\lib\gtk-2.0\2.10.0\loaders\libpixbufloader-jpeg.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\loaders"
Source: "c:\MinGW\lib\gtk-2.0\2.10.0\loaders\libpixbufloader-png.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\loaders"
Source: "c:\MinGW\lib\gtk-2.0\2.10.0\loaders\svg_loader.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\loaders"

Source: "c:\MinGW\libexec\gconfd-2.exe"; DestDir: "{app}\libexec"

Source: "icons\*"; DestDir: "{app}\share\shotwell\icons"
Source: "ui\*"; DestDir: "{app}\share\shotwell\ui"
Source: "shotwell.exe"; DestDir: "{app}\bin\"

[Setup]
AppName=Shotwell
AppPublisher=Yorba Foundation
AppPublisherURL=http://yorba.org
AppVerName=Shotwell 0.3.1
DefaultDirName={pf}\Shotwell
DefaultGroupName=Shotwell
LicenseFile=COPYING
OutputDir=.
SourceDir=..
Uninstallable=yes

[Icons]
Name: "{commonprograms}\{groupname}\Shotwell"; Filename: "{app}\bin\shotwell.exe"

[Files]
Source: "c:\MinGW\bin\gspawn-win32-helper.exe"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\gspawn-win32-helper-console.exe"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\intl.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\jpeg62.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\libatk-1.0-0.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\libcairo-2.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\libexif-12.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\libgconf-2-4.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\libgdk_pixbuf-2.0-0.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\libgdk-win32-2.0-0.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\libgio-2.0-0.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\libglib-2.0-0.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\libgmodule-2.0-0.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\libgobject-2.0-0.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\libgthread-2.0-0.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\libgtk-win32-2.0-0.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\libORBit-2-0.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\libpango-1.0-0.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\libpangocairo-1.0-0.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\libpangowin32-1.0-0.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\libpng12-0.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\sqlite3.dll"; DestDir: "{app}\bin"
Source: "c:\MinGW\bin\zlib1.dll"; DestDir: "{app}\bin"

Source: "c:\MinGW\etc\gconf\2\*"; DestDir: "{app}\etc\gconf\2"; Flags: recursesubdirs
Source: "c:\MinGW\etc\gtk-2.0\gdk-pixbuf.loaders"; DestDir: "{app}\etc\gtk-2.0"

Source: "c:\MinGW\lib\GConf\2\libgconfbackend-xml.dll"; DestDir: "{app}\lib\GConf\2"
Source: "c:\MinGW\lib\gtk-2.0\2.10.0\engines\libwimp.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"
Source: "c:\MinGW\lib\gtk-2.0\2.10.0\loaders\libpixbufloader-jpeg.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\loaders"
Source: "c:\MinGW\lib\gtk-2.0\2.10.0\loaders\libpixbufloader-png.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\loaders"

Source: "c:\MinGW\libexec\gconfd-2.exe"; DestDir: "{app}\libexec"

Source: "icons\*"; DestDir: "{app}\share\shotwell\icons"
Source: "ui\*"; DestDir: "{app}\share\shotwell\ui"
Source: "shotwell.exe"; DestDir: "{app}\bin\"


Update Inno installer for 17.1.1

Update Inno installer for 17.1.1

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

#define MyAppName "Mesa3D software rendering drivers for Windows"
#define MyAppVersion "17.1.1.400-1"
#define MyAppPublisher "Pal100x"
#define MyAppURL "https://github.com/pal1000/mesa-dist-win"
#define MyAppExeName "mesa-{#MyAppVersion}-setup.exe"

[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={{8EFCCC7F-5BAF-4651-A040-EFB13C59EF60}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
ArchitecturesInstallIn64BitMode=x64
DefaultDirName={pf}\{#MyAppName}
DisableProgramGroupPage=yes
LicenseFile=LICENSE
OutputDir=bin\
OutputBaseFilename=mesa-{#MyAppVersion}-setup
Compression=lzma
SolidCompression=yes

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

[Files]
Source: "bin\x86\opengl32.dll"; DestDir: "{app}\x86"; Flags: ignoreversion
Source: "bin\x86\swrAVX.dll"; DestDir: "{app}\x86"; Flags: ignoreversion
Source: "bin\x86\swrAVX2.dll"; DestDir: "{app}\x86"; Flags: ignoreversion
Source: "bin\x86\dxtn.dll"; DestDir: "{app}\x86"; Flags: ignoreversion
Source: "bin\x86\osmesa-gallium.dll"; DestDir: "{app}\x86"; Flags: ignoreversion
Source: "bin\x86\osmesa-swrast.dll"; DestDir: "{app}\x86"; Flags: ignoreversion
Source: "bin\x86\graw.dll"; DestDir: "{app}\x86"; Flags: ignoreversion
Source: "bin\x64\opengl32.dll"; DestDir: "{app}\x64"; Flags: ignoreversion; Check: Is64BitInstallMode
Source: "bin\x64\swrAVX.dll"; DestDir: "{app}\x64"; Flags: ignoreversion; Check: Is64BitInstallMode
Source: "bin\x64\swrAVX2.dll"; DestDir: "{app}\x64"; Flags: ignoreversion; Check: Is64BitInstallMode
Source: "bin\x64\dxtn.dll"; DestDir: "{app}\x64"; Flags: ignoreversion; Check: Is64BitInstallMode
Source: "bin\x64\osmesa-gallium.dll"; DestDir: "{app}\x64"; Flags: ignoreversion; Check: Is64BitInstallMode
Source: "bin\x64\osmesa-swrast.dll"; DestDir: "{app}\x64"; Flags: ignoreversion; Check: Is64BitInstallMode
Source: "bin\x64\graw.dll"; DestDir: "{app}\x64"; Flags: ignoreversion; Check: Is64BitInstallMode
Source: "bin\quickdeploy.cmd"; DestDir: "{app}"
Source: "bin\readme.txt"; DestDir: "{app}"

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

[UninstallDelete]
Type: files; Name: "{app}\x86\opengl32.dll"
Type: files; Name: "{app}\x86\swrAVX.dll";
Type: files; Name: "{app}\x86\swrAVX2.dll"
Type: files; Name: "{app}\x86\dxtn.dll"
Type: files; Name: "{app}\x86\graw.dll";
Type: files; Name: "{app}\x86\osmesa-gallium.dll"
Type: files; Name: "{app}\x86\osmesa-swrast.dll"
Type: files; Name: "{app}\x64\opengl32.dll"; Check: Is64BitInstallMode
Type: files; Name: "{app}\x64\swrAVX.dll"; Check: Is64BitInstallMode
Type: files; Name: "{app}\x64\swrAVX2.dll"; Check: Is64BitInstallMode
Type: files; Name: "{app}\x64\dxtn.dll"; Check: Is64BitInstallMode
Type: files; Name: "{app}\x64\osmesa-gallium.dll"; Check: Is64BitInstallMode
Type: files; Name: "{app}\x64\osmesa-swrast.dll"; Check: Is64BitInstallMode
Type: files; Name: "{app}\x64\graw.dll"; Check: Is64BitInstallMode
Type: files; Name: "{app}\quickdeploy.cmd"
Type: files; Name: "{app}\readme.txt"

[Icons]
Name: "{commondesktop}\Mesa3D quick deployment utility"; Filename: "{app}\quickdeploy.cmd"

[Run]
Filename: "{app}\readme.txt"; Description: "View the README file"; Flags: postinstall shellexec skipifsilent

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

#define MyAppName "Mesa3D software rendering drivers for Windows"
#define MyAppVersion "17.1.0.400-1"
#define MyAppPublisher "Pal100x"
#define MyAppURL "https://github.com/pal1000/mesa-dist-win"
#define MyAppExeName "mesa-{#MyAppVersion}-setup.exe"

[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={{8EFCCC7F-5BAF-4651-A040-EFB13C59EF60}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
ArchitecturesInstallIn64BitMode=x64
DefaultDirName={pf}\{#MyAppName}
DisableProgramGroupPage=yes
LicenseFile=LICENSE
OutputDir=bin\
OutputBaseFilename=mesa-{#MyAppVersion}-setup
Compression=lzma
SolidCompression=yes

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

[Files]
Source: "bin\x86\opengl32.dll"; DestDir: "{app}\x86"; Flags: ignoreversion
Source: "bin\x86\swrAVX.dll"; DestDir: "{app}\x86"; Flags: ignoreversion
Source: "bin\x86\swrAVX2.dll"; DestDir: "{app}\x86"; Flags: ignoreversion
Source: "bin\x86\dxtn.dll"; DestDir: "{app}\x86"; Flags: ignoreversion
Source: "bin\x86\osmesa-gallium.dll"; DestDir: "{app}\x86"; Flags: ignoreversion
Source: "bin\x86\osmesa-swrast.dll"; DestDir: "{app}\x86"; Flags: ignoreversion
Source: "bin\x86\graw.dll"; DestDir: "{app}\x86"; Flags: ignoreversion
Source: "bin\x64\opengl32.dll"; DestDir: "{app}\x64"; Flags: ignoreversion; Check: Is64BitInstallMode
Source: "bin\x64\swrAVX.dll"; DestDir: "{app}\x64"; Flags: ignoreversion; Check: Is64BitInstallMode
Source: "bin\x64\swrAVX2.dll"; DestDir: "{app}\x64"; Flags: ignoreversion; Check: Is64BitInstallMode
Source: "bin\x64\dxtn.dll"; DestDir: "{app}\x64"; Flags: ignoreversion; Check: Is64BitInstallMode
Source: "bin\x64\osmesa-gallium.dll"; DestDir: "{app}\x64"; Flags: ignoreversion; Check: Is64BitInstallMode
Source: "bin\x64\osmesa-swrast.dll"; DestDir: "{app}\x64"; Flags: ignoreversion; Check: Is64BitInstallMode
Source: "bin\x64\graw.dll"; DestDir: "{app}\x64"; Flags: ignoreversion; Check: Is64BitInstallMode
Source: "bin\quickdeploy.cmd"; DestDir: "{app}"
Source: "bin\readme.txt"; DestDir: "{app}"

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

[UninstallDelete]
Type: files; Name: "{app}\x86\opengl32.dll"
Type: files; Name: "{app}\x86\swrAVX.dll";
Type: files; Name: "{app}\x86\swrAVX2.dll"
Type: files; Name: "{app}\x86\dxtn.dll"
Type: files; Name: "{app}\x86\graw.dll";
Type: files; Name: "{app}\x86\osmesa-gallium.dll"
Type: files; Name: "{app}\x86\osmesa-swrast.dll"
Type: files; Name: "{app}\x64\opengl32.dll"; Check: Is64BitInstallMode
Type: files; Name: "{app}\x64\swrAVX.dll"; Check: Is64BitInstallMode
Type: files; Name: "{app}\x64\swrAVX2.dll"; Check: Is64BitInstallMode
Type: files; Name: "{app}\x64\dxtn.dll"; Check: Is64BitInstallMode
Type: files; Name: "{app}\x64\osmesa-gallium.dll"; Check: Is64BitInstallMode
Type: files; Name: "{app}\x64\osmesa-swrast.dll"; Check: Is64BitInstallMode
Type: files; Name: "{app}\x64\graw.dll"; Check: Is64BitInstallMode
Type: files; Name: "{app}\quickdeploy.cmd"
Type: files; Name: "{app}\readme.txt"

[Icons]
Name: "{commondesktop}\Mesa3D quick deployment utility"; Filename: "{app}\quickdeploy.cmd"

[Run]
Filename: "{app}\readme.txt"; Description: "View the README file"; Flags: postinstall shellexec skipifsilent