Fix donate link in installer, after changing style

#define AppExeName "SyncTrayzor.exe"
#define AppRoot "..\.."
#define AppSrc AppRoot + "\src\SyncTrayzor"
#define AppBin AppRoot +"\bin\" + Arch + "\Release"
#define AppExe AppBin + "\SyncTrayzor.exe"
#define AppName GetStringFileInfo(AppExe, "ProductName")
#define AppVersion GetVersionNumbersString(AppExe)
#define AppPublisher "SyncTrayzor"
#define AppURL "https://github.com/canton7/SyncTrayzor"
#define AppDataFolder "SyncTrayzor"
#define RunRegKey "Software\Microsoft\Windows\CurrentVersion\Run"
#define DotNetInstallerExe "dotNet472Setup.exe"
#define DonateUrl "https://synctrayzor.antonymale.co.uk/donate"

[Setup]
AppId={{#AppId}
AppName={#AppName} ({#Arch})
AppVersion={#AppVersion}
VersionInfoVersion={#AppVersion}
;AppVerName={#AppName} {#AppVersion}
AppPublisher={#AppPublisher}
AppPublisherURL={#AppURL}
AppSupportURL={#AppURL}
AppUpdatesURL={#AppURL}
DefaultDirName={commonpf}\{#AppName}
DefaultGroupName={#AppName}
AllowNoIcons=yes
LicenseFile={#AppRoot}\LICENSE.txt
OutputDir="."
OutputBaseFilename={#AppName}Setup-{#Arch}
SetupIconFile={#AppSrc}\Icons\default.ico
WizardSmallImageFile=..\icon.bmp
Compression=lzma2/max
;Compression=None
SolidCompression=yes
PrivilegesRequired=admin
CloseApplications=yes
RestartApplications=no
; If we try and close CefSharp.BrowserSubprocess.exe we'll fail - it doesn't respond well
; However if we close *just* SyncTrayzor, that will take care of shutting down CefSharp and syncthing
CloseApplicationsFilter=SyncTrayzor.exe
TouchDate=current
WizardStyle=modern
; We do access user areas, but only as a best-effort attempt to clean up after ourselves
UsedUserAreasWarning=no
#if "x64" == Arch
ArchitecturesInstallIn64BitMode=x64
ArchitecturesAllowed=x64
#endif

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

[CustomMessages]
InstallingDotNetFramework=Installing .NET Framework. This might take a few minutes...
DotNetFrameworkFailedToLaunch=Failed to launch .NET Framework Installer with error "%1". Please fix the error then run this installer again.
DotNetFrameworkFailed1602=.NET Framework installation was cancelled. This installation can continue, but be aware that this application may not run unless the .NET Framework installation is completed successfully.
DotNetFrameworkFailed1603=A fatal error occurred while installing the .NET Framework. Please fix the error, then run the installer again.
DotNetFrameworkFailed5100=Your computer does not meet the requirements of the .NET Framework. Please consult the documentation.
DotNetFrameworkFailedOther=The .NET Framework installer exited with an unexpected status code "%1". Please review any other messages shown by the installer to determine whether the installation completed successfully, and abort this installation and fix the problem if it did not.

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

[Dirs]
Name: "{userappdata}\{#AppDataFolder}"

[Files]
; Near the beginning, as it's extracted first and this makes it cheaper
Source: "..\{#DotNetInstallerExe}"; DestDir: {tmp}; Flags: dontcopy nocompression noencryption

Source: "{#AppBin}\*"; DestDir: "{app}"; Excludes: "*.xml,*.vshost.*,*.config,*.log,*.pdb,FluentValidation.resources.dll,System.Windows.Interactivity.resources.dll,syncthing.exe,data,logs,cef_extensions.pak,d3dcompiler_47.dll,libEGL.dll,libGLESv2.dll,swiftshader/libEGL.dll,swiftshader/libGLESv2.dll"; Flags: ignoreversion recursesubdirs
Source: "{#AppBin}\SyncTrayzor.exe.Installer.config"; DestDir: "{app}"; DestName: "SyncTrayzor.exe.config"; Flags: ignoreversion
Source: "{#AppSrc}\Icons\default.ico"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#AppRoot}\*.md"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#AppRoot}\*.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "vc++\*.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "ucrt\*.dll"; DestDir: "{app}"; Flags: ignoreversion; OnlyBelowVersion: 10.0
Source: "syncthing.exe"; DestDir: "{app}"; DestName: "syncthing.exe"; Flags: ignoreversion

[InstallDelete]
Type: files; Name: "{app}\msvcp120.dll"
Type: files; Name: "{app}\msvcr120.dll"
Type: files; Name: "{app}\vccorlib120.dll"
Type: files; Name: "{app}\*.pdb"
Type: files; Name: "{app}\System.Windows.Interactivity.dll"

[Icons]
Name: "{group}\{#AppName}"; Filename: "{app}\{#AppExeName}"
Name: "{group}\{cm:UninstallProgram,{#AppName}}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\{#AppName}"; Filename: "{app}\{#AppExeName}"; Tasks: desktopicon

[Run]
Filename: "{app}\{#AppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(AppName, '&', '&&')}}"; Flags: nowait postinstall; Parameters: {code:SyncTrayzorStartFlags}; Check: ShouldStartSyncTrayzor

[Code]
var
  GlobalRestartRequired: boolean;

function DotNetIsMissing(): Boolean;
var
  Exists: Boolean;
  Release: Cardinal;
begin
  // https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed#minimum-version
  Exists := RegQueryDWordValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full', 'Release', Release);
  Result := not Exists or (Release < 461808);
end;

// Adapted from https://blogs.msdn.microsoft.com/davidrickard/2015/07/17/installing-net-framework-4-5-automatically-with-inno-setup/
function InstallDotNet(): String;
var
  StatusText: string;
  ResultCode: Integer;
begin
  StatusText := WizardForm.StatusLabel.Caption;
  WizardForm.StatusLabel.Caption := CustomMessage('InstallingDotNetFramework');
  WizardForm.ProgressGauge.Style := npbstMarquee;
  try
    ExtractTemporaryFile('{#DotNetInstallerExe}');
    if not Exec(ExpandConstant('{tmp}\{#DotNetInstallerExe}'), '/passive /norestart /showrmui /showfinalerror', '', SW_SHOW, ewWaitUntilTerminated, ResultCode) then
    begin
      Result := FmtMessage(CustomMessage('DotNetFrameworkFailedToLaunch'), [SysErrorMessage(ResultCode)]);
    end
    else
    begin
      // See https://msdn.microsoft.com/en-us/library/ee942965(v=vs.110).aspx#return_codes
      case resultCode of
        0: begin
          // Successful
        end;
        1602 : begin
          MsgBox(CustomMessage('DotNetFrameworkFailed1602'), mbInformation, MB_OK);
        end;
        1603: begin
          Result := CustomMessage('DotNetFrameworkFailed1603');
        end;
        1641: begin
          GlobalRestartRequired := True;
        end;
        3010: begin
          GlobalRestartRequired := True;
        end;
        5100: begin
          Result := CustomMessage('DotNetFrameworkFailed5100');
        end;
        else begin
          MsgBox(FmtMessage(CustomMessage('DotNetFrameworkFailedOther'), [IntToStr(ResultCode)]), mbError, MB_OK);
        end;
      end;
    end;
  finally
    WizardForm.StatusLabel.Caption := StatusText;
    WizardForm.ProgressGauge.Style := npbstNormal;
  end;
end;

procedure BumpInstallCount;
var
  FileContents: AnsiString;
  InstallCount: integer;
begin
  { Increment the install count in InstallCount.txt if it exists, or create it with the contents '1' if it doesn't }
  if LoadStringFromFile(ExpandConstant('{app}\InstallCount.txt'), FileContents) then
  begin
    InstallCount := StrTointDef(Trim(string(FileContents)), 0) + 1;
  end
  else
  begin
    InstallCount := 1;
  end;

  SaveStringToFile(ExpandConstant('{app}\InstallCount.txt'), IntToStr(InstallCount), False);
end;

procedure URLLabelOnClick(Sender: TObject);
var
  ErrorCode: Integer;
begin
  ShellExec('open', '{#DonateUrl}', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
end;

procedure InitializeWizard;
var
  URLLabel: TNewStaticText;
begin
  URLLabel := TNewStaticText.Create(WizardForm);
  URLLabel.Caption := 'Donate';
  URLLabel.Cursor := crHand;
  URLLabel.Parent := WizardForm;
  URLLabel.Font.Style := URLLabel.Font.Style + [fsUnderline];
  URLLabel.Font.Color := clBlue;
  URLLabel.Top := WizardForm.ClientHeight - URLLabel.Height - 30;
  URLLabel.Left := ScaleX(20)
  URLLabel.Anchors := [akLeft, akBottom]
  URLLabel.OnClick := @URLLabelOnClick;
end;

procedure CurStepChanged(CurStep: TSetupStep);
var
  FindRec: TFindRec;
  FolderPath: String;
  FilePath: String;
  ExeConfig: String;
begin
  if CurStep = ssInstall then
  begin
    BumpInstallCount();

    { We might be being run from ProcessRunner.exe, *and* we might be trying to update it. Funsies. Let's rename it (which Windows lets us do) }
    DeleteFile(ExpandConstant('{app}\ProcessRunner.exe.old'));
    RenameFile(ExpandConstant('{app}\ProcessRunner.exe'), ExpandConstant('{app}\ProcessRunner.exe.old'));

    Log(ExpandConstant('Looking for resource files in {app}\*'));
    { Remove resource files. This means that out-of-date languages will be removed, which (as a last-ditch resore) will alert maintainers that something's wrong }
    if FindFirst(ExpandConstant('{app}\*'), FindRec) then
    begin
      try
        repeat
          if (FindRec.Attributes and FILE_ATTRIBUTE_DIRECTORY <> 0) and (FindRec.Name <> '.') and (FindRec.Name <> '..') then
          begin
            FolderPath :=  ExpandConstant('{app}\') + FindRec.Name;
            FilePath := FolderPath + '\SyncTrayzor.resources.dll';
            if DeleteFile(FilePath) then
            begin
              Log('Deleted ' + FilePath);
              if DelTree(FolderPath, True, False, False) then
                Log('Deleted ' + FolderPath);
            end;
          end;
        until not FindNext(FindRec);
      finally
        FindClose(FindRec);
      end;
    end;
  end
  else if CurStep = ssPostInstall then
  begin
    ExeConfig := ExpandConstant('{param:SyncTrayzorExeConfig}');
    if ExeConfig <> '' then
    begin
      if FileExists(ExeConfig) then
      begin
        FileCopy(ExeConfig, ExpandConstant('{app}\SyncTrayzor.exe.config'), false);
      end
      else
      begin
        MsgBox('Could not find SyncTrayzorExeConfig file: ' + ExeConfig + '. Using default.', mbError, MB_OK);
      end
    end
  end
end;

function PrepareToInstall(var NeedsRestart: Boolean): String;
begin
  // 'NeedsRestart' only has an effect if we return a non-empty string, thus aborting the installation.
  // If the installers indicate that they want a restart, this should be done at the end of installation.
  // Therefore we set the global 'restartRequired' if a restart is needed, and return this from NeedRestart()

  if DotNetIsMissing() then
  begin
    Result := InstallDotNet();
  end;
end;

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

function ShouldStartSyncTrayzor(): Boolean;
var
  flagPassed: Boolean;
  i: Integer;
begin
  // Can't use {param}, as it doesn't match flags with no value
  flagPassed := False;
  for i := 0 to ParamCount do begin
    if ParamStr(i) = '/StartSyncTrayzor' then begin
      flagPassed := True;
      break;
    end;
  end;
  Result := (not WizardSilent()) or flagPassed;
end;

function SyncTrayzorStartFlags(param: String): String;
begin
   if WizardSilent() then begin
      Result := '-minimized'
   end else begin
      Result := ''
   end;
end;

// We won't be able to find keys for users other than the one running the installer, but try and do
// a best-effort attempt to cleaning ourselves up.
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
var
  keyValueNames: TArrayOfString;
  keyValue: String;
  i: Integer;
begin
  if CurUninstallStep = usPostUninstall then
  begin
    if RegGetValueNames(HKEY_CURRENT_USER, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Run', keyValueNames) then
    begin
      for i := 0 to GetArrayLength(keyValueNames)-1 do
      begin
        if Pos('SyncTrayzor', keyValueNames[i]) = 1 then
        begin
          if RegQueryStringValue(HKEY_CURRENT_USER, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Run', keyValueNames[i], keyValue) then
          begin
            if Pos(ExpandConstant('"{app}\{#AppExeName}"'), keyValue) = 1 then
            begin
              RegDeleteValue(HKEY_CURRENT_USER, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Run', keyValueNames[i]);
            end;
          end;
        end
      end;
    end;
  end;
end;

[UninstallDelete]
Type: files; Name: "{app}\ProcessRunner.exe.old"
Type: files; Name: "{app}\InstallCount.txt"
Type: filesandordirs; Name: "{userappdata}\{#AppDataFolder}"
Type: filesandordirs; Name: "{localappdata}\{#AppDataFolder}"

#define AppExeName "SyncTrayzor.exe"
#define AppRoot "..\.."
#define AppSrc AppRoot + "\src\SyncTrayzor"
#define AppBin AppRoot +"\bin\" + Arch + "\Release"
#define AppExe AppBin + "\SyncTrayzor.exe"
#define AppName GetStringFileInfo(AppExe, "ProductName")
#define AppVersion GetVersionNumbersString(AppExe)
#define AppPublisher "SyncTrayzor"
#define AppURL "https://github.com/canton7/SyncTrayzor"
#define AppDataFolder "SyncTrayzor"
#define RunRegKey "Software\Microsoft\Windows\CurrentVersion\Run"
#define DotNetInstallerExe "dotNet472Setup.exe"
#define DonateUrl "https://synctrayzor.antonymale.co.uk/donate"

[Setup]
AppId={{#AppId}
AppName={#AppName} ({#Arch})
AppVersion={#AppVersion}
VersionInfoVersion={#AppVersion}
;AppVerName={#AppName} {#AppVersion}
AppPublisher={#AppPublisher}
AppPublisherURL={#AppURL}
AppSupportURL={#AppURL}
AppUpdatesURL={#AppURL}
DefaultDirName={commonpf}\{#AppName}
DefaultGroupName={#AppName}
AllowNoIcons=yes
LicenseFile={#AppRoot}\LICENSE.txt
OutputDir="."
OutputBaseFilename={#AppName}Setup-{#Arch}
SetupIconFile={#AppSrc}\Icons\default.ico
WizardSmallImageFile=..\icon.bmp
Compression=lzma2/max
;Compression=None
SolidCompression=yes
PrivilegesRequired=admin
CloseApplications=yes
RestartApplications=no
; If we try and close CefSharp.BrowserSubprocess.exe we'll fail - it doesn't respond well
; However if we close *just* SyncTrayzor, that will take care of shutting down CefSharp and syncthing
CloseApplicationsFilter=SyncTrayzor.exe
TouchDate=current
WizardStyle=modern
; We do access user areas, but only as a best-effort attempt to clean up after ourselves
UsedUserAreasWarning=no
#if "x64" == Arch
ArchitecturesInstallIn64BitMode=x64
ArchitecturesAllowed=x64
#endif

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

[CustomMessages]
InstallingDotNetFramework=Installing .NET Framework. This might take a few minutes...
DotNetFrameworkFailedToLaunch=Failed to launch .NET Framework Installer with error "%1". Please fix the error then run this installer again.
DotNetFrameworkFailed1602=.NET Framework installation was cancelled. This installation can continue, but be aware that this application may not run unless the .NET Framework installation is completed successfully.
DotNetFrameworkFailed1603=A fatal error occurred while installing the .NET Framework. Please fix the error, then run the installer again.
DotNetFrameworkFailed5100=Your computer does not meet the requirements of the .NET Framework. Please consult the documentation.
DotNetFrameworkFailedOther=The .NET Framework installer exited with an unexpected status code "%1". Please review any other messages shown by the installer to determine whether the installation completed successfully, and abort this installation and fix the problem if it did not.

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

[Dirs]
Name: "{userappdata}\{#AppDataFolder}"

[Files]
; Near the beginning, as it's extracted first and this makes it cheaper
Source: "..\{#DotNetInstallerExe}"; DestDir: {tmp}; Flags: dontcopy nocompression noencryption

Source: "{#AppBin}\*"; DestDir: "{app}"; Excludes: "*.xml,*.vshost.*,*.config,*.log,*.pdb,FluentValidation.resources.dll,System.Windows.Interactivity.resources.dll,syncthing.exe,data,logs,cef_extensions.pak,d3dcompiler_47.dll,libEGL.dll,libGLESv2.dll,swiftshader/libEGL.dll,swiftshader/libGLESv2.dll"; Flags: ignoreversion recursesubdirs
Source: "{#AppBin}\SyncTrayzor.exe.Installer.config"; DestDir: "{app}"; DestName: "SyncTrayzor.exe.config"; Flags: ignoreversion
Source: "{#AppSrc}\Icons\default.ico"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#AppRoot}\*.md"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#AppRoot}\*.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "vc++\*.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "ucrt\*.dll"; DestDir: "{app}"; Flags: ignoreversion; OnlyBelowVersion: 10.0
Source: "syncthing.exe"; DestDir: "{app}"; DestName: "syncthing.exe"; Flags: ignoreversion

[InstallDelete]
Type: files; Name: "{app}\msvcp120.dll"
Type: files; Name: "{app}\msvcr120.dll"
Type: files; Name: "{app}\vccorlib120.dll"
Type: files; Name: "{app}\*.pdb"
Type: files; Name: "{app}\System.Windows.Interactivity.dll"

[Icons]
Name: "{group}\{#AppName}"; Filename: "{app}\{#AppExeName}"
Name: "{group}\{cm:UninstallProgram,{#AppName}}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\{#AppName}"; Filename: "{app}\{#AppExeName}"; Tasks: desktopicon

[Run]
Filename: "{app}\{#AppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(AppName, '&', '&&')}}"; Flags: nowait postinstall; Parameters: {code:SyncTrayzorStartFlags}; Check: ShouldStartSyncTrayzor

[Code]
var
  GlobalRestartRequired: boolean;

function DotNetIsMissing(): Boolean;
var
  Exists: Boolean;
  Release: Cardinal;
begin
  // https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed#minimum-version
  Exists := RegQueryDWordValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full', 'Release', Release);
  Result := not Exists or (Release < 461808);
end;

// Adapted from https://blogs.msdn.microsoft.com/davidrickard/2015/07/17/installing-net-framework-4-5-automatically-with-inno-setup/
function InstallDotNet(): String;
var
  StatusText: string;
  ResultCode: Integer;
begin
  StatusText := WizardForm.StatusLabel.Caption;
  WizardForm.StatusLabel.Caption := CustomMessage('InstallingDotNetFramework');
  WizardForm.ProgressGauge.Style := npbstMarquee;
  try
    ExtractTemporaryFile('{#DotNetInstallerExe}');
    if not Exec(ExpandConstant('{tmp}\{#DotNetInstallerExe}'), '/passive /norestart /showrmui /showfinalerror', '', SW_SHOW, ewWaitUntilTerminated, ResultCode) then
    begin
      Result := FmtMessage(CustomMessage('DotNetFrameworkFailedToLaunch'), [SysErrorMessage(ResultCode)]);
    end
    else
    begin
      // See https://msdn.microsoft.com/en-us/library/ee942965(v=vs.110).aspx#return_codes
      case resultCode of
        0: begin
          // Successful
        end;
        1602 : begin
          MsgBox(CustomMessage('DotNetFrameworkFailed1602'), mbInformation, MB_OK);
        end;
        1603: begin
          Result := CustomMessage('DotNetFrameworkFailed1603');
        end;
        1641: begin
          GlobalRestartRequired := True;
        end;
        3010: begin
          GlobalRestartRequired := True;
        end;
        5100: begin
          Result := CustomMessage('DotNetFrameworkFailed5100');
        end;
        else begin
          MsgBox(FmtMessage(CustomMessage('DotNetFrameworkFailedOther'), [IntToStr(ResultCode)]), mbError, MB_OK);
        end;
      end;
    end;
  finally
    WizardForm.StatusLabel.Caption := StatusText;
    WizardForm.ProgressGauge.Style := npbstNormal;
  end;
end;

procedure BumpInstallCount;
var
  FileContents: AnsiString;
  InstallCount: integer;
begin
  { Increment the install count in InstallCount.txt if it exists, or create it with the contents '1' if it doesn't }
  if LoadStringFromFile(ExpandConstant('{app}\InstallCount.txt'), FileContents) then
  begin
    InstallCount := StrTointDef(Trim(string(FileContents)), 0) + 1;
  end
  else
  begin
    InstallCount := 1;
  end;

  SaveStringToFile(ExpandConstant('{app}\InstallCount.txt'), IntToStr(InstallCount), False);
end;

procedure URLLabelOnClick(Sender: TObject);
var
  ErrorCode: Integer;
begin
  ShellExec('open', '{#DonateUrl}', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
end;

procedure InitializeWizard;
var
  URLLabel: TNewStaticText;
begin
  URLLabel := TNewStaticText.Create(WizardForm);
  URLLabel.Caption := 'Donate';
  URLLabel.Cursor := crHand;
  URLLabel.Parent := WizardForm;
  URLLabel.Font.Style := URLLabel.Font.Style + [fsUnderline];
  URLLabel.Font.Color := clBlue;
  URLLabel.Top := WizardForm.ClientHeight - URLLabel.Height - 15;
  URLLabel.Left := ScaleX(10)
  URLLabel.OnClick := @URLLabelOnClick;
end;

procedure CurStepChanged(CurStep: TSetupStep);
var
  FindRec: TFindRec;
  FolderPath: String;
  FilePath: String;
  ExeConfig: String;
begin
  if CurStep = ssInstall then
  begin
    BumpInstallCount();

    { We might be being run from ProcessRunner.exe, *and* we might be trying to update it. Funsies. Let's rename it (which Windows lets us do) }
    DeleteFile(ExpandConstant('{app}\ProcessRunner.exe.old'));
    RenameFile(ExpandConstant('{app}\ProcessRunner.exe'), ExpandConstant('{app}\ProcessRunner.exe.old'));

    Log(ExpandConstant('Looking for resource files in {app}\*'));
    { Remove resource files. This means that out-of-date languages will be removed, which (as a last-ditch resore) will alert maintainers that something's wrong }
    if FindFirst(ExpandConstant('{app}\*'), FindRec) then
    begin
      try
        repeat
          if (FindRec.Attributes and FILE_ATTRIBUTE_DIRECTORY <> 0) and (FindRec.Name <> '.') and (FindRec.Name <> '..') then
          begin
            FolderPath :=  ExpandConstant('{app}\') + FindRec.Name;
            FilePath := FolderPath + '\SyncTrayzor.resources.dll';
            if DeleteFile(FilePath) then
            begin
              Log('Deleted ' + FilePath);
              if DelTree(FolderPath, True, False, False) then
                Log('Deleted ' + FolderPath);
            end;
          end;
        until not FindNext(FindRec);
      finally
        FindClose(FindRec);
      end;
    end;
  end
  else if CurStep = ssPostInstall then
  begin
    ExeConfig := ExpandConstant('{param:SyncTrayzorExeConfig}');
    if ExeConfig <> '' then
    begin
      if FileExists(ExeConfig) then
      begin
        FileCopy(ExeConfig, ExpandConstant('{app}\SyncTrayzor.exe.config'), false);
      end
      else
      begin
        MsgBox('Could not find SyncTrayzorExeConfig file: ' + ExeConfig + '. Using default.', mbError, MB_OK);
      end
    end
  end
end;

function PrepareToInstall(var NeedsRestart: Boolean): String;
begin
  // 'NeedsRestart' only has an effect if we return a non-empty string, thus aborting the installation.
  // If the installers indicate that they want a restart, this should be done at the end of installation.
  // Therefore we set the global 'restartRequired' if a restart is needed, and return this from NeedRestart()

  if DotNetIsMissing() then
  begin
    Result := InstallDotNet();
  end;
end;

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

function ShouldStartSyncTrayzor(): Boolean;
var
  flagPassed: Boolean;
  i: Integer;
begin
  // Can't use {param}, as it doesn't match flags with no value
  flagPassed := False;
  for i := 0 to ParamCount do begin
    if ParamStr(i) = '/StartSyncTrayzor' then begin
      flagPassed := True;
      break;
    end;
  end;
  Result := (not WizardSilent()) or flagPassed;
end;

function SyncTrayzorStartFlags(param: String): String;
begin
   if WizardSilent() then begin
      Result := '-minimized'
   end else begin
      Result := ''
   end;
end;

// We won't be able to find keys for users other than the one running the installer, but try and do
// a best-effort attempt to cleaning ourselves up.
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
var
  keyValueNames: TArrayOfString;
  keyValue: String;
  i: Integer;
begin
  if CurUninstallStep = usPostUninstall then
  begin
    if RegGetValueNames(HKEY_CURRENT_USER, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Run', keyValueNames) then
    begin
      for i := 0 to GetArrayLength(keyValueNames)-1 do
      begin
        if Pos('SyncTrayzor', keyValueNames[i]) = 1 then
        begin
          if RegQueryStringValue(HKEY_CURRENT_USER, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Run', keyValueNames[i], keyValue) then
          begin
            if Pos(ExpandConstant('"{app}\{#AppExeName}"'), keyValue) = 1 then
            begin
              RegDeleteValue(HKEY_CURRENT_USER, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Run', keyValueNames[i]);
            end;
          end;
        end
      end;
    end;
  end;
end;

[UninstallDelete]
Type: files; Name: "{app}\ProcessRunner.exe.old"
Type: files; Name: "{app}\InstallCount.txt"
Type: filesandordirs; Name: "{userappdata}\{#AppDataFolder}"
Type: filesandordirs; Name: "{localappdata}\{#AppDataFolder}"


Updated path to readme in the installer script

#define ShortName "Pictus"
#define LongName "Pictus Image Viewer"

[Setup]
ArchitecturesAllowed=x86 x64
ArchitecturesInstallIn64BitMode=x64
AppName=Pictus
AppMutex=Local\Pictus Viewer
AppPublisherURL=http://www.poppeman.se/
AppSupportURL=http://www.poppeman.se/pictus
AppUpdatesURL=http://www.poppeman.se/pictus
AppVerName=Pictus
DefaultDirName={pf}\Pictus
MinVersion=0.0,5.01
UninstallDisplayIcon={app}\Pictus.exe
VersionInfoDescription=Pictus Setup
OutputBaseFilename=PictInst
OutputDir=../../dist/
DisableProgramGroupPage=yes
VersionInfoVersion=1.1.5.0
DisableDirPage=auto

[Languages]
Name: en; MessagesFile: "compiler:Default.isl"; LicenseFile: "license_en.txt"
Name: sv; MessagesFile: "compiler:Languages\Swedish.isl"; LicenseFile: "license_sv.txt"

[CustomMessages]
en.ExplorerIntegration=Show thumbnails in Explorer
sv.ExplorerIntegration=Visa tummnaglar i Utforskaren

[Components]
Name: "integration"; Description: "{cm:ExplorerIntegration}"; Types: full custom

[Files]
Source: "..\x64\release\Pictus.exe"; DestDir: "{app}"; Flags: replacesameversion; Check: Is64BitInstallMode
Source: "..\release\Pictus.exe"; DestDir: "{app}"; Flags: replacesameversion; Check: not Is64BitInstallMode
Source: "..\x64\release\PictThumbs.dll"; DestDir: "{app}"; Flags: replacesameversion regserver; Check: Is64BitInstallMode; Components: integration
Source: "..\release\PictThumbs.dll"; DestDir: "{app}"; Flags: replacesameversion regserver; Check: not Is64BitInstallMode; Components: integration
Source: "..\..\Readme.txt"; DestDir: "{app}"; Flags: replacesameversion

[Icons]
Name: "{commonprograms}\Pictus"; Filename: "{app}\Pictus.exe"

[Tasks]
Name: "assoc_bmp"; Description: "{cm:AssocFileExtension,{#ShortName},.bmp}"
Name: "assoc_gif"; Description: "{cm:AssocFileExtension,{#ShortName},.gif}"
Name: "assoc_jpg"; Description: "{cm:AssocFileExtension,{#ShortName},.jpg}"
Name: "assoc_pcx"; Description: "{cm:AssocFileExtension,{#ShortName},.pcx}"
Name: "assoc_png"; Description: "{cm:AssocFileExtension,{#ShortName},.png}"
Name: "assoc_psd"; Description: "{cm:AssocFileExtension,{#ShortName},.psd}"; Flags: unchecked
Name: "assoc_psp"; Description: "{cm:AssocFileExtension,{#ShortName},.psp}"; Flags: unchecked
Name: "assoc_tga"; Description: "{cm:AssocFileExtension,{#ShortName},.tga}"
Name: "assoc_tif"; Description: "{cm:AssocFileExtension,{#ShortName},.tiff}"
Name: "assoc_wbmp"; Description: "{cm:AssocFileExtension,{#ShortName},.wbmp}"
Name: "assoc_xyz"; Description: "{cm:AssocFileExtension,{#ShortName},.xyz}"

[Registry]
Root: HKLM; Subkey: "SOFTWARE\Poppeman"; Flags: uninsdeletekeyifempty
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities"; ValueType: string; ValueName: "ApplicationDescription"; ValueData: "Pictus is a fast, lightweight image viewer."
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities"; ValueType: string; ValueName: "ApplicationName"; ValueData: "{#LongName}"
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities\FileAssociations"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities\FileAssociations"; ValueType: string; ValueName: ".bmp"; ValueData: "Pictus.BMP"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities\FileAssociations"; ValueType: string; ValueName: ".gif"; ValueData: "Pictus.GIF"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities\FileAssociations"; ValueType: string; ValueName: ".jfif"; ValueData: "Pictus.JPG"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities\FileAssociations"; ValueType: string; ValueName: ".jpe"; ValueData: "Pictus.JPG"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities\FileAssociations"; ValueType: string; ValueName: ".jpeg"; ValueData: "Pictus.JPG"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities\FileAssociations"; ValueType: string; ValueName: ".jpg"; ValueData: "Pictus.JPG"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities\FileAssociations"; ValueType: string; ValueName: ".pcx"; ValueData: "Pictus.PCX"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities\FileAssociations"; ValueType: string; ValueName: ".png"; ValueData: "Pictus.PNG"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities\FileAssociations"; ValueType: string; ValueName: ".psd"; ValueData: "Pictus.PSD"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities\FileAssociations"; ValueType: string; ValueName: ".psp"; ValueData: "Pictus.PSP"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities\FileAssociations"; ValueType: string; ValueName: ".pspimage"; ValueData: "Pictus.PSP"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities\FileAssociations"; ValueType: string; ValueName: ".tga"; ValueData: "Pictus.TGA"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities\FileAssociations"; ValueType: string; ValueName: ".tif"; ValueData: "Pictus.TIF"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities\FileAssociations"; ValueType: string; ValueName: ".tiff"; ValueData: "Pictus.TIF"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities\FileAssociations"; ValueType: string; ValueName: ".wbm"; ValueData: "Pictus.WBMP"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities\FileAssociations"; ValueType: string; ValueName: ".wbmp"; ValueData: "Pictus.WBMP"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities\FileAssociations"; ValueType: string; ValueName: ".xif"; ValueData: "Pictus.TIF"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities\FileAssociations"; ValueType: string; ValueName: ".xyz"; ValueData: "Pictus.XYZ"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\RegisteredApplications"; ValueType: string; ValueName: "Pictus Image Viewer"; ValueData: "SOFTWARE\Poppeman\Pictus\Capabilities"; Flags: uninsdeletevalue

Root: HKCR; Subkey: "Pictus.BMP"; ValueType: string; ValueData: "Bitmap image"; Flags: uninsdeletekey
Root: HKCR; Subkey: "Pictus.BMP\shell\open\command"; ValueType: string; ValueData: """{app}\Pictus.exe"" ""%1"""; Flags: uninsdeletekey
Root: HKCR; Subkey: "Pictus.GIF"; ValueType: string; ValueData: "GIF image"; Flags: uninsdeletekey
Root: HKCR; Subkey: "Pictus.GIF\shell\open\command"; ValueType: string; ValueData: """{app}\Pictus.exe"" ""%1"""; Flags: uninsdeletekey
Root: HKCR; Subkey: "Pictus.JPG"; ValueType: string; ValueData: "Jpeg image"; Flags: uninsdeletekey
Root: HKCR; Subkey: "Pictus.JPG\shell\open\command"; ValueType: string; ValueData: """{app}\Pictus.exe"" ""%1"""; Flags: uninsdeletekey
Root: HKCR; Subkey: "Pictus.PCX"; ValueType: string; ValueData: "PCX image"; Flags: uninsdeletekey
Root: HKCR; Subkey: "Pictus.PCX\shell\open\command"; ValueType: string; ValueData: """{app}\Pictus.exe"" ""%1"""; Flags: uninsdeletekey
Root: HKCR; Subkey: "Pictus.PNG"; ValueType: string; ValueData: "PNG image"; Flags: uninsdeletekey
Root: HKCR; Subkey: "Pictus.PNG\shell\open\command"; ValueType: string; ValueData: """{app}\Pictus.exe"" ""%1"""; Flags: uninsdeletekey
Root: HKCR; Subkey: "Pictus.PSD"; ValueType: string; ValueData: "Photoshop image"; Flags: uninsdeletekey
Root: HKCR; Subkey: "Pictus.PSD\shell\open\command"; ValueType: string; ValueData: """{app}\Pictus.exe"" ""%1"""; Flags: uninsdeletekey
Root: HKCR; Subkey: "Pictus.PSP"; ValueType: string; ValueData: "Paint Shop Pro image"; Flags: uninsdeletekey
Root: HKCR; Subkey: "Pictus.PSP\shell\open\command"; ValueType: string; ValueData: """{app}\Pictus.exe"" ""%1"""; Flags: uninsdeletekey
Root: HKCR; Subkey: "Pictus.TGA"; ValueType: string; ValueData: "Targa TGA image"; Flags: uninsdeletekey
Root: HKCR; Subkey: "Pictus.TGA\shell\open\command"; ValueType: string; ValueData: """{app}\Pictus.exe"" ""%1"""; Flags: uninsdeletekey
Root: HKCR; Subkey: "Pictus.TIF"; ValueType: string; ValueData: "TIFF image"; Flags: uninsdeletekey
Root: HKCR; Subkey: "Pictus.TIF\shell\open\command"; ValueType: string; ValueData: """{app}\Pictus.exe"" ""%1"""; Flags: uninsdeletekey
Root: HKCR; Subkey: "Pictus.WBMP"; ValueType: string; ValueData: "Wireless bitmap image"; Flags: uninsdeletekey
Root: HKCR; Subkey: "Pictus.WBMP\shell\open\command"; ValueType: string; ValueData: """{app}\Pictus.exe"" ""%1"""; Flags: uninsdeletekey
Root: HKCR; Subkey: "Pictus.XYZ"; ValueType: string; ValueData: "XYZ image"; Flags: uninsdeletekey
Root: HKCR; Subkey: "Pictus.XYZ\shell\open\command"; ValueType: string; ValueData: """{app}\Pictus.exe"" ""%1"""; Flags: uninsdeletekey

Root: HKCR; Subkey: ".bmp"; ValueType: String; ValueData: "Pictus.BMP"; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: assoc_bmp
Root: HKCR; Subkey: ".gif"; ValueType: String; ValueData: "Pictus.GIF"; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: assoc_gif
Root: HKCR; Subkey: ".jfif"; ValueType: String; ValueData: "Pictus.JPG"; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: assoc_jpg
Root: HKCR; Subkey: ".jpe"; ValueType: String; ValueData: "Pictus.JPG"; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: assoc_jpg
Root: HKCR; Subkey: ".jpeg"; ValueType: String; ValueData: "Pictus.JPG"; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: assoc_jpg
Root: HKCR; Subkey: ".jpg"; ValueType: String; ValueData: "Pictus.JPG"; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: assoc_jpg
Root: HKCR; Subkey: ".pcx"; ValueType: String; ValueData: "Pictus.PCX"; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: assoc_pcx
Root: HKCR; Subkey: ".png"; ValueType: String; ValueData: "Pictus.PNG"; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: assoc_png
Root: HKCR; Subkey: ".psd"; ValueType: String; ValueData: "Pictus.PSD"; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: assoc_psd
Root: HKCR; Subkey: ".psp"; ValueType: String; ValueData: "Pictus.PSP"; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: assoc_psp
Root: HKCR; Subkey: ".pspimage"; ValueType: String; ValueData: "Pictus.PSP"; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: assoc_psp
Root: HKCR; Subkey: ".tga"; ValueType: String; ValueData: "Pictus.TGA"; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: assoc_tga
Root: HKCR; Subkey: ".tif"; ValueType: String; ValueData: "Pictus.TIF"; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: assoc_tif
Root: HKCR; Subkey: ".tiff"; ValueType: String; ValueData: "Pictus.TIF"; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: assoc_tif
Root: HKCR; Subkey: ".wbm"; ValueType: String; ValueData: "Pictus.WBMP"; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: assoc_wbmp
Root: HKCR; Subkey: ".wbmp"; ValueType: String; ValueData: "Pictus.WBMP"; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: assoc_wbmp
Root: HKCR; Subkey: ".xif"; ValueType: String; ValueData: "Pictus.TIF"; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: assoc_tif
Root: HKCR; Subkey: ".xyz"; ValueType: String; ValueData: "Pictus.XYZ"; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: assoc_xyz

#define ShortName "Pictus"
#define LongName "Pictus Image Viewer"

[Setup]
ArchitecturesAllowed=x86 x64
ArchitecturesInstallIn64BitMode=x64
AppName=Pictus
AppMutex=Local\Pictus Viewer
AppPublisherURL=http://www.poppeman.se/
AppSupportURL=http://www.poppeman.se/pictus
AppUpdatesURL=http://www.poppeman.se/pictus
AppVerName=Pictus
DefaultDirName={pf}\Pictus
MinVersion=0.0,5.01
UninstallDisplayIcon={app}\Pictus.exe
VersionInfoDescription=Pictus Setup
OutputBaseFilename=PictInst
OutputDir=../../dist/
DisableProgramGroupPage=yes
VersionInfoVersion=1.1.5.0
DisableDirPage=auto

[Languages]
Name: en; MessagesFile: "compiler:Default.isl"; LicenseFile: "license_en.txt"
Name: sv; MessagesFile: "compiler:Languages\Swedish.isl"; LicenseFile: "license_sv.txt"

[CustomMessages]
en.ExplorerIntegration=Show thumbnails in Explorer
sv.ExplorerIntegration=Visa tummnaglar i Utforskaren

[Components]
Name: "integration"; Description: "{cm:ExplorerIntegration}"; Types: full custom

[Files]
Source: "..\x64\release\Pictus.exe"; DestDir: "{app}"; Flags: replacesameversion; Check: Is64BitInstallMode
Source: "..\release\Pictus.exe"; DestDir: "{app}"; Flags: replacesameversion; Check: not Is64BitInstallMode
Source: "..\x64\release\PictThumbs.dll"; DestDir: "{app}"; Flags: replacesameversion regserver; Check: Is64BitInstallMode; Components: integration
Source: "..\release\PictThumbs.dll"; DestDir: "{app}"; Flags: replacesameversion regserver; Check: not Is64BitInstallMode; Components: integration
Source: "..\..\docs\Readme.txt"; DestDir: "{app}"; Flags: replacesameversion

[Icons]
Name: "{commonprograms}\Pictus"; Filename: "{app}\Pictus.exe"

[Tasks]
Name: "assoc_bmp"; Description: "{cm:AssocFileExtension,{#ShortName},.bmp}"
Name: "assoc_gif"; Description: "{cm:AssocFileExtension,{#ShortName},.gif}"
Name: "assoc_jpg"; Description: "{cm:AssocFileExtension,{#ShortName},.jpg}"
Name: "assoc_pcx"; Description: "{cm:AssocFileExtension,{#ShortName},.pcx}"
Name: "assoc_png"; Description: "{cm:AssocFileExtension,{#ShortName},.png}"
Name: "assoc_psd"; Description: "{cm:AssocFileExtension,{#ShortName},.psd}"; Flags: unchecked
Name: "assoc_psp"; Description: "{cm:AssocFileExtension,{#ShortName},.psp}"; Flags: unchecked
Name: "assoc_tga"; Description: "{cm:AssocFileExtension,{#ShortName},.tga}"
Name: "assoc_tif"; Description: "{cm:AssocFileExtension,{#ShortName},.tiff}"
Name: "assoc_wbmp"; Description: "{cm:AssocFileExtension,{#ShortName},.wbmp}"
Name: "assoc_xyz"; Description: "{cm:AssocFileExtension,{#ShortName},.xyz}"

[Registry]
Root: HKLM; Subkey: "SOFTWARE\Poppeman"; Flags: uninsdeletekeyifempty
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities"; ValueType: string; ValueName: "ApplicationDescription"; ValueData: "Pictus is a fast, lightweight image viewer."
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities"; ValueType: string; ValueName: "ApplicationName"; ValueData: "{#LongName}"
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities\FileAssociations"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities\FileAssociations"; ValueType: string; ValueName: ".bmp"; ValueData: "Pictus.BMP"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities\FileAssociations"; ValueType: string; ValueName: ".gif"; ValueData: "Pictus.GIF"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities\FileAssociations"; ValueType: string; ValueName: ".jfif"; ValueData: "Pictus.JPG"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities\FileAssociations"; ValueType: string; ValueName: ".jpe"; ValueData: "Pictus.JPG"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities\FileAssociations"; ValueType: string; ValueName: ".jpeg"; ValueData: "Pictus.JPG"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities\FileAssociations"; ValueType: string; ValueName: ".jpg"; ValueData: "Pictus.JPG"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities\FileAssociations"; ValueType: string; ValueName: ".pcx"; ValueData: "Pictus.PCX"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities\FileAssociations"; ValueType: string; ValueName: ".png"; ValueData: "Pictus.PNG"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities\FileAssociations"; ValueType: string; ValueName: ".psd"; ValueData: "Pictus.PSD"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities\FileAssociations"; ValueType: string; ValueName: ".psp"; ValueData: "Pictus.PSP"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities\FileAssociations"; ValueType: string; ValueName: ".pspimage"; ValueData: "Pictus.PSP"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities\FileAssociations"; ValueType: string; ValueName: ".tga"; ValueData: "Pictus.TGA"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities\FileAssociations"; ValueType: string; ValueName: ".tif"; ValueData: "Pictus.TIF"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities\FileAssociations"; ValueType: string; ValueName: ".tiff"; ValueData: "Pictus.TIF"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities\FileAssociations"; ValueType: string; ValueName: ".wbm"; ValueData: "Pictus.WBMP"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities\FileAssociations"; ValueType: string; ValueName: ".wbmp"; ValueData: "Pictus.WBMP"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities\FileAssociations"; ValueType: string; ValueName: ".xif"; ValueData: "Pictus.TIF"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Poppeman\Pictus\Capabilities\FileAssociations"; ValueType: string; ValueName: ".xyz"; ValueData: "Pictus.XYZ"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\RegisteredApplications"; ValueType: string; ValueName: "Pictus Image Viewer"; ValueData: "SOFTWARE\Poppeman\Pictus\Capabilities"; Flags: uninsdeletevalue

Root: HKCR; Subkey: "Pictus.BMP"; ValueType: string; ValueData: "Bitmap image"; Flags: uninsdeletekey
Root: HKCR; Subkey: "Pictus.BMP\shell\open\command"; ValueType: string; ValueData: """{app}\Pictus.exe"" ""%1"""; Flags: uninsdeletekey
Root: HKCR; Subkey: "Pictus.GIF"; ValueType: string; ValueData: "GIF image"; Flags: uninsdeletekey
Root: HKCR; Subkey: "Pictus.GIF\shell\open\command"; ValueType: string; ValueData: """{app}\Pictus.exe"" ""%1"""; Flags: uninsdeletekey
Root: HKCR; Subkey: "Pictus.JPG"; ValueType: string; ValueData: "Jpeg image"; Flags: uninsdeletekey
Root: HKCR; Subkey: "Pictus.JPG\shell\open\command"; ValueType: string; ValueData: """{app}\Pictus.exe"" ""%1"""; Flags: uninsdeletekey
Root: HKCR; Subkey: "Pictus.PCX"; ValueType: string; ValueData: "PCX image"; Flags: uninsdeletekey
Root: HKCR; Subkey: "Pictus.PCX\shell\open\command"; ValueType: string; ValueData: """{app}\Pictus.exe"" ""%1"""; Flags: uninsdeletekey
Root: HKCR; Subkey: "Pictus.PNG"; ValueType: string; ValueData: "PNG image"; Flags: uninsdeletekey
Root: HKCR; Subkey: "Pictus.PNG\shell\open\command"; ValueType: string; ValueData: """{app}\Pictus.exe"" ""%1"""; Flags: uninsdeletekey
Root: HKCR; Subkey: "Pictus.PSD"; ValueType: string; ValueData: "Photoshop image"; Flags: uninsdeletekey
Root: HKCR; Subkey: "Pictus.PSD\shell\open\command"; ValueType: string; ValueData: """{app}\Pictus.exe"" ""%1"""; Flags: uninsdeletekey
Root: HKCR; Subkey: "Pictus.PSP"; ValueType: string; ValueData: "Paint Shop Pro image"; Flags: uninsdeletekey
Root: HKCR; Subkey: "Pictus.PSP\shell\open\command"; ValueType: string; ValueData: """{app}\Pictus.exe"" ""%1"""; Flags: uninsdeletekey
Root: HKCR; Subkey: "Pictus.TGA"; ValueType: string; ValueData: "Targa TGA image"; Flags: uninsdeletekey
Root: HKCR; Subkey: "Pictus.TGA\shell\open\command"; ValueType: string; ValueData: """{app}\Pictus.exe"" ""%1"""; Flags: uninsdeletekey
Root: HKCR; Subkey: "Pictus.TIF"; ValueType: string; ValueData: "TIFF image"; Flags: uninsdeletekey
Root: HKCR; Subkey: "Pictus.TIF\shell\open\command"; ValueType: string; ValueData: """{app}\Pictus.exe"" ""%1"""; Flags: uninsdeletekey
Root: HKCR; Subkey: "Pictus.WBMP"; ValueType: string; ValueData: "Wireless bitmap image"; Flags: uninsdeletekey
Root: HKCR; Subkey: "Pictus.WBMP\shell\open\command"; ValueType: string; ValueData: """{app}\Pictus.exe"" ""%1"""; Flags: uninsdeletekey
Root: HKCR; Subkey: "Pictus.XYZ"; ValueType: string; ValueData: "XYZ image"; Flags: uninsdeletekey
Root: HKCR; Subkey: "Pictus.XYZ\shell\open\command"; ValueType: string; ValueData: """{app}\Pictus.exe"" ""%1"""; Flags: uninsdeletekey

Root: HKCR; Subkey: ".bmp"; ValueType: String; ValueData: "Pictus.BMP"; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: assoc_bmp
Root: HKCR; Subkey: ".gif"; ValueType: String; ValueData: "Pictus.GIF"; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: assoc_gif
Root: HKCR; Subkey: ".jfif"; ValueType: String; ValueData: "Pictus.JPG"; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: assoc_jpg
Root: HKCR; Subkey: ".jpe"; ValueType: String; ValueData: "Pictus.JPG"; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: assoc_jpg
Root: HKCR; Subkey: ".jpeg"; ValueType: String; ValueData: "Pictus.JPG"; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: assoc_jpg
Root: HKCR; Subkey: ".jpg"; ValueType: String; ValueData: "Pictus.JPG"; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: assoc_jpg
Root: HKCR; Subkey: ".pcx"; ValueType: String; ValueData: "Pictus.PCX"; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: assoc_pcx
Root: HKCR; Subkey: ".png"; ValueType: String; ValueData: "Pictus.PNG"; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: assoc_png
Root: HKCR; Subkey: ".psd"; ValueType: String; ValueData: "Pictus.PSD"; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: assoc_psd
Root: HKCR; Subkey: ".psp"; ValueType: String; ValueData: "Pictus.PSP"; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: assoc_psp
Root: HKCR; Subkey: ".pspimage"; ValueType: String; ValueData: "Pictus.PSP"; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: assoc_psp
Root: HKCR; Subkey: ".tga"; ValueType: String; ValueData: "Pictus.TGA"; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: assoc_tga
Root: HKCR; Subkey: ".tif"; ValueType: String; ValueData: "Pictus.TIF"; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: assoc_tif
Root: HKCR; Subkey: ".tiff"; ValueType: String; ValueData: "Pictus.TIF"; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: assoc_tif
Root: HKCR; Subkey: ".wbm"; ValueType: String; ValueData: "Pictus.WBMP"; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: assoc_wbmp
Root: HKCR; Subkey: ".wbmp"; ValueType: String; ValueData: "Pictus.WBMP"; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: assoc_wbmp
Root: HKCR; Subkey: ".xif"; ValueType: String; ValueData: "Pictus.TIF"; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: assoc_tif
Root: HKCR; Subkey: ".xyz"; ValueType: String; ValueData: "Pictus.XYZ"; Flags: uninsdeletevalue uninsdeletekeyifempty; Tasks: assoc_xyz


Provide a link to documentation instead of a word document

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

[Setup]
OutputDir=\projects\micromanager
OutputBaseFilename=MMDeviceKit-win-x86-x64-Dev40-Mod6a
DefaultDirName=C:/Program Files/MMDeviceKit-win-Dev40
VersionInfoVersion=40
VersionInfoCompany=micro-manager.org
VersionInfoCopyright=University of California San Francisco
AppCopyright=Unviersity of California San Francisco
AppName=Micro-Manager-1.4 DeviceKit
AppVerName=DeviceKit for Device API version 40 Module API version 6
ShowLanguageDialog=yes
DisableDirPage=false

[Dirs]
Name:   "{app}\bin_Win32"
Name:   "{app}\bin_x64"

[Files]
; driver files
Source: ..\MMDevice\DeviceBase.h; DestDir: {app}\MMDevice
Source: ..\MMDevice\DeviceThreads.h; DestDir: {app}\MMDevice
Source: ..\MMDevice\DeviceUtils.cpp; DestDir: {app}\MMDevice
Source: ..\MMDevice\DeviceUtils.h; DestDir: {app}\MMDevice
Source: ..\MMDevice\ImageMetadata.h; DestDir: {app}\MMDevice
Source: ..\MMDevice\ImgBuffer.cpp; DestDir: {app}\MMDevice
Source: ..\MMDevice\ImgBuffer.h; DestDir: {app}\MMDevice
Source: ..\MMDevice\license.txt; DestDir: {app}\MMDevice
Source: ..\MMDevice\MMDevice.h; DestDir: {app}\MMDevice
Source: ..\MMDevice\MMDeviceConstants.h; DestDir: {app}\MMDevice
Source: ..\MMDevice\ModuleInterface.cpp; DestDir: {app}\MMDevice
Source: ..\MMDevice\ModuleInterface.h; DestDir: {app}\MMDevice
Source: ..\MMDevice\Property.cpp; DestDir: {app}\MMDevice
Source: ..\MMDevice\Property.h; DestDir: {app}\MMDevice
Source: ..\DeviceAdapters\DemoCamera\DemoCamera.cpp; DestDir: {app}\DeviceAdapters\DemoCamera
Source: ..\DeviceAdapters\DemoCamera\DemoCamera.h; DestDir: {app}\DeviceAdapters\DemoCamera
Source: ..\DeviceAdapters\DemoCamera\DemoCamera.vcproj; DestDir: {app}\DeviceAdapters\DemoCamera
Source: ..\DeviceAdapters\DemoCamera\license.txt; DestDir: {app}\DeviceAdapters\DemoCamera
Source: ..\DeviceAdapters\DemoCamera\WriteCompactTiffRGB.h; DestDir: {app}\DeviceAdapters\DemoCamera
Source: ..\DeviceAdapters\Sensicam\Sensicam.cpp; DestDir: {app}\DeviceAdapters\Sensicam
Source: ..\DeviceAdapters\Sensicam\Sensicam.h; DestDir: {app}\DeviceAdapters\Sensicam
Source: ..\DeviceAdapters\Sensicam\Sensicam.vcproj; DestDir: {app}\DeviceAdapters\Sensicam
Source: ..\DeviceAdapters\Sensicam\license.txt; DestDir: {app}\DeviceAdapters\Sensicam
Source: ..\DeviceAdapters\Nikon\Nikon.cpp; DestDir: {app}\DeviceAdapters\Nikon
Source: ..\DeviceAdapters\Nikon\Nikon.h; DestDir: {app}\DeviceAdapters\Nikon
Source: ..\DeviceAdapters\Nikon\Nikon.vcproj; DestDir: {app}\DeviceAdapters\Nikon
Source: ..\DeviceAdapters\Nikon\license.txt; DestDir: {app}\DeviceAdapters\Nikon
Source: ..\DeviceAdapters\SimpleAutofocus\*; DestDir: {app}\DeviceAdapters\SimpleAutofocus

; documentation file

Source: ..\doc\DeviceKitDocumentation.url; DestDir: {app}\

; boost stuff, specific to VS2008 for now....
; if they want different binaries, they'll need to build them

Source: ..\..\3rdpartypublic\boost\stage_Win32\lib\libboost_date_time-vc90-mt-1_46_1.lib; DestDir: {app}\lib_Win32
Source: ..\..\3rdpartypublic\boost\stage_Win32\lib\libboost_date_time-vc90-mt-gd-1_46_1.lib; DestDir: {app}\lib_Win32
Source: ..\..\3rdpartypublic\boost\stage_Win32\lib\libboost_thread-vc90-mt-1_46_1.lib; DestDir: {app}\lib_Win32
Source: ..\..\3rdpartypublic\boost\stage_Win32\lib\libboost_thread-vc90-mt-gd-1_46_1.lib; DestDir: {app}\lib_Win32

Source: ..\..\3rdpartypublic\boost\stage_x64\lib\libboost_date_time-vc90-mt-1_46_1.lib; DestDir: {app}\lib_x64
Source: ..\..\3rdpartypublic\boost\stage_x64\lib\libboost_date_time-vc90-mt-gd-1_46_1.lib; DestDir: {app}\lib_x64
Source: ..\..\3rdpartypublic\boost\stage_x64\lib\libboost_thread-vc90-mt-1_46_1.lib; DestDir: {app}\lib_x64
Source: ..\..\3rdpartypublic\boost\stage_x64\lib\libboost_thread-vc90-mt-gd-1_46_1.lib; DestDir: {app}\lib_x64

; test files
Source: ..\lib_Win32\MMCored.lib; DestDir: {app}\lib_Win32
Source: ..\lib_Win32\MMCorer.lib; DestDir: {app}\lib_Win32
Source: ..\lib_x64\MMCored.lib; DestDir: {app}\lib_x64
Source: ..\lib_x64\MMCorer.lib; DestDir: {app}\lib_x64
Source: ..\Test_Programs\ModuleTest\ModuleTest.cpp; DestDir: {app}\Test_Programs\ModuleTest
Source: ..\Test_Programs\ModuleTest\ModuleTest.vcproj; DestDir: {app}\Test_Programs\ModuleTest
Source: ..\Test_Programs\ModuleTest\ModuleTest.sln; DestDir: {app}\Test_Programs\ModuleTest

Source: ..\Test_Programs\MMCoreTest\*; DestDir: {app}\Test_Programs\MMCoreTest
; pickup whatever matching device adapters we've put into the running directory
Source: ..\Test_Programs\MMCoreTest\Win32\Release\*; DestDir: {app}\Test_Programs\MMCoreTest\Win32\Release
Source: ..\Test_Programs\MMCoreTest\x64\Release\*; DestDir: {app}\Test_Programs\MMCoreTest\x64\Release
Source: ..\Test_Programs\MMCoreTest\Win32\Debug\*; DestDir: {app}\Test_Programs\MMCoreTest\Win32\Debug
Source: ..\Test_Programs\MMCoreTest\x64\Debug\*; DestDir: {app}\Test_Programs\MMCoreTest\x64\Debug

; MMCore files
Source: ..\MMCore\*; DestDir: {app}\MMCore

; scripting files
; confusing to include these with the core_test
;Source: ..\scripts\*; DestDir: {app}\scripts

[Setup]
OutputDir=\projects\micromanager
OutputBaseFilename=MMDeviceKit-win-x86-x64-Dev40-Mod6
DefaultDirName=C:/Program Files/MMDeviceKit-win-Dev40-Mod6
VersionInfoVersion=40
VersionInfoCompany=micro-manager.org
VersionInfoCopyright=University of California San Francisco
AppCopyright=Unviersity of California San Francisco
AppName=Micro-Manager-1.4 DeviceKit
AppVerName=DeviceKit for Device API version 40 Module API version 6
ShowLanguageDialog=yes
DisableDirPage=false

[Dirs]
Name:   "{app}\bin_Win32"
Name:   "{app}\bin_x64"

[Files]
; driver files
Source: ..\MMDevice\DeviceBase.h; DestDir: {app}\MMDevice
Source: ..\MMDevice\DeviceThreads.h; DestDir: {app}\MMDevice
Source: ..\MMDevice\DeviceUtils.cpp; DestDir: {app}\MMDevice
Source: ..\MMDevice\DeviceUtils.h; DestDir: {app}\MMDevice
Source: ..\MMDevice\ImageMetadata.h; DestDir: {app}\MMDevice
Source: ..\MMDevice\ImgBuffer.cpp; DestDir: {app}\MMDevice
Source: ..\MMDevice\ImgBuffer.h; DestDir: {app}\MMDevice
Source: ..\MMDevice\license.txt; DestDir: {app}\MMDevice
Source: ..\MMDevice\MMDevice.h; DestDir: {app}\MMDevice
Source: ..\MMDevice\MMDeviceConstants.h; DestDir: {app}\MMDevice
Source: ..\MMDevice\ModuleInterface.cpp; DestDir: {app}\MMDevice
Source: ..\MMDevice\ModuleInterface.h; DestDir: {app}\MMDevice
Source: ..\MMDevice\Property.cpp; DestDir: {app}\MMDevice
Source: ..\MMDevice\Property.h; DestDir: {app}\MMDevice
Source: ..\DeviceAdapters\DemoCamera\DemoCamera.cpp; DestDir: {app}\DeviceAdapters\DemoCamera
Source: ..\DeviceAdapters\DemoCamera\DemoCamera.h; DestDir: {app}\DeviceAdapters\DemoCamera
Source: ..\DeviceAdapters\DemoCamera\DemoCamera.vcproj; DestDir: {app}\DeviceAdapters\DemoCamera
Source: ..\DeviceAdapters\DemoCamera\license.txt; DestDir: {app}\DeviceAdapters\DemoCamera
Source: ..\DeviceAdapters\DemoCamera\WriteCompactTiffRGB.h; DestDir: {app}\DeviceAdapters\DemoCamera
Source: ..\DeviceAdapters\Sensicam\Sensicam.cpp; DestDir: {app}\DeviceAdapters\Sensicam
Source: ..\DeviceAdapters\Sensicam\Sensicam.h; DestDir: {app}\DeviceAdapters\Sensicam
Source: ..\DeviceAdapters\Sensicam\Sensicam.vcproj; DestDir: {app}\DeviceAdapters\Sensicam
Source: ..\DeviceAdapters\Sensicam\license.txt; DestDir: {app}\DeviceAdapters\Sensicam
Source: ..\doc\MMDeviceKit.doc; DestDir: {app}
Source: ..\DeviceAdapters\Nikon\Nikon.cpp; DestDir: {app}\DeviceAdapters\Nikon
Source: ..\DeviceAdapters\Nikon\Nikon.h; DestDir: {app}\DeviceAdapters\Nikon
Source: ..\DeviceAdapters\Nikon\Nikon.vcproj; DestDir: {app}\DeviceAdapters\Nikon
Source: ..\DeviceAdapters\Nikon\license.txt; DestDir: {app}\DeviceAdapters\Nikon
Source: ..\DeviceAdapters\SimpleAutofocus\*; DestDir: {app}\DeviceAdapters\SimpleAutofocus

; boost stuff, specific to VS2008 for now....
; if they want different binaries, they'll need to build them

Source: ..\..\3rdpartypublic\boost\stage_Win32\lib\libboost_date_time-vc90-mt-1_43.lib; DestDir: {app}\lib_Win32
Source: ..\..\3rdpartypublic\boost\stage_Win32\lib\libboost_date_time-vc90-mt-gd-1_43.lib; DestDir: {app}\lib_Win32
Source: ..\..\3rdpartypublic\boost\stage_Win32\lib\libboost_thread-vc90-mt-1_43.lib; DestDir: {app}\lib_Win32
Source: ..\..\3rdpartypublic\boost\stage_Win32\lib\libboost_thread-vc90-mt-gd-1_43.lib; DestDir: {app}\lib_Win32

Source: ..\..\3rdpartypublic\boost\stage_x64\lib\libboost_date_time-vc90-mt-1_43.lib; DestDir: {app}\lib_x64
Source: ..\..\3rdpartypublic\boost\stage_x64\lib\libboost_date_time-vc90-mt-gd-1_43.lib; DestDir: {app}\lib_x64
Source: ..\..\3rdpartypublic\boost\stage_x64\lib\libboost_thread-vc90-mt-1_43.lib; DestDir: {app}\lib_x64
Source: ..\..\3rdpartypublic\boost\stage_x64\lib\libboost_thread-vc90-mt-gd-1_43.lib; DestDir: {app}\lib_x64

; test files
Source: ..\lib_Win32\MMCored.lib; DestDir: {app}\lib_Win32
Source: ..\lib_Win32\MMCorer.lib; DestDir: {app}\lib_Win32
Source: ..\lib_x64\MMCored.lib; DestDir: {app}\lib_x64
Source: ..\lib_x64\MMCorer.lib; DestDir: {app}\lib_x64
Source: ..\Test_Programs\ModuleTest\ModuleTest.cpp; DestDir: {app}\Test_Programs\ModuleTest
Source: ..\Test_Programs\ModuleTest\ModuleTest.vcproj; DestDir: {app}\Test_Programs\ModuleTest
Source: ..\Test_Programs\ModuleTest\ModuleTest.sln; DestDir: {app}\Test_Programs\ModuleTest

Source: ..\Test_Programs\MMCoreTest\*; DestDir: {app}\Test_Programs\MMCoreTest
; pickup whatever matching device adapters we've put into the running directory
Source: ..\Test_Programs\MMCoreTest\Win32\Release\*; DestDir: {app}\Test_Programs\MMCoreTest\Win32\Release
Source: ..\Test_Programs\MMCoreTest\x64\Release\*; DestDir: {app}\Test_Programs\MMCoreTest\x64\Release
Source: ..\Test_Programs\MMCoreTest\Win32\Debug\*; DestDir: {app}\Test_Programs\MMCoreTest\Win32\Debug
Source: ..\Test_Programs\MMCoreTest\x64\Debug\*; DestDir: {app}\Test_Programs\MMCoreTest\x64\Debug

; MMCore files
Source: ..\MMCore\*; DestDir: {app}\MMCore

; scripting files
; confusing to include these with the core_test
;Source: ..\scripts\*; DestDir: {app}\scripts


Simplified Windows CRT inclusion in InnoSetup.

;
;   This file is part of Poedit (http://www.poedit.net)
;
;   Copyright (C) 1999-2010 Vaclav Slavik
;
;   Permission is hereby granted, free of charge, to any person obtaining a
;   copy of this software and associated documentation files (the "Software"),
;   to deal in the Software without restriction, including without limitation
;   the rights to use, copy, modify, merge, publish, distribute, sublicense,
;   and/or sell copies of the Software, and to permit persons to whom the
;   Software is furnished to do so, subject to the following conditions:
;
;   The above copyright notice and this permission notice shall be included in
;   all copies or substantial portions of the Software.
;
;   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
;   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
;   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
;   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
;   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
;   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
;   DEALINGS IN THE SOFTWARE.
;
;   $Id$
;
;   Inno Setup installer script
;

#define VERSION          "1.4.6"
#define VERSION_FULL     "1.4.6"

#ifndef CRT_REDIST
#define CRT_REDIST       "C:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT"
#endif

#include "poedit-locale-files.iss"

[Setup]
OutputBaseFilename=poedit-{#VERSION_FULL}-setup
AppName=Poedit
AppVerName=Poedit {#VERSION_FULL}

PrivilegesRequired=none
ChangesAssociations=true
AlwaysShowComponentsList=true
SourceDir=..
DefaultDirName={pf}\Poedit
DefaultGroupName=Poedit
AllowNoIcons=true
LicenseFile=COPYING
OutputDir=distrib
InfoAfterFile=
Compression=lzma/ultra
WindowShowCaption=true
WindowStartMaximized=false
FlatComponentsList=true
WindowResizable=true
SolidCompression=true
ShowLanguageDialog=no
AllowUNCPath=true
InternalCompressLevel=ultra
AppID={{68EB2C37-083A-4303-B5D8-41FA67E50B8F}
VersionInfoVersion={#VERSION}
VersionInfoTextVersion={#VERSION_FULL}
AppCopyright= 1999-2010 Vaclav Slavik
AppPublisher=Vaclav Slavik
AppSupportURL=http://www.poedit.net/support.php
AppUpdatesURL=http://www.poedit.net/download.php
AppVersion={#VERSION_FULL}
AppContact=poedit-users@lists.sourceforge.net
UninstallDisplayIcon={app}\bin\poedit.exe
UninstallDisplayName=Poedit
MinVersion=0,5.0.2195
WizardSmallImageFile=icons\win32\installer_wizard_image.bmp
AppPublisherURL=http://www.poedit.net/

[LangOptions]
; make the installer use standard (WinXP, ...) fonts
DialogFontName=Tahoma
DialogFontSize=8

[Files]
Source: win32\Release\poedit.exe; DestDir: {app}\bin; DestName: poedit.exe; Components: core
Source: deps\gettext\COPYING; DestDir: {app}\doc; Components: docs; DestName: GNU_Gettext_COPYING.txt
Source: deps\bin-gettext\bin\xgettext.exe; DestDir: {app}\bin; Components: core
Source: deps\bin-gettext\bin\msgmerge.exe; DestDir: {app}\bin; Components: core
Source: deps\bin-gettext\bin\msgunfmt.exe; DestDir: {app}\bin; Components: core
Source: deps\bin-gettext\bin\msgfmt.exe; DestDir: {app}\bin; Components: core
Source: deps\bin-gettext\bin\msgcat.exe; DestDir: {app}\bin; Components: core
Source: deps\bin-gettext\bin\*.dll; DestDir: {app}\bin; Components: core
Source: deps\db\build_windows\Win32\Release\libdb*.dll; DestDir: {app}\bin; Components: core
Source: deps\winsparkle\WinSparkle.dll; DestDir: {app}\bin; Components: core
Source: README; DestDir: {app}\doc; DestName: readme.txt; Components: docs
Source: docs\chm\poedit.chm; DestDir: {app}\share\poedit\help\en; Components: docs
Source: docs\chm\gettext.chm; DestDir: {app}\share\poedit\help\en\gettext; Components: docs
Source: docs\chm\poedit-hr.chm; DestDir: {app}\share\poedit\help\hr; Components: i18n
Source: COPYING; DestDir: {app}\doc; DestName: copying.txt; Components: docs
Source: NEWS; DestDir: {app}\doc; DestName: news.txt; Components: docs
Source: icons\ui\*.png; DestDir: {app}\share\poedit\icons; Components: core
Source: icons\win32\xp\*.ico; DestDir: {app}\share\poedit\icons; Components: core; OnlyBelowVersion: 0,6.0.6000
Source: icons\win32\vista\*.ico; DestDir: {app}\share\poedit\icons; Components: core; MinVersion: 0,6.0.6000
Source: {#CRT_REDIST}\Microsoft.*.CRT.manifest; DestDir: {app}\bin; Components: core
Source: {#CRT_REDIST}\*.dll; DestDir: {app}\bin; Components: core
#emit LocaleFiles

[InstallDelete]
; delete files from previous versions that are no longer needed (and in case of
; poedit.exe.manifest, actually harmful):
Name: {app}\bin\poedit.exe.manifest; Type: files; Components: core
Name: {app}\bin\gettextlib.dll; Type: files; Components: core
Name: {app}\bin\gettextsrc.dll; Type: files; Components: core
Name: {app}\bin\iconv.dll; Type: files; Components: core
Name: {app}\bin\intl.dll; Type: files; Components: core
Name: {app}\bin\mingwm10.dll; Type: files; Components: core

[Registry]
Root: HKCR; SubKey: .po; ValueType: string; ValueData: GettextFile; Flags: uninsdeletekey noerror
Root: HKCR; SubKey: GettextFile; ValueType: string; ValueData: Gettext message catalog; Flags: uninsdeletekey noerror
Root: HKCR; SubKey: GettextFile\Shell\Open\Command; ValueType: string; ValueData: """{app}\bin\poedit.exe"" ""%1"""; Flags: uninsdeletevalue noerror
Root: HKCR; Subkey: GettextFile\DefaultIcon; ValueType: string; ValueData: {app}\share\poedit\icons\poedit-translation-generic.ico; Flags: uninsdeletekey noerror
Root: HKCU; Subkey: Software\Vaclav Slavik; Flags: uninsdeletekeyifempty dontcreatekey
Root: HKCU; Subkey: Software\Vaclav Slavik\poedit; Flags: uninsdeletekey dontcreatekey

[Icons]
Name: {group}\Poedit; Filename: {app}\bin\poedit.exe; WorkingDir: {app}; IconIndex: 0
Name: {group}\Readme; Filename: {app}\doc\readme.txt; IconIndex: 0

[Run]
Filename: {app}\doc\readme.txt; Description: View readme.txt; Flags: shellexec postinstall unchecked; Components: docs
Filename: {app}\bin\poedit.exe; WorkingDir: {app}; Description: Run Poedit now; Flags: postinstall unchecked nowait

[_ISTool]
UseAbsolutePaths=false

[Dirs]
Name: {app}\bin; Components: core
Name: {app}\doc; Components: docs
Name: {app}\share; Components: core
Name: {app}\share\locale; Components: i18n
Name: {app}\share\poedit; Components: core
Name: {app}\share\poedit\icons; Components: core
Name: {app}\share\poedit\help; Components: docs
Name: {app}\share\poedit\help\en; Components: docs
Name: {app}\share\poedit\help\en\gettext; Components: docs
Name: {app}\share\poedit\help\hr; Components: docs

[Components]
Name: core; Description: Core files; Flags: fixed; Types: custom compact full
Name: docs; Description: Documentation; Types: custom compact full
Name: i18n; Description: Localization files for the UI; Types: full

[Messages]
BeveledLabel=http://www.poedit.net

;
;   This file is part of Poedit (http://www.poedit.net)
;
;   Copyright (C) 1999-2010 Vaclav Slavik
;
;   Permission is hereby granted, free of charge, to any person obtaining a
;   copy of this software and associated documentation files (the "Software"),
;   to deal in the Software without restriction, including without limitation
;   the rights to use, copy, modify, merge, publish, distribute, sublicense,
;   and/or sell copies of the Software, and to permit persons to whom the
;   Software is furnished to do so, subject to the following conditions:
;
;   The above copyright notice and this permission notice shall be included in
;   all copies or substantial portions of the Software.
;
;   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
;   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
;   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
;   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
;   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
;   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
;   DEALINGS IN THE SOFTWARE.
;
;   $Id$
;
;   Inno Setup installer script
;

#define VERSION          "1.4.6"
#define VERSION_FULL     "1.4.6"

; FIXME: extract this from manifest file somehow?
#define CRT_VERSION      "8.0.50727.762"
#define CRT_HASH1        "1fc8b3b9a1e18e3b"
#define CRT_HASH2        "6b128700"
#define ASSEMBLY         "x86_Microsoft.VC80.CRT_" + CRT_HASH1 + "_" + CRT_VERSION + "_x-ww_" + CRT_HASH2
#define WINDIR           GetEnv("WINDIR")

#include "poedit-locale-files.iss"

[Setup]
OutputBaseFilename=poedit-{#VERSION_FULL}-setup
AppName=Poedit
AppVerName=Poedit {#VERSION_FULL}

PrivilegesRequired=none
ChangesAssociations=true
AlwaysShowComponentsList=true
SourceDir=..
DefaultDirName={pf}\Poedit
DefaultGroupName=Poedit
AllowNoIcons=true
LicenseFile=COPYING
OutputDir=distrib
InfoAfterFile=
Compression=lzma/ultra
WindowShowCaption=true
WindowStartMaximized=false
FlatComponentsList=true
WindowResizable=true
SolidCompression=true
ShowLanguageDialog=no
AllowUNCPath=true
InternalCompressLevel=ultra
AppID={{68EB2C37-083A-4303-B5D8-41FA67E50B8F}
VersionInfoVersion={#VERSION}
VersionInfoTextVersion={#VERSION_FULL}
AppCopyright= 1999-2010 Vaclav Slavik
AppPublisher=Vaclav Slavik
AppSupportURL=http://www.poedit.net/support.php
AppUpdatesURL=http://www.poedit.net/download.php
AppVersion={#VERSION_FULL}
AppContact=poedit-users@lists.sourceforge.net
UninstallDisplayIcon={app}\bin\poedit.exe
UninstallDisplayName=Poedit
MinVersion=0,5.0.2195
WizardSmallImageFile=icons\win32\installer_wizard_image.bmp
AppPublisherURL=http://www.poedit.net/

[LangOptions]
; make the installer use standard (WinXP, ...) fonts
DialogFontName=Tahoma
DialogFontSize=8

[Files]
Source: win32\Release\poedit.exe; DestDir: {app}\bin; DestName: poedit.exe; Components: core
Source: deps\gettext\COPYING; DestDir: {app}\doc; Components: docs; DestName: GNU_Gettext_COPYING.txt
Source: deps\bin-gettext\bin\xgettext.exe; DestDir: {app}\bin; Components: core
Source: deps\bin-gettext\bin\msgmerge.exe; DestDir: {app}\bin; Components: core
Source: deps\bin-gettext\bin\msgunfmt.exe; DestDir: {app}\bin; Components: core
Source: deps\bin-gettext\bin\msgfmt.exe; DestDir: {app}\bin; Components: core
Source: deps\bin-gettext\bin\msgcat.exe; DestDir: {app}\bin; Components: core
Source: deps\bin-gettext\bin\*.dll; DestDir: {app}\bin; Components: core
Source: deps\db\build_windows\Win32\Release\libdb*.dll; DestDir: {app}\bin; Components: core
Source: deps\winsparkle\WinSparkle.dll; DestDir: {app}\bin; Components: core
Source: README; DestDir: {app}\doc; DestName: readme.txt; Components: docs
Source: docs\chm\poedit.chm; DestDir: {app}\share\poedit\help\en; Components: docs
Source: docs\chm\gettext.chm; DestDir: {app}\share\poedit\help\en\gettext; Components: docs
Source: docs\chm\poedit-hr.chm; DestDir: {app}\share\poedit\help\hr; Components: i18n
Source: COPYING; DestDir: {app}\doc; DestName: copying.txt; Components: docs
Source: NEWS; DestDir: {app}\doc; DestName: news.txt; Components: docs
Source: icons\ui\*.png; DestDir: {app}\share\poedit\icons; Components: core
Source: icons\win32\xp\*.ico; DestDir: {app}\share\poedit\icons; Components: core; OnlyBelowVersion: 0,6.0.6000
Source: icons\win32\vista\*.ico; DestDir: {app}\share\poedit\icons; Components: core; MinVersion: 0,6.0.6000
Source: {#WINDIR}\WinSxS\Manifests\{#ASSEMBLY}.manifest; DestDir: {app}\bin; Components: core; DestName: Microsoft.VC80.CRT.manifest
Source: {#WINDIR}\WinSxS\{#ASSEMBLY}\*.dll; DestDir: {app}\bin; Components: core
#emit LocaleFiles

[InstallDelete]
; delete files from previous versions that are no longer needed (and in case of
; poedit.exe.manifest, actually harmful):
Name: {app}\bin\poedit.exe.manifest; Type: files; Components: core
Name: {app}\bin\gettextlib.dll; Type: files; Components: core
Name: {app}\bin\gettextsrc.dll; Type: files; Components: core
Name: {app}\bin\iconv.dll; Type: files; Components: core
Name: {app}\bin\intl.dll; Type: files; Components: core
Name: {app}\bin\mingwm10.dll; Type: files; Components: core

[Registry]
Root: HKCR; SubKey: .po; ValueType: string; ValueData: GettextFile; Flags: uninsdeletekey noerror
Root: HKCR; SubKey: GettextFile; ValueType: string; ValueData: Gettext message catalog; Flags: uninsdeletekey noerror
Root: HKCR; SubKey: GettextFile\Shell\Open\Command; ValueType: string; ValueData: """{app}\bin\poedit.exe"" ""%1"""; Flags: uninsdeletevalue noerror
Root: HKCR; Subkey: GettextFile\DefaultIcon; ValueType: string; ValueData: {app}\share\poedit\icons\poedit-translation-generic.ico; Flags: uninsdeletekey noerror
Root: HKCU; Subkey: Software\Vaclav Slavik; Flags: uninsdeletekeyifempty dontcreatekey
Root: HKCU; Subkey: Software\Vaclav Slavik\poedit; Flags: uninsdeletekey dontcreatekey

[Icons]
Name: {group}\Poedit; Filename: {app}\bin\poedit.exe; WorkingDir: {app}; IconIndex: 0
Name: {group}\Readme; Filename: {app}\doc\readme.txt; IconIndex: 0

[Run]
Filename: {app}\doc\readme.txt; Description: View readme.txt; Flags: shellexec postinstall unchecked; Components: docs
Filename: {app}\bin\poedit.exe; WorkingDir: {app}; Description: Run Poedit now; Flags: postinstall unchecked nowait

[_ISTool]
UseAbsolutePaths=false

[Dirs]
Name: {app}\bin; Components: core
Name: {app}\doc; Components: docs
Name: {app}\share; Components: core
Name: {app}\share\locale; Components: i18n
Name: {app}\share\poedit; Components: core
Name: {app}\share\poedit\icons; Components: core
Name: {app}\share\poedit\help; Components: docs
Name: {app}\share\poedit\help\en; Components: docs
Name: {app}\share\poedit\help\en\gettext; Components: docs
Name: {app}\share\poedit\help\hr; Components: docs

[Components]
Name: core; Description: Core files; Flags: fixed; Types: custom compact full
Name: docs; Description: Documentation; Types: custom compact full
Name: i18n; Description: Localization files for the UI; Types: full

[Messages]
BeveledLabel=http://www.poedit.net