Version bump in installer to 0.2.1

Version bump in installer to 0.2.1

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

#define MyAppName "Articulate"
#define MyAppVersion "0.2.1"
#define MyAppPublisher "Articulate Team"
#define MyAppURL "https://github.com/Mpstark/articulate"
#define MyAppExeName "Articulate.exe"
#define SetupFileName "ArticulateSetup"
#define Copyright "Copyright  2013 Michael Starkweather, Benjamin Pannell, and other contributors."
#define Mutex "Articulate"
#define ReleaseType "Development Preview"

#define depends_net45

[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={{DDA3C095-838A-4287-AA38-CAE8C191ED5C}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppVerName={#MyAppName} v{#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL="http://forums.bistudio.com/showthread.php?166228-Articulate-Squad-Voice-Command-Utility-for-Arma-3"
AppUpdatesURL="https://github.com/Mpstark/articulate/releases"
DefaultDirName={pf}\Articulate
DefaultGroupName=Articulate
AllowNoIcons=true
LicenseFile=..\LICENSE.txt
OutputBaseFilename={#SetupFileName}
SetupIconFile=..\Articulate\Main.ico
Compression=lzma2/Ultra
SolidCompression=true
WizardImageFile="LargeLogo.bmp"
WizardSmallImageFile="SmallLogo.bmp"
WizardImageBackColor=clWhite
WizardImageStretch=false
AppCopyright={#Copyright}
AppMutex={#Mutex}
OutputDir=..\Release
MinVersion=5.1.2600sp3
UninstallDisplayName={#MyAppName}
AppComments=Remove {#MyAppName} from your computer
AppContact=GitHub/BI Forums
AppReadmeFile={app}\Readme.md
UninstallDisplayIcon={app}\Articulate.exe
VersionInfoVersion={#MyAppVersion}
VersionInfoCompany=Articulate Team
VersionInfoTextVersion=v{#MyAppVersion} {#ReleaseType}
VersionInfoCopyright={#Copyright}
VersionInfoProductName={#MyAppName}
VersionInfoProductVersion={#MyAppVersion}
ShowLanguageDialog=auto
UninstallLogMode=append
UninstallFilesDir={app}
InternalCompressLevel=Ultra
VersionInfoProductTextVersion=v{#MyAppVersion} {#ReleaseType}

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

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

[Files]
Source: "..\Readme.md"; DestDir: "{app}"; Flags: ignoreversion

;NETKey
Source: ..\Articulate\bin\Release\Articulate.exe; DestDir: "{app}"; Flags: ignoreversion; Permissions: authusers-full
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon

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

#include "scripts\products.iss"
#include "scripts\products\stringversion.iss"
#include "scripts\products\winversion.iss"
#include "scripts\products\fileversion.iss"
#include "scripts\products\dotnetfxversion.iss"
#ifdef depends_net45
#include "scripts\products\dotnetfx45.iss"
#endif

[Code]
function InitializeSetup(): boolean;
begin
	//init windows version
	initwinversion();

	// if no .netfx 4.0 is found, install the client (smallest)
	if (not netfxinstalled(NetFx45, '')) then
		dotnetfx45();

	Result := true;
end;

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

#define MyAppName "Articulate"
#define MyAppVersion "0.2.0"
#define MyAppPublisher "Articulate Team"
#define MyAppURL "https://github.com/Mpstark/articulate"
#define MyAppExeName "Articulate.exe"
#define SetupFileName "ArticulateSetup"
#define Copyright "Copyright  2013 Michael Starkweather, Benjamin Pannell, and other contributors."
#define Mutex "Articulate"
#define ReleaseType "Development Preview"

#define depends_net45

[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={{DDA3C095-838A-4287-AA38-CAE8C191ED5C}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppVerName={#MyAppName} v{#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL="http://forums.bistudio.com/showthread.php?166228-Articulate-Squad-Voice-Command-Utility-for-Arma-3"
AppUpdatesURL="https://github.com/Mpstark/articulate/releases"
DefaultDirName={pf}\Articulate
DefaultGroupName=Articulate
AllowNoIcons=true
LicenseFile=..\LICENSE.txt
OutputBaseFilename={#SetupFileName}
SetupIconFile=..\Articulate\Main.ico
Compression=lzma2/Ultra
SolidCompression=true
WizardImageFile="LargeLogo.bmp"
WizardSmallImageFile="SmallLogo.bmp"
WizardImageBackColor=clWhite
WizardImageStretch=false
AppCopyright={#Copyright}
AppMutex={#Mutex}
OutputDir=..\Release
MinVersion=5.1.2600sp3
UninstallDisplayName={#MyAppName}
AppComments=Remove {#MyAppName} from your computer
AppContact=GitHub/BI Forums
AppReadmeFile={app}\Readme.md
UninstallDisplayIcon={app}\Articulate.exe
VersionInfoVersion={#MyAppVersion}
VersionInfoCompany=Articulate Team
VersionInfoTextVersion=v{#MyAppVersion} {#ReleaseType}
VersionInfoCopyright={#Copyright}
VersionInfoProductName={#MyAppName}
VersionInfoProductVersion={#MyAppVersion}
ShowLanguageDialog=auto
UninstallLogMode=append
UninstallFilesDir={app}
InternalCompressLevel=Ultra
VersionInfoProductTextVersion=v{#MyAppVersion} {#ReleaseType}

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

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

[Files]
Source: "..\Readme.md"; DestDir: "{app}"; Flags: ignoreversion

;NETKey
Source: ..\Articulate\bin\Release\Articulate.exe; DestDir: "{app}"; Flags: ignoreversion; Permissions: authusers-full
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon

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

#include "scripts\products.iss"
#include "scripts\products\stringversion.iss"
#include "scripts\products\winversion.iss"
#include "scripts\products\fileversion.iss"
#include "scripts\products\dotnetfxversion.iss"
#ifdef depends_net45
#include "scripts\products\dotnetfx45.iss"
#endif

[Code]
function InitializeSetup(): boolean;
begin
	//init windows version
	initwinversion();

	// if no .netfx 4.0 is found, install the client (smallest)
	if (not netfxinstalled(NetFx45, '')) then
		dotnetfx45();

	Result := true;
end;


Disable tasks page in unstaller wizard

Disable tasks page in unstaller wizard

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

#define AppVersion ""
#define AppName "Dependinator"
#define AppPublisher "Michael Reichenauer"
#define AppURL "https://github.com/michael-reichenauer/Dependinator"
#define AppExeName "Dependinator.exe"
#define AppTmpSetupName "_tmp_SetupDependinator.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={{ee48e8b2-701f-4881-815f-dc7fd8139061}
AppMutex=ee48e8b2-701f-4881-815f-dc7fd8139061
AppName={#AppName}
AppVersion={#AppVersion}
AppVerName={#AppName} {#AppVersion}
AppPublisher={#AppPublisher}
AppPublisherURL={#AppURL}
AppSupportURL={#AppURL}
AppUpdatesURL={#AppURL}
AppCopyright= {#AppPublisher}
DefaultDirName={commonappdata}\{#AppName}
DisableDirPage=yes
DisableProgramGroupPage=yes
OutputDir=..
OutputBaseFilename=DependinatorSetup
SetupIconFile=..\Dependinator\MainWindowViews\Application.ico
UninstallDisplayIcon={app}\Dependinator.exe
Compression=lzma
SolidCompression=yes
AllowCancelDuringInstall=false
DisableWelcomePage=False
WizardImageFile=WizModernImage-IS.bmp
WizardSmallImageFile=WizModernSmallImage-IS.bmp
PrivilegesRequired=lowest
RestartIfNeededByRun=False
MinVersion=0,6.1
UsePreviousGroup=False
AppendDefaultGroupName=False
DisableReadyMemo=True

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

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

[Files]
Source: "..\Dependinator\bin\Release\Dependinator.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\Dependinator\bin\Release\Dependinator.exe"; DestDir: "{app}"; DestName:"{#AppTmpSetupName}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Name: "{userstartmenu}\{#AppName}"; Filename: "{app}\{#AppExeName}"
Name: "{commondesktop}\{#AppName}"; Filename: "{app}\{#AppExeName}"; Tasks: desktopicon

[Run]
Filename: "{app}\{#AppTmpSetupName}"; Parameters: "/install /silent";
Filename: "{app}\{#AppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(AppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent

[UninstallDelete]
Type: filesandordirs; Name: "{app}"

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

#define AppVersion ""
#define AppName "Dependinator"
#define AppPublisher "Michael Reichenauer"
#define AppURL "https://github.com/michael-reichenauer/Dependinator"
#define AppExeName "Dependinator.exe"
#define AppTmpSetupName "_tmp_SetupDependinator.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={{ee48e8b2-701f-4881-815f-dc7fd8139061}
AppMutex=ee48e8b2-701f-4881-815f-dc7fd8139061
AppName={#AppName}
AppVersion={#AppVersion}
AppVerName={#AppName} {#AppVersion}
AppPublisher={#AppPublisher}
AppPublisherURL={#AppURL}
AppSupportURL={#AppURL}
AppUpdatesURL={#AppURL}
AppCopyright= {#AppPublisher}
DefaultDirName={commonappdata}\{#AppName}
DisableDirPage=yes
DisableProgramGroupPage=yes
OutputDir=..
OutputBaseFilename=DependinatorSetup
SetupIconFile=..\Dependinator\MainWindowViews\Application.ico
UninstallDisplayIcon={app}\Dependinator.exe
Compression=lzma
SolidCompression=yes
AllowCancelDuringInstall=false
DisableWelcomePage=False
WizardImageFile=WizModernImage-IS.bmp
WizardSmallImageFile=WizModernSmallImage-IS.bmp
PrivilegesRequired=lowest
RestartIfNeededByRun=False
MinVersion=0,6.1
UsePreviousGroup=False
AppendDefaultGroupName=False

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

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

[Files]
Source: "..\Dependinator\bin\Release\Dependinator.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\Dependinator\bin\Release\Dependinator.exe"; DestDir: "{app}"; DestName:"{#AppTmpSetupName}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Name: "{userstartmenu}\{#AppName}"; Filename: "{app}\{#AppExeName}"
Name: "{commondesktop}\{#AppName}"; Filename: "{app}\{#AppExeName}"; Tasks: desktopicon

[Run]
Filename: "{app}\{#AppTmpSetupName}"; Parameters: "/install /silent";
Filename: "{app}\{#AppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(AppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent

[UninstallDelete]
Type: filesandordirs; Name: "{app}"


Updated Python stand-alone installer

Updated Python stand-alone installer

// =============================================================================
// PROJECT CHRONO - http://projectchrono.org
//
// Copyright (c) 2016 projectchrono.org
// All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found
// in the LICENSE file at the top level of the distribution and at
// http://projectchrono.org/license-chrono.txt.
//
// =============================================================================

#include "ModifyPath.iss"

#define MyAppName "ChronoPyEngine"
#define MyAppVersion "v3.0.0"
#define MyAppPublisher "Alessandro Tasora"
#define MyAppURL "http://www.chronoengine.info"
#define MyWin64PythonDir  "D:\build\chrono\bin\Release"
#define MyPythonVers "3.3"
#define MyChronoEngineSDK "C:\tasora\code\projectchrono\chrono"

[Setup]
ShowLanguageDialog=yes
UserInfoPage=no
AppName={#MyAppName}
AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
WizardImageFile=SetupModern20.bmp
WizardSmallImageFile=SetupModernSmall26.bmp
PrivilegesRequired=admin
;Compression=none
OutputDir=c:\tasora\lavori\data_chrono
OutputBaseFilename=ChronoPyEngine_{#MyAppVersion}
ArchitecturesInstallIn64BitMode=x64
ChangesEnvironment=yes
DisableProgramGroupPage=yes

[Files]
Source: {#MyChronoEngineSDK}\data\*; Excludes: "*\.svn,\mpi,\vehicle,\cascade"; DestDir: "{app}\data"; Flags: recursesubdirs createallsubdirs
Source: {#MyChronoEngineSDK}\src\demos\python\*; DestDir: "{app}\src\demos\python\"; Flags: recursesubdirs createallsubdirs

Source: {#MyWin64PythonDir}\_ChronoEngine_python_core.pyd; DestDir: {app};  Flags: ignoreversion;  Check: myFoundWin64Python;
Source: {#MyWin64PythonDir}\_ChronoEngine_python_postprocess.pyd; DestDir: {app};  Flags: ignoreversion;  Check: myFoundWin64Python;
Source: {#MyWin64PythonDir}\_ChronoEngine_python_irrlicht.pyd; DestDir: {app};  Flags: ignoreversion;  Check: myFoundWin64Python;
Source: {#MyWin64PythonDir}\_ChronoEngine_python_fea.pyd; DestDir: {app};  Flags: ignoreversion;  Check: myFoundWin64Python;
Source: {#MyWin64PythonDir}\ChronoEngine.dll; DestDir: {app};  Flags: ignoreversion;  Check: myFoundWin64Python;
Source: {#MyWin64PythonDir}\ChronoEngine_postprocess.dll; DestDir: {app};  Flags: ignoreversion;  Check: myFoundWin64Python;
Source: {#MyWin64PythonDir}\ChronoEngine_irrlicht.dll; DestDir: {app};  Flags: ignoreversion;  Check: myFoundWin64Python;
Source: {#MyWin64PythonDir}\ChronoEngine_fea.dll; DestDir: {app};  Flags: ignoreversion;  Check: myFoundWin64Python;
Source: {#MyWin64PythonDir}\Irrlicht.dll; DestDir: {app};  Flags: ignoreversion;  Check: myFoundWin64Python;
Source: {#MyWin64PythonDir}\ChronoEngine_python_core.py; DestDir: {app};  Flags: ignoreversion;  Check: myFoundWin64Python;
Source: {#MyWin64PythonDir}\ChronoEngine_python_postprocess.py; DestDir: {app};  Flags: ignoreversion;  Check: myFoundWin64Python;
Source: {#MyWin64PythonDir}\ChronoEngine_python_irrlicht.py; DestDir: {app};  Flags: ignoreversion;  Check: myFoundWin64Python;
Source: {#MyWin64PythonDir}\ChronoEngine_python_fea.py; DestDir: {app};  Flags: ignoreversion;  Check: myFoundWin64Python;

[Icons]
Name: "{group}\ProjectChrono"; Filename: "http://www.projectchrono.org"
Name: "{group}\Getting started"; Filename: "http://api.chrono.projectchrono.org/introduction_chrono_pyengine.html"
Name: "{group}\Demos"; Filename: "{app}\src\demos\python\"
Name: "{group}\Uninstall"; Filename: "{uninstallexe}"

[Registry]
Root: "HKCU"; Subkey: "Environment"; ValueType: string; ValueName: "PYTHONPATH"; ValueData: "{app}"; Flags: createvalueifdoesntexist;
Root: "HKCU"; Subkey: "Environment"; ValueType: string; ValueName: "PYTHONPATH"; ValueData: "{olddata};{app}"; Flags: dontcreatekey; Check: NeedsAddPath(ExpandConstant('{app}'))

[Code]
var
  DataDirPage: TInputDirWizardPage;
  RegisterPathPage: TWizardPage;
  InstallHelpCheckBox: TNewCheckBox;
  InstallHelpLabel: TLabel;
  mFoundWin32Python: Integer;
  mPathWin32Python: String;
  mPathWin32PythonLib: String;
  mPathWin32PythonDLLs: String;
  mFoundWin64Python: Integer;
  mPathWin64Python: String;
  mPathWin64PythonLib: String;
  mPathWin64PythonDLLs: String;

function myFoundWin32Python: Boolean;
begin
  Result := mFoundWin32Python =1;
end;
function myGetPathWin32Python(Param: String): String;
begin
  Result := mPathWin32Python;
end;
function myGetPathWin32PythonLib(Param: String): String;
begin
  Result := mPathWin32PythonLib;
end;
function myGetPathWin32PythonDLLs(Param: String): String;
begin
  Result := mPathWin32PythonDLLs;
end;
function myFoundWin64Python: Boolean;
begin
  Result := mFoundWin64Python =1;
end;
function myGetPathWin64Python(Param: String): String;
begin
  Result := mPathWin64Python;
end;
function myGetPathWin64PythonLib(Param: String): String;
begin
  Result := mPathWin64PythonLib;
end;
function myGetPathWin64PythonDLLs(Param: String): String;
begin
  Result := mPathWin64PythonDLLs;
end;
function CheckAppendPath: Boolean;
begin
  Result := InstallHelpCheckBox.Checked=True;
end;

procedure InitializeWizard;
var
  mTitlePythondir: String;
  mallDirPython: String;
  mCut: Integer;
  myvers: String;
begin

  // CHECK PYTHON INSTALLATION
  mFoundWin32Python := 0;
  mFoundWin64Python := 0;

  myvers := '{#MyPythonVers}';

  if (IsWin64) then
  begin
    // CASE OF 64 BIT PLATFORM

        // find 64 bit python:
    if RegQueryStringValue(HKLM64,
                    'SOFTWARE\Python\PythonCore\' +  myvers+ '\InstallPath',
                    '',
                    mallDirPython) then
    begin
          //MsgBox('FOUND! 64bit !'#13#13 + mallDirPython, mbError, MB_OK);
          mPathWin64Python := mallDirPython;
          mFoundWin64Python := 1;
    end

        // find 32 bit python:
    if RegQueryStringValue(HKEY_LOCAL_MACHINE,
                    'SOFTWARE\Wow6432Node\Python\PythonCore\' +  myvers+ '\InstallPath',
                    '',
                    mallDirPython) then
    begin
          //MsgBox('Attention. Found a 32bit version of Python on your system. The Chrono::PyEngine provided with this installer will work only with the 64 bit version. !'#13#13 + mallDirPython, mbError, MB_OK);
          mPathWin32Python := mallDirPython;
          mFoundWin32Python := 1;
    end

  end
  else
  begin
    // CASE OF 32 BIT PLATFORM

    // find 32 bit python:
    if RegQueryStringValue(HKEY_LOCAL_MACHINE,
                    'SOFTWARE\Python\PythonCore\' +  myvers+ '\InstallPath',
                    '',
                    mallDirPython) then
    begin
          //MsgBox('Attention. Found a 32bit version of Python on your system. The Chrono::PyEngine provided with this installer will work only with the 64 bit version. !'#13#13 + mallDirPython, mbError, MB_OK);
          mPathWin32Python := mallDirPython;
          mFoundWin32Python := 1;
    end

  end

  mPathWin32PythonDLLs := mPathWin32Python;// AddBackslash(mPathWin32Python) + 'DLLs';
  mPathWin32PythonLib  := mPathWin32Python;// AddBackslash(mPathWin32Python) + 'Lib';
  mPathWin64PythonDLLs := mPathWin64Python;// AddBackslash(mPathWin64Python) + 'DLLs';
  mPathWin64PythonLib  := mPathWin64Python;// AddBackslash(mPathWin64Python) + 'Lib';

  { Create the pages }

  //
  // Select directory dialog for plugin
  //
  if mFoundWin64Python = 1 then begin mTitlePythondir := 'A copy of 64bit Python has been automatically detected, installed in this directory.'#13+
                                   '- you can install the Chrono::PyEngine libraries here (check that you have administrative previleges),'#13+
                                   '- or you can choose a different directory (preferred). If so, remember that you must '#13+
                                   '  set/append this directory to the PYTHONPATH environment variable.';
                    end else begin mTitlePythondir := 'A 64bit installation of Python has NOT been automatically found!. '#13+
                                   'Nevertheless, you can still go on with the installation, something went'#13+
                                   'wrong with your registry keys. Note: after the installation, in order for'#13+
                                   'the generated Python modules to be accessible, you must set/append this directory'#13+
                                   'to the PYTHONPATH environment variable.'; end

  DataDirPage := CreateInputDirPage(wpWelcome,
    'Choose directory for installation', 'Where do you want to install the Chrono::PyEngine libraries?',
    mTitlePythondir,
    False, '');
  DataDirPage.Add('');
  DataDirPage.Values[0] := Format('%s\', [mPathWin64Python] );

  RegisterPathPage := CreateCustomPage(wpSelectDir,
    'Set PYTHONPATH',
    'Automatically set the PYTHONPATH environment variable'#13 + 'with the installation path?');
  InstallHelpCheckBox := TNewCheckBox.Create(RegisterPathPage);
  InstallHelpCheckBox.Parent := RegisterPathPage.Surface;
  InstallHelpCheckBox.Checked := True;
  InstallHelpCheckBox.Width := 300;
  InstallHelpCheckBox.Caption := 'Set PYTHONPATH';

  InstallHelpLabel := TLabel.Create(RegisterPathPage);
  InstallHelpLabel.Parent := RegisterPathPage.Surface;
  InstallHelpLabel.Width := 300;
  InstallHelpLabel.Height := 300;
  InstallHelpLabel.Caption := ''#13#13#13#13 +
    'When Python is started, it looks for additional modules (.pyd files) in' + #13 +
    'its directory, in the global paths, or in the PYTHONPATH directories.' + #13 +
    'So, we need to make also Chrono modules accessible to Python via PYTHONPATH.' + #13 +
    '' + #13 +
    'This option will automatically append the install directory' + #13 +
    'to your PYTHONPATH environment variable. ' + #13 +
    '- If PYTHONPATH does not exist, it will create it.' + #13 +
    '- If PYTHONPATH already contains the install directory (for' + #13 +
    '  instance, because you installed Chrono::PyEngine in the past)' + #13 +
    '  this will not be appended.' + #13 +
    '' + #13 +
    'NOTE! If you do not select this, you must remember to append it manually!';

end;

// OBSOLETE
function NextButtonClick(CurPageID: Integer): Boolean;
var
  I: Integer;
  mfilesize: Integer;
begin

  //
  // After the user has entered data...
  //
  if CurPageID = DataDirPage.ID then begin

      mPathWin64Python     := DataDirPage.Values[0];
      mPathWin64PythonDLLs := mPathWin64Python; //:= AddBackslash(mPathWin64Python) + 'DLLs';
      mPathWin64PythonLib  := mPathWin64Python; //:= AddBackslash(mPathWin64Python) + 'Lib';

      if FileOrDirExists(mPathWin64Python) and FileOrDirExists(mPathWin64PythonDLLs) and FileOrDirExists(mPathWin64PythonLib) then begin
        Result := True;
        mFoundWin64Python :=1;
      end else begin
        MsgBox('Error. The directory '+ mPathWin64Python + ' does not exist', mbError, MB_OK);
        Result := False;
      end

  end else
      Result := True;
end;

// OBSOLETE - remove DataDirPage completely
function ShouldSkipPage(PageID: Integer): Boolean;
begin
  Result := False;

  { Skip pages that shouldn't be shown }

  //if (PageID = wpSelectDir) then
  //  Result := True

  if (PageId = DataDirPage.ID) then
      Result := True

  //if ((PageId = DataDirPage.ID) and ((mFoundWin64Python =1) or (mFoundWin32Python =1)))  then
  //  Result := True
  if (PageId = DataDirPage.ID) then
      Result := True
end;

function UpdateReadyMemo(Space, NewLine, MemoUserInfoInfo, MemoDirInfo, MemoTypeInfo,
  MemoComponentsInfo, MemoGroupInfo, MemoTasksInfo: String): String;
var
  S: String;
begin
  { Fill the 'Ready Memo' with the normal settings and the custom settings }
  S := '';

  if (mFoundWin32Python = 1) then begin
    S := S + 'A Win32 Python has been detected in:' + NewLine;
    S := S + Space + mPathWin32Python + NewLine;
    S := S + 'but the Chrono::Engine 32 bit module is NOT INCLUDED in this installer AND CANNOT BE INSTALLED!' + NewLine;
  end

  if ((mFoundWin64Python = 1) and (mFoundWin32Python = 0)) then begin
    S := S + 'A Win64 Python has been detected in:' + NewLine;
    S := S + Space + mPathWin64Python + NewLine;
    S := S + NewLine;
    S := S + NewLine;
    S := S + 'The Chrono::Engine 64 bit module will be installed in:' + NewLine;
    S := S + space + ExpandConstant('{app}') + NewLine;

    if (CheckAppendPath = True) then begin
      S := S + NewLine;
      S := S + 'Your PYTHONPATH environment variable will be automatically' + NewLine;
      S := S + 'updated by appending the ' + NewLine;
      S := S + space + ExpandConstant('{app}') + NewLine;
      S := S + 'value, if not already existing.';
    end else begin
      S := S + NewLine;
      S := S + 'REMEMBER! you must manually add the directory' + NewLine;
      S := S + space + ExpandConstant('{app}') + NewLine;
      S := S + 'to your PYTHONPATH environment variable!' + NewLine;
      S := S + 'Otherwise, Python cannot find the installed Chrono modules.'
    end
  end

  if ((mFoundWin64Python = 0) and  (mFoundWin32Python = 0)) then begin
    //S := S + 'Neither Win32 nor Win64 Python (version' +  '{#MyPythonVers}' + ') has been detected.' + NewLine;
    //S := S + 'Chrono::Engine module CANNOT BE INSTALLED!' + NewLine;
    S := S + NewLine;
    S := S + 'The Chrono::Engine 64 bit module will be installed in:' + NewLine;
    S := S + space + ExpandConstant('{app}') + NewLine;

    if (CheckAppendPath = True) then begin
      S := S + NewLine;
      S := S + 'Your PYTHONPATH environment variable will be automatically' + NewLine;
      S := S + 'updated by appending the ' + NewLine;
      S := S + space + ExpandConstant('{app}') + NewLine;
      S := S + 'value, if not already existing.';
    end else begin
      S := S + NewLine;
      S := S + 'REMEMBER! you must manually add the directory' + NewLine;
      S := S + space + ExpandConstant('{app}') + NewLine;
      S := S + 'to your PYTHONPATH environment variable!' + NewLine;
      S := S + 'Otherwise, Python cannot find the installed Chrono modules.'
    end
  end

  //HKEY_CURRENT_USER\Environment

  Result := S;
end;

function NeedsAddPath(Param: string): boolean;
var
  OrigPath: string;
  ParamExpanded: string;
begin
  //MsgBox('NeedsAddPath. check if already set:'#13#13 + Param, mbInformation, MB_OK);
  ParamExpanded := ExpandConstant(Param);
  if not RegQueryStringValue(HKCU64,
    'Environment',
    'PYTHONPATH', OrigPath)
  then begin
    //MsgBox('Attention. Environment\PYTHONPATH not found!'#13#13, mbInformation, MB_OK);
    Result := True;
    exit;
  end;

  // look for the path with leading and trailing semicolon and with or without \ ending
  // Pos() returns 0 if not found
  Result := Pos(';' + UpperCase(ParamExpanded) + ';', ';' + UpperCase(OrigPath) + ';') = 0;
  if Result = True then
     Result := Pos(';' + UpperCase(ParamExpanded) + '\;', ';' + UpperCase(OrigPath) + ';') = 0;

  if (CheckAppendPath = False) then begin
     Result := False;
  end;

  //MsgBox('NeedsAddPath returns:'#13#13 + IntToStr(Integer(Result)), mbInformation, MB_OK);
end;

// =============================================================================
// PROJECT CHRONO - http://projectchrono.org
//
// Copyright (c) 2016 projectchrono.org
// All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found
// in the LICENSE file at the top level of the distribution and at
// http://projectchrono.org/license-chrono.txt.
//
// =============================================================================

#include "ModifyPath.iss"

#define MyAppName "ChronoPyEngine"
#define MyAppVersion "v2.0.8"
#define MyAppPublisher "Alessandro Tasora"
#define MyAppURL "http://www.chronoengine.info"
#define MyWin64PythonDir  "D:\build\chrono\bin\Release"
#define MyPythonVers "3.3"
#define MyChronoEngineSDK "C:\tasora\code\projectchrono\chrono"

[Setup]
ShowLanguageDialog=yes
UserInfoPage=no
AppName={#MyAppName}
AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
WizardImageFile=SetupModern20.bmp
WizardSmallImageFile=SetupModernSmall26.bmp
PrivilegesRequired=admin
;Compression=none
OutputDir=c:\tasora\lavori\data_chrono
OutputBaseFilename=ChronoPyEngine_{#MyAppVersion}
ArchitecturesInstallIn64BitMode=x64
ChangesEnvironment=yes
DisableProgramGroupPage=yes

[Files]
Source: {#MyChronoEngineSDK}\data\*; Excludes: "*\.svn,\mpi,\vehicle,\cascade"; DestDir: "{app}\data"; Flags: recursesubdirs createallsubdirs
Source: {#MyChronoEngineSDK}\src\demos\python\*; DestDir: "{app}\src\demos\python\"; Flags: recursesubdirs createallsubdirs

Source: {#MyWin64PythonDir}\_ChronoEngine_python_core.pyd; DestDir: {app};  Flags: ignoreversion;  Check: myFoundWin64Python;
Source: {#MyWin64PythonDir}\_ChronoEngine_python_postprocess.pyd; DestDir: {app};  Flags: ignoreversion;  Check: myFoundWin64Python;
Source: {#MyWin64PythonDir}\_ChronoEngine_python_irrlicht.pyd; DestDir: {app};  Flags: ignoreversion;  Check: myFoundWin64Python;
Source: {#MyWin64PythonDir}\_ChronoEngine_python_fea.pyd; DestDir: {app};  Flags: ignoreversion;  Check: myFoundWin64Python;
Source: {#MyWin64PythonDir}\ChronoEngine.dll; DestDir: {app};  Flags: ignoreversion;  Check: myFoundWin64Python;
Source: {#MyWin64PythonDir}\ChronoEngine_postprocess.dll; DestDir: {app};  Flags: ignoreversion;  Check: myFoundWin64Python;
Source: {#MyWin64PythonDir}\ChronoEngine_irrlicht.dll; DestDir: {app};  Flags: ignoreversion;  Check: myFoundWin64Python;
Source: {#MyWin64PythonDir}\ChronoEngine_fea.dll; DestDir: {app};  Flags: ignoreversion;  Check: myFoundWin64Python;
Source: {#MyWin64PythonDir}\Irrlicht.dll; DestDir: {app};  Flags: ignoreversion;  Check: myFoundWin64Python;
Source: {#MyWin64PythonDir}\ChronoEngine_python_core.py; DestDir: {app};  Flags: ignoreversion;  Check: myFoundWin64Python;
Source: {#MyWin64PythonDir}\ChronoEngine_python_postprocess.py; DestDir: {app};  Flags: ignoreversion;  Check: myFoundWin64Python;
Source: {#MyWin64PythonDir}\ChronoEngine_python_irrlicht.py; DestDir: {app};  Flags: ignoreversion;  Check: myFoundWin64Python;
Source: {#MyWin64PythonDir}\ChronoEngine_python_fea.py; DestDir: {app};  Flags: ignoreversion;  Check: myFoundWin64Python;

[Icons]
Name: "{group}\ProjectChrono"; Filename: "http://www.projectchrono.org"
Name: "{group}\Getting started"; Filename: "http://api.chrono.projectchrono.org/introduction_chrono_pyengine.html"
Name: "{group}\Demos"; Filename: "{app}\src\demos\python\"
Name: "{group}\Uninstall"; Filename: "{uninstallexe}"

[Registry]
Root: "HKCU"; Subkey: "Environment"; ValueType: string; ValueName: "PYTHONPATH"; ValueData: "{app}"; Flags: createvalueifdoesntexist;
Root: "HKCU"; Subkey: "Environment"; ValueType: string; ValueName: "PYTHONPATH"; ValueData: "{olddata};{app}"; Flags: dontcreatekey; Check: NeedsAddPath(ExpandConstant('{app}'))

[Code]
var
  DataDirPage: TInputDirWizardPage;
  RegisterPathPage: TWizardPage;
  InstallHelpCheckBox: TNewCheckBox;
  InstallHelpLabel: TLabel;
  mFoundWin32Python: Integer;
  mPathWin32Python: String;
  mPathWin32PythonLib: String;
  mPathWin32PythonDLLs: String;
  mFoundWin64Python: Integer;
  mPathWin64Python: String;
  mPathWin64PythonLib: String;
  mPathWin64PythonDLLs: String;

function myFoundWin32Python: Boolean;
begin
  Result := mFoundWin32Python =1;
end;
function myGetPathWin32Python(Param: String): String;
begin
  Result := mPathWin32Python;
end;
function myGetPathWin32PythonLib(Param: String): String;
begin
  Result := mPathWin32PythonLib;
end;
function myGetPathWin32PythonDLLs(Param: String): String;
begin
  Result := mPathWin32PythonDLLs;
end;
function myFoundWin64Python: Boolean;
begin
  Result := mFoundWin64Python =1;
end;
function myGetPathWin64Python(Param: String): String;
begin
  Result := mPathWin64Python;
end;
function myGetPathWin64PythonLib(Param: String): String;
begin
  Result := mPathWin64PythonLib;
end;
function myGetPathWin64PythonDLLs(Param: String): String;
begin
  Result := mPathWin64PythonDLLs;
end;
function CheckAppendPath: Boolean;
begin
  Result := InstallHelpCheckBox.Checked=True;
end;

procedure InitializeWizard;
var
  mTitlePythondir: String;
  mallDirPython: String;
  mCut: Integer;
  myvers: String;
begin

  // CHECK PYTHON INSTALLATION
  mFoundWin32Python := 0;
  mFoundWin64Python := 0;

  myvers := '{#MyPythonVers}';

  if (IsWin64) then
  begin
    // CASE OF 64 BIT PLATFORM

        // find 64 bit python:
    if RegQueryStringValue(HKLM64,
                    'SOFTWARE\Python\PythonCore\' +  myvers+ '\InstallPath',
                    '',
                    mallDirPython) then
    begin
          //MsgBox('FOUND! 64bit !'#13#13 + mallDirPython, mbError, MB_OK);
          mPathWin64Python := mallDirPython;
          mFoundWin64Python := 1;
    end

        // find 32 bit python:
    if RegQueryStringValue(HKEY_LOCAL_MACHINE,
                    'SOFTWARE\Wow6432Node\Python\PythonCore\' +  myvers+ '\InstallPath',
                    '',
                    mallDirPython) then
    begin
          //MsgBox('Attention. Found a 32bit version of Python on your system. The Chrono::PyEngine provided with this installer will work only with the 64 bit version. !'#13#13 + mallDirPython, mbError, MB_OK);
          mPathWin32Python := mallDirPython;
          mFoundWin32Python := 1;
    end

  end
  else
  begin
    // CASE OF 32 BIT PLATFORM

    // find 32 bit python:
    if RegQueryStringValue(HKEY_LOCAL_MACHINE,
                    'SOFTWARE\Python\PythonCore\' +  myvers+ '\InstallPath',
                    '',
                    mallDirPython) then
    begin
          //MsgBox('Attention. Found a 32bit version of Python on your system. The Chrono::PyEngine provided with this installer will work only with the 64 bit version. !'#13#13 + mallDirPython, mbError, MB_OK);
          mPathWin32Python := mallDirPython;
          mFoundWin32Python := 1;
    end

  end

  mPathWin32PythonDLLs := mPathWin32Python;// AddBackslash(mPathWin32Python) + 'DLLs';
  mPathWin32PythonLib  := mPathWin32Python;// AddBackslash(mPathWin32Python) + 'Lib';
  mPathWin64PythonDLLs := mPathWin64Python;// AddBackslash(mPathWin64Python) + 'DLLs';
  mPathWin64PythonLib  := mPathWin64Python;// AddBackslash(mPathWin64Python) + 'Lib';

  { Create the pages }

  //
  // Select directory dialog for plugin
  //
  if mFoundWin64Python = 1 then begin mTitlePythondir := 'A copy of 64bit Python has been automatically detected, installed in this directory.'#13+
                                   '- you can install the Chrono::PyEngine libraries here (check that you have administrative previleges),'#13+
                                   '- or you can choose a different directory (preferred). If so, remember that you must '#13+
                                   '  set/append this directory to the PYTHONPATH environment variable.';
                    end else begin mTitlePythondir := 'A 64bit installation of Python has NOT been automatically found!. '#13+
                                   'Nevertheless, you can still go on with the installation, something went'#13+
                                   'wrong with your registry keys. Note: after the installation, in order for'#13+
                                   'the generated Python modules to be accessible, you must set/append this directory'#13+
                                   'to the PYTHONPATH environment variable.'; end

  DataDirPage := CreateInputDirPage(wpWelcome,
    'Choose directory for installation', 'Where do you want to install the Chrono::PyEngine libraries?',
    mTitlePythondir,
    False, '');
  DataDirPage.Add('');
  DataDirPage.Values[0] := Format('%s\', [mPathWin64Python] );

  RegisterPathPage := CreateCustomPage(wpSelectDir,
    'Set PYTHONPATH',
    'Automatically set the PYTHONPATH environment variable'#13 + 'with the installation path?');
  InstallHelpCheckBox := TNewCheckBox.Create(RegisterPathPage);
  InstallHelpCheckBox.Parent := RegisterPathPage.Surface;
  InstallHelpCheckBox.Checked := True;
  InstallHelpCheckBox.Width := 300;
  InstallHelpCheckBox.Caption := 'Set PYTHONPATH';

  InstallHelpLabel := TLabel.Create(RegisterPathPage);
  InstallHelpLabel.Parent := RegisterPathPage.Surface;
  InstallHelpLabel.Width := 300;
  InstallHelpLabel.Height := 300;
  InstallHelpLabel.Caption := ''#13#13#13#13 +
    'When Python is started, it looks for additional modules (.pyd files) in' + #13 +
    'its directory, in the global paths, or in the PYTHONPATH directories.' + #13 +
    'So, we need to make also Chrono modules accessible to Python via PYTHONPATH.' + #13 +
    '' + #13 +
    'This option will automatically append the install directory' + #13 +
    'to your PYTHONPATH environment variable. ' + #13 +
    '- If PYTHONPATH does not exist, it will create it.' + #13 +
    '- If PYTHONPATH already contains the install directory (for' + #13 +
    '  instance, because you installed Chrono::PyEngine in the past)' + #13 +
    '  this will not be appended.' + #13 +
    '' + #13 +
    'NOTE! If you do not select this, you must remember to append it manually!';

end;

// OBSOLETE
function NextButtonClick(CurPageID: Integer): Boolean;
var
  I: Integer;
  mfilesize: Integer;
begin

  //
  // After the user has entered data...
  //
  if CurPageID = DataDirPage.ID then begin

      mPathWin64Python     := DataDirPage.Values[0];
      mPathWin64PythonDLLs := mPathWin64Python; //:= AddBackslash(mPathWin64Python) + 'DLLs';
      mPathWin64PythonLib  := mPathWin64Python; //:= AddBackslash(mPathWin64Python) + 'Lib';

      if FileOrDirExists(mPathWin64Python) and FileOrDirExists(mPathWin64PythonDLLs) and FileOrDirExists(mPathWin64PythonLib) then begin
        Result := True;
        mFoundWin64Python :=1;
      end else begin
        MsgBox('Error. The directory '+ mPathWin64Python + ' does not exist', mbError, MB_OK);
        Result := False;
      end

  end else
      Result := True;
end;

// OBSOLETE - remove DataDirPage completely
function ShouldSkipPage(PageID: Integer): Boolean;
begin
  Result := False;

  { Skip pages that shouldn't be shown }

  //if (PageID = wpSelectDir) then
  //  Result := True

  if (PageId = DataDirPage.ID) then
      Result := True

  //if ((PageId = DataDirPage.ID) and ((mFoundWin64Python =1) or (mFoundWin32Python =1)))  then
  //  Result := True
end;

function UpdateReadyMemo(Space, NewLine, MemoUserInfoInfo, MemoDirInfo, MemoTypeInfo,
  MemoComponentsInfo, MemoGroupInfo, MemoTasksInfo: String): String;
var
  S: String;
begin
  { Fill the 'Ready Memo' with the normal settings and the custom settings }
  S := '';

  if (mFoundWin32Python = 1) then begin
    S := S + 'A Win32 Python has been detected in:' + NewLine;
    S := S + Space + mPathWin32Python + NewLine;
    S := S + 'but the Chrono::Engine 32 bit module is NOT INCLUDED in this installer AND CANNOT BE INSTALLED!' + NewLine;
  end

  if ((mFoundWin64Python = 1) and (mFoundWin32Python = 0)) then begin
    S := S + 'A Win64 Python has been detected in:' + NewLine;
    S := S + Space + mPathWin64Python + NewLine;
    S := S + NewLine;
    S := S + NewLine;
    S := S + 'The Chrono::Engine 64 bit module will be installed in:' + NewLine;
    S := S + space + ExpandConstant('{app}') + NewLine;

    if (CheckAppendPath = True) then begin
      S := S + NewLine;
      S := S + 'Your PYTHONPATH environment variable will be automatically' + NewLine;
      S := S + 'updated by appending the ' + NewLine;
      S := S + space + ExpandConstant('{app}') + NewLine;
      S := S + 'value, if not already existing.';
    end else begin
      S := S + NewLine;
      S := S + 'REMEMBER! you must manually add the directory' + NewLine;
      S := S + space + ExpandConstant('{app}') + NewLine;
      S := S + 'to your PYTHONPATH environment variable!' + NewLine;
      S := S + 'Otherwise, Python cannot find the installed Chrono modules.'
    end
  end

  if ((mFoundWin64Python = 0) and  (mFoundWin32Python = 0)) then begin
    S := S + 'Neither Win32 nor Win64 Python (version' +  '{#MyPythonVers}' + ') has been detected.' + NewLine;
    S := S + 'Chrono::Engine module CANNOT BE INSTALLED!' + NewLine;
  end

  //HKEY_CURRENT_USER\Environment

  Result := S;
end;

function NeedsAddPath(Param: string): boolean;
var
  OrigPath: string;
  ParamExpanded: string;
begin
  //MsgBox('NeedsAddPath. check if already set:'#13#13 + Param, mbInformation, MB_OK);
  ParamExpanded := ExpandConstant(Param);
  if not RegQueryStringValue(HKCU64,
    'Environment',
    'PYTHONPATH', OrigPath)
  then begin
    //MsgBox('Attention. Environment\PYTHONPATH not found!'#13#13, mbInformation, MB_OK);
    Result := True;
    exit;
  end;

  // look for the path with leading and trailing semicolon and with or without \ ending
  // Pos() returns 0 if not found
  Result := Pos(';' + UpperCase(ParamExpanded) + ';', ';' + UpperCase(OrigPath) + ';') = 0;
  if Result = True then
     Result := Pos(';' + UpperCase(ParamExpanded) + '\;', ';' + UpperCase(OrigPath) + ';') = 0;

  if (CheckAppendPath = False) then begin
     Result := False;
  end;

  //MsgBox('NeedsAddPath returns:'#13#13 + IntToStr(Integer(Result)), mbInformation, MB_OK);
end;


Copy instead of renaming creds file during install if its missing

#define sysfolder "system"
#define version GetEnv("NADEKOBOT_INSTALL_VERSION")
#define target "win7-x64"
#define platform "net5.0"

[Setup]
AppName = {param:botname|NadekoBot}
AppVersion={#version}
AppPublisher=Kwoth
DefaultDirName={param:installpath|{commonpf}\NadekoBot}
DefaultGroupName=NadekoBot
UninstallDisplayIcon={app}\{#sysfolder}\nadeko_icon.ico
Compression=lzma2
SolidCompression=yes
UsePreviousLanguage=no
UsePreviousSetupType=no
UsePreviousAppDir=no
OutputDir=userdocs:_projekti/nadeko-installers/{#version}/
OutputBaseFilename=nadeko-setup-{#version}
AppReadmeFile=https://nadeko.bot/commands
ArchitecturesInstallIn64BitMode=x64
DisableWelcomePage=yes
DisableDirPage=yes
DisableFinishedPage=yes
DisableReadyMemo=yes
DisableProgramGroupPage=yes
WizardStyle=modern
UpdateUninstallLogAppName=no
CreateUninstallRegKey=no
Uninstallable=no

[Files]
;install
Source: "src\NadekoBot\bin\Release\{#platform}\{#target}\publish\*"; DestDir: "{app}\{#sysfolder}"; Permissions: users-full; Flags: recursesubdirs onlyifdoesntexist ignoreversion createallsubdirs; Excludes: "*.pdb, *.db"

;reinstall - i want to copy all files, but i don't want to overwrite any data files because users will lose their customization if they don't have a backup,
;            and i don't want them to have to backup and then copy-merge into data folder themselves, or lose their currency images due to overwrite.
Source: "src\NadekoBot\bin\Release\{#platform}\{#target}\publish\*"; DestDir: "{app}\{#sysfolder}"; Permissions: users-full; Flags: recursesubdirs ignoreversion onlyifdestfileexists createallsubdirs; Excludes: "*.pdb, *.db, data\*, credentials.json, creds.yml";
Source: "src\NadekoBot\bin\Release\{#platform}\{#target}\publish\data\*"; DestDir: "{app}\{#sysfolder}\data"; Permissions: users-full; Flags: recursesubdirs onlyifdoesntexist createallsubdirs;
; overwrite strings and aliases
Source: "src\NadekoBot\bin\Release\{#platform}\{#target}\publish\data\aliases.yml"; DestDir: "{app}\{#sysfolder}\data\"; Permissions: users-full; Flags: recursesubdirs ignoreversion onlyifdestfileexists createallsubdirs;
Source: "src\NadekoBot\bin\Release\{#platform}\{#target}\publish\data\strings\*"; DestDir: "{app}\{#sysfolder}\data\strings"; Permissions: users-full; Flags: recursesubdirs ignoreversion onlyifdestfileexists createallsubdirs;

[Dirs]
Name:"{app}\{#sysfolder}\data"; Permissions: everyone-modify
Name:"{app}\{#sysfolder}\config"; Permissions: everyone-modify
Name:"{app}\{#sysfolder}"; Permissions: everyone-modify

; [Run]
; Filename: "http://nadekobot.readthedocs.io/en/latest/jsons-explained/"; Flags: postinstall shellexec runasoriginaluser; Description: "Open setup guide"
; Filename: "{app}\{#sysfolder}\creds.yml"; Flags: postinstall shellexec runasoriginaluser; Description: "Open creds file"

[Icons]
; for pretty install directory
Name: "{app}\NadekoBot"; Filename: "{app}\{#sysfolder}\NadekoBot.exe"; IconFilename: "{app}\{#sysfolder}\nadeko_icon.ico"
Name: "{app}\creds"; Filename: "{app}\{#sysfolder}\creds.yml"
Name: "{app}\data"; Filename: "{app}\{#sysfolder}\data"

; desktop shortcut
Name: "{commondesktop}\{#SetupSetting("AppName")}"; Filename: "{app}\NadekoBot";

[Code]
function GetFileName(const AFileName: string): string;
begin
  Result := ExpandConstant('{app}\{#sysfolder}\' + AFileName);
end;

procedure CurStepChanged(CurStep: TSetupStep);
begin
  if (CurStep = ssPostInstall) then
  begin
      FileCopy(GetFileName('creds_example.yml'), GetFileName('creds.yml'), True);
  end;
end;

#define sysfolder "system"
#define version GetEnv("NADEKOBOT_INSTALL_VERSION")
#define target "win7-x64"
#define platform "net5.0"

[Setup]
AppName = {param:botname|NadekoBot}
AppVersion={#version}
AppPublisher=Kwoth
DefaultDirName={param:installpath|{commonpf}\NadekoBot}
DefaultGroupName=NadekoBot
UninstallDisplayIcon={app}\{#sysfolder}\nadeko_icon.ico
Compression=lzma2
SolidCompression=yes
UsePreviousLanguage=no
UsePreviousSetupType=no
UsePreviousAppDir=no
OutputDir=userdocs:_projekti/nadeko-installers/{#version}/
OutputBaseFilename=nadeko-setup-{#version}
AppReadmeFile=https://nadeko.bot/commands
ArchitecturesInstallIn64BitMode=x64
DisableWelcomePage=yes
DisableDirPage=yes
DisableFinishedPage=yes
DisableReadyMemo=yes
DisableProgramGroupPage=yes
WizardStyle=modern
UpdateUninstallLogAppName=no
CreateUninstallRegKey=no
Uninstallable=no

[Files]
;install
Source: "src\NadekoBot\bin\Release\{#platform}\{#target}\publish\*"; DestDir: "{app}\{#sysfolder}"; Permissions: users-full; Flags: recursesubdirs onlyifdoesntexist ignoreversion createallsubdirs; Excludes: "*.pdb, *.db"

;reinstall - i want to copy all files, but i don't want to overwrite any data files because users will lose their customization if they don't have a backup,
;            and i don't want them to have to backup and then copy-merge into data folder themselves, or lose their currency images due to overwrite.
Source: "src\NadekoBot\bin\Release\{#platform}\{#target}\publish\*"; DestDir: "{app}\{#sysfolder}"; Permissions: users-full; Flags: recursesubdirs ignoreversion onlyifdestfileexists createallsubdirs; Excludes: "*.pdb, *.db, data\*, credentials.json, creds.yml";
Source: "src\NadekoBot\bin\Release\{#platform}\{#target}\publish\data\*"; DestDir: "{app}\{#sysfolder}\data"; Permissions: users-full; Flags: recursesubdirs onlyifdoesntexist createallsubdirs;
; overwrite strings and aliases
Source: "src\NadekoBot\bin\Release\{#platform}\{#target}\publish\data\aliases.yml"; DestDir: "{app}\{#sysfolder}\data\"; Permissions: users-full; Flags: recursesubdirs ignoreversion onlyifdestfileexists createallsubdirs;
Source: "src\NadekoBot\bin\Release\{#platform}\{#target}\publish\data\strings\*"; DestDir: "{app}\{#sysfolder}\data\strings"; Permissions: users-full; Flags: recursesubdirs ignoreversion onlyifdestfileexists createallsubdirs;

[Dirs]
Name:"{app}\{#sysfolder}\data"; Permissions: everyone-modify
Name:"{app}\{#sysfolder}\config"; Permissions: everyone-modify
Name:"{app}\{#sysfolder}"; Permissions: everyone-modify

; [Run]
; Filename: "http://nadekobot.readthedocs.io/en/latest/jsons-explained/"; Flags: postinstall shellexec runasoriginaluser; Description: "Open setup guide"
; Filename: "{app}\{#sysfolder}\creds.yml"; Flags: postinstall shellexec runasoriginaluser; Description: "Open creds file"

[Icons]
; for pretty install directory
Name: "{app}\NadekoBot"; Filename: "{app}\{#sysfolder}\NadekoBot.exe"; IconFilename: "{app}\{#sysfolder}\nadeko_icon.ico"
Name: "{app}\creds"; Filename: "{app}\{#sysfolder}\creds.yml"
Name: "{app}\data"; Filename: "{app}\{#sysfolder}\data"

; desktop shortcut
Name: "{commondesktop}\{#SetupSetting("AppName")}"; Filename: "{app}\NadekoBot";

[Code]
function GetFileName(const AFileName: string): string;
begin
  Result := ExpandConstant('{app}\{#sysfolder}\' + AFileName);
end;

procedure CurStepChanged(CurStep: TSetupStep);
begin
  if (CurStep = ssPostInstall) then
  begin
    if FileExists(GetFileName('creds_example.yml')) and not FileExists(GetFileName('creds.yml')) then
      RenameFile(GetFileName('creds_example.yml'), GetFileName('creds.yml'));
  end;
end;