[Setup]
AppName=@CMAKE_PROJECT_NAME@

; Set version number below
#define version "@PROJECT_VERSION@-@GIT_RECORD_IDENTIFIER@"
AppVersion={#version}

#define public buildtype "@CMAKE_BUILD_TYPE@"

#define public arch "vcrt64"
#define public platform "win10"
#define public buildsystem "MXE"

;;;;;; On Wine, z: drive is configured to point to /home/rusconi
;;;;;; Check the winecfg window's Drives tab

#define sourceDir "z:/devel/@LOWCASE_PROJECT_NAME_NO_VER@/development"

#define buildDir "z:/devel/@LOWCASE_PROJECT_NAME_NO_VER@/build-area/mxe"

#define docBuildDir "z:/devel/@LOWCASE_PROJECT_NAME_NO_VER@/build-area/unix/doc/user-manual"

;;;;; When a documentation set (PDF, HTML) has been successfully built, that set
;;;;; is copied to this directory for MXE winpackage target consumption.
#define localDocStore "z:/devel/msxpertsuite-store/docs/@LOWCASE_PROJECT_NAME_NO_VER@"

#define mxeDllDir "z:/devel/mxe/dll-set-for-packages"


; Set version number below
AppVerName=@CMAKE_PROJECT_NAME@ version {#version}
DefaultDirName={commonpf}\@CMAKE_PROJECT_NAME@
DefaultGroupName=@CMAKE_PROJECT_NAME@
OutputDir="{#sourceDir}\winInstaller"

OutputBaseFilename=@CMAKE_PROJECT_NAME@-{#platform}-{#buildsystem}-{#arch}-v{#version}-{#buildtype}-setup
OutputManifestFile=@CMAKE_PROJECT_NAME@-{#platform}-{#buildsystem}-{#arch}-v{#version}-{#buildtype}-setup-manifest.txt
ArchitecturesAllowed=x64
ArchitecturesInstallIn64BitMode=x64

LicenseFile="{#sourceDir}/LICENSE"
AppCopyright="Copyright (C) 2009-2025 Filippo Rusconi"

SetupIconFile={#sourceDir}/images/icons/@CMAKE_PROJECT_NAME@.ico

AllowNoIcons=yes
AlwaysShowComponentsList=yes
AllowRootDirectory=no
AllowCancelDuringInstall=yes
AppComments=@CMAKE_PROJECT_NAME@, by Filippo Rusconi"
AppContact="Filippo Rusconi, PhD, Researcher at CNRS, France"
CloseApplications=yes
CreateUninstallRegKey=yes
DirExistsWarning=yes
WindowResizable=yes
WizardImageFile="{#sourceDir}\images\splashscreen.png"
WizardImageStretch=yes

[Dirs]
;; Name: "{app}\data"
Name: "{app}\doc"

[Files]
Source: "{#mxeDllDir}/*"; DestDir: {app}; Flags: ignoreversion recursesubdirs;

Source: "{#sourceDir}/doc/history.html"; DestDir: {app}\doc;

Source: "{#buildDir}/src/@CMAKE_PROJECT_NAME@.exe"; DestDir: {app};

;; Source: "{#sourceDir}/data/*"; DestDir: {app}\data; Flags: recursesubdirs;

;; The icon (multi-resolution icon file)
Source: {#sourceDir}/images/icons/@CMAKE_PROJECT_NAME@.ico; DestDir: {app}

Source: "{#localDocStore}/@CMAKE_PROJECT_NAME@-doc.pdf"; DestDir: {app}\doc;
Source: "{#localDocStore}/html/user-manual/*"; Flags: recursesubdirs; DestDir: {app}\doc\html;

[Icons]
Name: "{group}\@CMAKE_PROJECT_NAME@"; Filename: "{app}\@CMAKE_PROJECT_NAME@.exe"; WorkingDir: "{app}"
Name: "{group}\Uninstall @CMAKE_PROJECT_NAME@"; Filename: "{uninstallexe}"

[Run]
Filename: "{app}\@CMAKE_PROJECT_NAME@.exe"; Description: "Launch @CMAKE_PROJECT_NAME@"; Flags: postinstall nowait unchecked
