build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
;.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,
; ;
;Copyright (c) 2002-2010 Jernej Simončič ;
; ;
;This software is provided 'as-is', without any express or implied ;
;warranty. In no event will the authors be held liable for any damages ;
;arising from the use of this software. ;
; ;
;Permission is granted to anyone to use this software for any purpose, ;
;including commercial applications, and to alter it and redistribute it ;
;freely, subject to the following restrictions: ;
; ;
; 1. The origin of this software must not be misrepresented; you must ;
; not claim that you wrote the original software. If you use this ;
; software in a product, an acknowledgment in the product ;
; documentation would be appreciated but is not required. ;
; ;
; 2. Altered source versions must be plainly marked as such, and must ;
; not be misrepresented as being the original software. ;
; ;
; 3. This notice may not be removed or altered from any source ;
; distribution. ;
;.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.;
;
2024-11-08 16:29:54 -03:00
;Install script for GIMP and its deps
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
;requires Inno Setup 6
;
;Changelog:
;
;2012-05-05
;- check for SSE support
;- remove obsolete 2.6 plugins when installing over 2.6.12 combined installer
;
;2011-12-18
;- display a picture on the first install screen
;- add a development version warning back
;- clean gegl's DLLs on install as some files have changed names
;
;2011-08-30
;- only uninstall previous GIMP version when installing over existing installation
; TODO: offer the option to uninstall 32bit version when installing on x64 system
;- install 32bit plugins to same directory as 64bit plugins on x64 installs to
; avoid problems when upgrading
;
;2010-07-08
;- clean up entire Python subdirectory (since the .pyc files are generated when
; scripts are run)
;- use crHand instead of crHandPoint for the billboard URL
;
;2010-07-02
;- add libraries for compatibility with old 32-bit plug-ins as a component
;- remove a few unused RTF ready-memo related things
;- uninst.inf is now processed as the first step of uninstall, as otherwise the
; uninstaller could leave behind empty directories
;
;2010-06-29
;- fix SuppressibleMsgBox calls to use proper button ID for default button
;- simplify the wizard - skip Welcome page, and make the Next button from
; InfoBefore/License page invoke install immediately (custom install is still
; possible by clicking the Customize button)
;
;2010-05-15
;- rewrote script mostly from scratch
;- combine 32 and 64bit GIMP versions to a single installer
; - install enough 32bit support files even with 64bit version to allow running 32bit
; plug-ins on 64bit version (used by Python scriptin support [as there's no 64-bit
; PyGTK+ on Windows available yet] and TWAIN plug-in, which only works in 32-bit
; version)
;- Python with PyGTK is included in the installer now
;- install GIMP to new directory by default ({pf}\GIMP 2 instead of {pf}\GIMP-2.0)
;- uninstall previous GIMP versions as the first step of install (both 32 and 64-bit)
; - require reboot if installing to directory from which GIMP was just uninstalled,
; and this directory wasn't removed by the uninstaller; the installer will continue
; automatically after reboot
;- fixed a long standing bug where "Open with GIMP" menu entries would be left after
; uninstalling
;
#pragma option -e+
2024-11-08 16:29:54 -03:00
;1 NOTE: This script do NOT work with Inno Compiler alone
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-10-31 09:37:36 -03:00
2024-11-08 16:29:54 -03:00
;2 GLOBAL VARIABLES SET BY PARAMS
2025-02-22 21:37:14 -03:00
;Meson don't support C++ style comments. See: https://github.com/mesonbuild/meson/issues/14260
2025-05-26 16:30:34 -03:00
#include BUILD_DIR + "\config_clean.h"
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2025-02-22 21:37:14 -03:00
;Main GIMP versions:
2024-10-31 09:37:36 -03:00
;Get GIMP_MUTEX_VERSION (used for internal versioning control)
2025-05-26 16:30:34 -03:00
#if Defined(GIMP_UNSTABLE)
2024-10-31 09:37:36 -03:00
#define GIMP_MUTEX_VERSION GIMP_APP_VERSION
#else
2025-02-22 21:37:14 -03:00
#define GIMP_MUTEX_VERSION=Copy(GIMP_APP_VERSION,1,Pos(".",GIMP_APP_VERSION)-1)
2024-01-22 17:53:55 -03:00
#endif
2024-10-31 09:37:36 -03:00
;Get FULL_GIMP_VERSION (used by ITs)
2025-02-22 21:37:14 -03:00
#define ORIGINAL_GIMP_VERSION GIMP_VERSION
2025-05-26 16:30:34 -03:00
#if Defined(GIMP_RC_VERSION)
2025-02-22 21:37:14 -03:00
#define GIMP_VERSION=Copy(GIMP_VERSION,1,Pos("-",GIMP_VERSION)-1)
#endif
2025-05-26 16:30:34 -03:00
#if !Defined(REVISION) || REVISION=="0"
2025-02-22 21:37:14 -03:00
#define FULL_GIMP_VERSION GIMP_VERSION + "." + "0"
#else
#define FULL_GIMP_VERSION GIMP_VERSION + "." + REVISION
#endif
;Get CUSTOM_GIMP_VERSION (that the users see)
2025-05-26 16:30:34 -03:00
#if !Defined(REVISION) || REVISION=="0"
2025-02-22 21:37:14 -03:00
#define CUSTOM_GIMP_VERSION ORIGINAL_GIMP_VERSION
#else
#define CUSTOM_GIMP_VERSION ORIGINAL_GIMP_VERSION + "-" + REVISION
#endif
2024-10-31 09:37:36 -03:00
2024-11-14 12:57:08 -03:00
;Optional Build-time params: DEBUG_SYMBOLS, LUA, PYTHON, NOCOMPRESSION, NOFILES, DEVEL_WARNING
2024-11-08 16:29:54 -03:00
;Optional Run-time params: /configoverride= /disablecheckupdate=false|true /debugresume=0|1 /resumeinstall=0|1|2
2024-10-31 09:37:36 -03:00
;3 INSTALLER SOURCE
;3.1.1 Icons and other files
#define ASSETS_DIR BUILD_DIR + "\build\windows\installer"
;3.1.2 Installer lang files
[Languages]
Name: "en"; MessagesFile: "compiler:Default.isl,{#ASSETS_DIR}\lang\en.setup.isl"
#include ASSETS_DIR + "\base_po-msg.list"
;Avoid annoying inoffensive warnings about langs that we can't do nothing about
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
[Setup]
2024-05-24 22:14:00 -03:00
MissingMessagesWarning=no
NotRecognizedMessagesWarning=no
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-10-31 09:37:36 -03:00
;3.2.1 INNO INTERNAL VERSIONING (used to rule how different versions are installed)
2025-03-30 08:26:34 -03:00
;GIMP process identifier for Inno
AppMutex=GIMP-{#GIMP_MUTEX_VERSION}
;Inno installer identifier
2025-05-27 11:36:13 -03:00
SetupMutex=GIMP-{#GIMP_MUTEX_VERSION}-setup
2024-10-31 09:37:36 -03:00
;Inno installer (default) install location
DefaultDirName={autopf}\GIMP {#GIMP_MUTEX_VERSION}
;Inno uninstaller identifier
AppID=GIMP-{#GIMP_MUTEX_VERSION}
;Inno unninstaller identifier logs location
UninstallFilesDir={app}\uninst
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-10-31 09:37:36 -03:00
;3.2.2 WINDOWS INTERNAL VERSIONING (used by ITs for deploying GIMP)
;Inno installer file version
VersionInfoVersion={#FULL_GIMP_VERSION}
;Inno installer product version and ImmersiveControlPanel 'DisplayVersion'
AppVersion={#FULL_GIMP_VERSION}
;3.2.3 THAT'S WHAT THE FINAL USER ACTUALLY SEE
;ImmersiveControlPanel 'DisplayName'
AppVerName=GIMP {#CUSTOM_GIMP_VERSION}
;ImmersiveControlPanel 'DisplayIcon'
UninstallDisplayIcon={app}\bin\gimp-{#GIMP_MUTEX_VERSION}.exe
2024-06-05 16:15:09 -03:00
;ImmersiveControlPanel 'Publisher'
2024-05-24 20:04:15 -03:00
AppPublisher=The GIMP Team
2024-06-05 16:15:09 -03:00
;ControlPanel 'URLInfoAbout'
2024-05-24 20:04:15 -03:00
AppPublisherURL=https://www.gimp.org/
2024-06-05 16:15:09 -03:00
;ControlPanel 'HelpLink'
2024-05-24 20:04:15 -03:00
AppSupportURL=https://www.gimp.org/docs/
2025-05-26 16:30:34 -03:00
#if Defined(GIMP_UNSTABLE)
2024-06-12 12:26:34 -03:00
;ControlPanel 'URLUpdateInfo'
AppUpdatesURL=https://www.gimp.org/downloads/devel/
#else
AppUpdatesURL=https://www.gimp.org/downloads/
#endif
2024-05-24 20:04:15 -03:00
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-10-31 09:37:36 -03:00
;3.3.1 EXE COMPRESSION
2024-05-24 20:04:15 -03:00
LZMANumBlockThreads=4
LZMABlockSize=76800
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
#ifdef NOCOMPRESSION
2024-08-06 21:37:07 -03:00
OutputDir={#GIMP_DIR}\unc
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
Compression=none
DiskSpanning=yes
DiskSliceSize=max
#else
Compression=lzma2/ultra64
InternalCompressLevel=ultra
SolidCompression=yes
LZMAUseSeparateProcess=yes
LZMANumFastBytes=273
; Increasing dictionary size may improve compression ratio at the
; expense of memory requirement. We run into "Out of memory" error in
; the CI.
;LZMADictionarySize=524288
2024-10-31 09:37:36 -03:00
#endif //NOCOMPRESSION
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-10-31 09:37:36 -03:00
;3.3.2 EXE SIGNING
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
;SignTool=Default
;SignedUninstaller=yes
;SignedUninstallerDir=_Uninst
2024-10-31 09:37:36 -03:00
;3.3.3 EXE FILE DETAILS
AppName=GIMP
SetupIconFile={#ASSETS_DIR}\setup.ico
OutputDir={#GIMP_DIR}
OutputBaseFileName=gimp-{#CUSTOM_GIMP_VERSION}-setup
2024-08-06 21:37:07 -03:00
OutputManifestFile=inno.log
2024-11-20 13:29:26 -03:00
ArchitecturesInstallIn64BitMode=x64os arm64
2024-10-31 09:37:36 -03:00
MinVersion=10.0
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-05-24 20:04:15 -03:00
2024-10-31 09:37:36 -03:00
;3.4.1 INSTALLER PAGES
2024-12-22 11:50:09 -03:00
PrivilegesRequired=lowest
2024-10-31 09:37:36 -03:00
PrivilegesRequiredOverridesAllowed=dialog
ShowLanguageDialog=auto
DisableWelcomePage=no
InfoBeforeFile=gpl+python.rtf
2025-03-24 17:10:44 -03:00
DisableDirPage=no
2024-10-31 09:37:36 -03:00
FlatComponentsList=yes
DisableProgramGroupPage=yes
AllowNoIcons=no
ChangesAssociations=true
ChangesEnvironment=yes
AlwaysShowDirOnReadyPage=yes
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-10-31 09:37:36 -03:00
;3.4.2 INSTALLER UI: uses modern Win32 "Vista" (still used today) design
WizardStyle=modern
WizardSizePercent=100
WizardResizable=no
WizardSmallImageFile={#ASSETS_DIR}\gimp.scale-100.bmp,{#ASSETS_DIR}\gimp.scale-125.bmp,{#ASSETS_DIR}\gimp.scale-150.bmp,{#ASSETS_DIR}\gimp.scale-175.bmp,{#ASSETS_DIR}\gimp.scale-200.bmp,{#ASSETS_DIR}\gimp.scale-225.bmp,{#ASSETS_DIR}\gimp.scale-250.bmp
WizardImageFile={#ASSETS_DIR}\install-end.scale-100.bmp,{#ASSETS_DIR}\install-end.scale-125.bmp,{#ASSETS_DIR}\install-end.scale-150.bmp,{#ASSETS_DIR}\install-end.scale-175.bmp,{#ASSETS_DIR}\install-end.scale-200.bmp,{#ASSETS_DIR}\install-end.scale-225.bmp,{#ASSETS_DIR}\install-end.scale-250.bmp
WizardImageStretch=yes
2024-06-15 13:08:01 -03:00
[LangOptions]
DialogFontName=Segoe UI
DialogFontSize=9
WelcomeFontName=Segoe UI
WelcomeFontSize=12
2024-10-31 09:37:36 -03:00
;3.4.1 INSTALLER PAGES AGAIN
[Tasks]
Name: desktopicon; Description: "{cm:AdditionalIconsDesktop}"; GroupDescription: "{cm:AdditionalIcons}"
[Icons]
Name: "{autoprograms}\GIMP {#CUSTOM_GIMP_VERSION}"; Filename: "{app}\bin\gimp-{#GIMP_MUTEX_VERSION}.exe"; WorkingDir: "%USERPROFILE%"; Comment: "GIMP {#CUSTOM_GIMP_VERSION}"
Name: "{autodesktop}\GIMP {#CUSTOM_GIMP_VERSION}"; Filename: "{app}\bin\gimp-{#GIMP_MUTEX_VERSION}.exe"; WorkingDir: "%USERPROFILE%"; Comment: "GIMP {#CUSTOM_GIMP_VERSION}"; Tasks: desktopicon
[Run]
Filename: "{app}\bin\gimp-{#GIMP_MUTEX_VERSION}.exe"; Description: "{cm:LaunchGimp}"; Flags: unchecked postinstall nowait skipifsilent
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-16 16:03:12 -03:00
2024-11-08 16:29:54 -03:00
;4.1 GIMP FILES
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
[Types]
Name: full; Description: "{cm:TypeFull}"
Name: compact; Description: "{cm:TypeCompact}"
Name: custom; Description: "{cm:TypeCustom}"; Flags: iscustom
[Components]
;Required components (minimal install)
2024-11-08 16:29:54 -03:00
;GIMP files
2024-01-22 17:53:55 -03:00
Name: gimp32; Description: "{cm:ComponentsGimp,{#GIMP_VERSION}}"; Types: full compact custom; Flags: fixed; Check: Check3264('32')
Name: gimp64; Description: "{cm:ComponentsGimp,{#GIMP_VERSION}}"; Types: full compact custom; Flags: fixed; Check: Check3264('x64')
Name: gimpARM64; Description: "{cm:ComponentsGimp,{#GIMP_VERSION}}"; Types: full compact custom; Flags: fixed; Check: Check3264('arm64')
2024-11-08 16:29:54 -03:00
;Deps files
2024-10-31 09:37:36 -03:00
Name: deps32; Description: "{cm:ComponentsDeps,{#FULL_GIMP_VERSION}}"; Types: full compact custom; Flags: fixed; Check: Check3264('32')
Name: deps64; Description: "{cm:ComponentsDeps,{#FULL_GIMP_VERSION}}"; Types: full compact custom; Flags: fixed; Check: Check3264('x64')
Name: depsARM64; Description: "{cm:ComponentsDeps,{#FULL_GIMP_VERSION}}"; Types: full compact custom; Flags: fixed; Check: Check3264('arm64')
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
;Optional components (complete install)
#ifdef DEBUG_SYMBOLS
2024-06-16 16:03:12 -03:00
Name: debug32; Description: "{cm:ComponentsDebug}"; Types: full custom; Flags: disablenouninstallwarning; Check: Check3264('32')
Name: debug64; Description: "{cm:ComponentsDebug}"; Types: full custom; Flags: disablenouninstallwarning; Check: Check3264('x64')
Name: debugARM64; Description: "{cm:ComponentsDebug}"; Types: full custom; Flags: disablenouninstallwarning; Check: Check3264('arm64')
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
#endif
2025-03-28 19:50:50 -03:00
;Development files
Name: dev32; Description: "{cm:ComponentsDev}"; Types: full custom; Flags: disablenouninstallwarning; Check: Check3264('32')
Name: dev64; Description: "{cm:ComponentsDev}"; Types: full custom; Flags: disablenouninstallwarning; Check: Check3264('x64')
Name: devARM64; Description: "{cm:ComponentsDev}"; Types: full custom; Flags: disablenouninstallwarning; Check: Check3264('arm64')
2024-11-08 16:29:54 -03:00
;PostScript support
2024-06-16 16:03:12 -03:00
Name: gs32; Description: "{cm:ComponentsGhostscript}"; Types: full custom; Check: Check3264('32')
Name: gs64; Description: "{cm:ComponentsGhostscript}"; Types: full custom; Check: Check3264('x64')
Name: gsARM64; Description: "{cm:ComponentsGhostscript}"; Types: full custom; Check: Check3264('arm64')
2024-11-08 16:29:54 -03:00
;Lua plug-ins support
2024-06-16 16:03:12 -03:00
#ifdef LUA
Name: lua32; Description: "{cm:ComponentsLua}"; Types: full custom; Check: Check3264('32')
Name: lua64; Description: "{cm:ComponentsLua}"; Types: full custom; Check: Check3264('x64')
Name: luaARM64; Description: "{cm:ComponentsLua}"; Types: full custom; Check: Check3264('arm64')
#endif
2024-11-08 16:29:54 -03:00
;Python plug-ins support
2024-06-16 16:03:12 -03:00
#ifdef PYTHON
Name: py32; Description: "{cm:ComponentsPython}"; Types: full custom; Check: Check3264('32')
Name: py64; Description: "{cm:ComponentsPython}"; Types: full custom; Check: Check3264('x64')
Name: pyARM64; Description: "{cm:ComponentsPython}"; Types: full custom; Check: Check3264('arm64')
#endif
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
;Locales
Name: loc; Description: "{cm:ComponentsTranslations}"; Types: full custom
2024-08-05 18:52:48 -03:00
#include ASSETS_DIR + "\base_po-cmp.list"
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
;MyPaint Brushes
Name: mypaint; Description: "{cm:ComponentsMyPaint}"; Types: full custom
;32-bit TWAIN support
Name: gimp32on64; Description: "{cm:ComponentsGimp32}"; Types: full custom; Flags: checkablealone; Check: Check3264('64')
2024-10-31 09:37:36 -03:00
[Files]
2024-11-08 16:29:54 -03:00
;setup files
2025-04-11 16:51:05 -03:00
Source: "{#ASSETS_DIR}\installsplash_top.scale-100.bmp"; Flags: dontcopy
Source: "{#ASSETS_DIR}\installsplash_top.scale-125.bmp"; Flags: dontcopy
Source: "{#ASSETS_DIR}\installsplash_top.scale-150.bmp"; Flags: dontcopy
Source: "{#ASSETS_DIR}\installsplash_top.scale-175.bmp"; Flags: dontcopy
Source: "{#ASSETS_DIR}\installsplash_top.scale-200.bmp"; Flags: dontcopy
Source: "{#ASSETS_DIR}\installsplash_top.scale-225.bmp"; Flags: dontcopy
Source: "{#ASSETS_DIR}\installsplash_top.scale-250.bmp"; Flags: dontcopy
Source: "{#ASSETS_DIR}\installsplash_bottom.bmp"; Flags: dontcopy
2024-11-08 16:29:54 -03:00
#ifndef NOFILES
2024-10-31 09:37:36 -03:00
#define X86 1
#define X64 2
#define ARM64 3
#define GIMP_DIR32 GIMP_DIR + "\" + DIR32
#define GIMP_DIR64 GIMP_DIR + "\" + DIR64
#define GIMP_DIRA64 GIMP_DIR + "\" + DIR64
#define DDIR32 DIR32
#define DDIR64 DIR64
#define DDIRA64 DIRA64
#define DEPS_DIR32 DEPS_DIR + "\" + DDIR32
#define DEPS_DIR64 DEPS_DIR + "\" + DDIR64
#define DEPS_DIRA64 DEPS_DIR + "\" + DDIRA64
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-16 15:37:11 -03:00
#define COMMON_FLAGS="recursesubdirs restartreplace uninsrestartdelete ignoreversion"
2024-06-16 16:03:12 -03:00
2024-11-08 16:29:54 -03:00
;Required arch-neutral files (compact install)
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
#define GIMP_ARCHS="gimp32 or gimp64 or gimpARM64"
2025-04-13 14:50:37 -03:00
#define OPTIONAL_EXT="*.pdb,*.lua,*.py"
2024-06-16 16:03:12 -03:00
Source: "{#GIMP_DIR32}\etc\gimp\*"; DestDir: "{app}\etc\gimp"; Components: {#GIMP_ARCHS}; Flags: {#COMMON_FLAGS}
2025-02-22 21:37:14 -03:00
Source: "{#GIMP_DIR32}\lib\gimp\{#GIMP_PKGCONFIG_VERSION}\environ\default.env"; DestDir: "{app}\lib\gimp\{#GIMP_PKGCONFIG_VERSION}\environ"; Components: {#GIMP_ARCHS}; Flags: {#COMMON_FLAGS}
Source: "{#GIMP_DIR32}\lib\gimp\{#GIMP_PKGCONFIG_VERSION}\interpreters\gimp-script-fu-interpreter.interp"; DestDir: "{app}\lib\gimp\{#GIMP_PKGCONFIG_VERSION}\interpreters"; Components: {#GIMP_ARCHS}; Flags: {#COMMON_FLAGS}
Source: "{#GIMP_DIR32}\lib\gimp\{#GIMP_PKGCONFIG_VERSION}\extensions\*"; DestDir: "{app}\lib\gimp\{#GIMP_PKGCONFIG_VERSION}\extensions"; Excludes: "*.dll,*.exe,{#OPTIONAL_EXT}"; Components: {#GIMP_ARCHS}; Flags: {#COMMON_FLAGS}
Source: "{#GIMP_DIR32}\lib\gimp\{#GIMP_PKGCONFIG_VERSION}\plug-ins\*"; DestDir: "{app}\lib\gimp\{#GIMP_PKGCONFIG_VERSION}\plug-ins"; Excludes: "*.dll,*.exe,{#OPTIONAL_EXT}"; Components: {#GIMP_ARCHS}; Flags: {#COMMON_FLAGS}
2025-05-08 20:42:06 -03:00
Source: "{#GIMP_DIR32}\share\gimp\*"; DestDir: "{app}\share\gimp"; Components: {#GIMP_ARCHS}; Flags: {#COMMON_FLAGS} createallsubdirs
2024-06-16 16:03:12 -03:00
Source: "{#GIMP_DIR32}\share\icons\hicolor\*"; DestDir: "{app}\share\icons\hicolor"; Components: {#GIMP_ARCHS}; Flags: {#COMMON_FLAGS}
2024-06-16 15:37:11 -03:00
Source: "{#GIMP_DIR32}\share\metainfo\*"; DestDir: "{app}\share\metainfo"; Components: {#GIMP_ARCHS}; Flags: {#COMMON_FLAGS}
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
#define DEPS_ARCHS="deps32 or deps64 or depsARM64"
2024-06-16 16:03:12 -03:00
Source: "{#DEPS_DIR32}\etc\*"; DestDir: "{app}\etc"; Excludes: "gimp"; Components: {#DEPS_ARCHS}; Flags: {#COMMON_FLAGS}
Source: "{#DEPS_DIR32}\share\*"; DestDir: "{app}\share"; Excludes: "gimp,icons\hicolor,metainfo,locale\*,mypaint-data"; Components: {#DEPS_ARCHS}; Flags: {#COMMON_FLAGS} createallsubdirs
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-11-08 16:29:54 -03:00
;Optional arch-neutral files (full install)
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
#ifdef LUA
2025-02-22 21:37:14 -03:00
Source: "{#GIMP_DIR32}\lib\gimp\{#GIMP_PKGCONFIG_VERSION}\interpreters\lua.interp"; DestDir: "{app}\lib\gimp\{#GIMP_PKGCONFIG_VERSION}\interpreters"; Components: (lua32 or lua64 or luaARM64); Flags: {#COMMON_FLAGS}
2025-05-08 20:42:06 -03:00
Source: "{#GIMP_DIR32}\*.lua"; DestDir: "{app}"; Excludes: "share\gimp\*.lua"; Components: (lua32 or lua64 or luaARM64); Flags: {#COMMON_FLAGS}
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
#endif
#ifdef PYTHON
2025-02-22 21:37:14 -03:00
Source: "{#GIMP_DIR32}\lib\gimp\{#GIMP_PKGCONFIG_VERSION}\environ\py*.env"; DestDir: "{app}\lib\gimp\{#GIMP_PKGCONFIG_VERSION}\environ"; Components: (py32 or py64 or pyARM64); Flags: {#COMMON_FLAGS}
Source: "{#GIMP_DIR32}\lib\gimp\{#GIMP_PKGCONFIG_VERSION}\interpreters\pygimp.interp"; DestDir: "{app}\lib\gimp\{#GIMP_PKGCONFIG_VERSION}\interpreters"; Components: (py32 or py64 or pyARM64); Flags: {#COMMON_FLAGS}
2024-06-16 16:03:12 -03:00
Source: "{#GIMP_DIR32}\*.py"; DestDir: "{app}"; Components: (py32 or py64 or pyARM64); Flags: {#COMMON_FLAGS}
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
#endif
2024-06-16 16:03:12 -03:00
Source: "{#GIMP_DIR32}\share\locale\*"; DestDir: "{app}\share\locale"; Components: loc; Flags: dontcopy {#COMMON_FLAGS}
2024-08-05 18:52:48 -03:00
#include ASSETS_DIR + "\base_po-files.list"
2024-06-16 16:03:12 -03:00
Source: "{#DEPS_DIR32}\share\mypaint-data\*"; DestDir: "{app}\share\mypaint-data"; Components: mypaint; Flags: {#COMMON_FLAGS}
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-11-08 16:29:54 -03:00
;Required and optional arch specific files (binaries), except TWAIN in x64 and amd64
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
;i686
#define PLATFORM X86
2025-04-25 20:17:39 -03:00
;Set solid break for 32-bit binaries. See: https://gitlab.gnome.org/GNOME/gimp/-/issues/13801
#define COMMON_FLAGS="recursesubdirs restartreplace uninsrestartdelete ignoreversion solidbreak"
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
#include "base_executables.isi"
2024-11-08 16:29:54 -03:00
;TWAIN is always installed in the 32-bit version of GIMP
2025-02-22 21:37:14 -03:00
Source: "{#GIMP_DIR32}\lib\gimp\{#GIMP_PKGCONFIG_VERSION}\plug-ins\twain.exe"; DestDir: "{app}\lib\gimp\{#GIMP_PKGCONFIG_VERSION}\plug-ins"; Components: gimp32; Flags: {#COMMON_FLAGS}
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
;x86_64
2025-04-25 20:17:39 -03:00
;Restore common flags
#define COMMON_FLAGS="recursesubdirs restartreplace uninsrestartdelete ignoreversion"
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
#define PLATFORM X64
#include "base_executables.isi"
;AArch64
#define PLATFORM ARM64
#include "base_executables.isi"
2024-11-08 16:29:54 -03:00
;Optional 32-bit specific bins for TWAIN, since x64 and arm64 twain drivers are rare
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
#include "base_twain32on64.isi"
2025-02-22 21:37:14 -03:00
Source: "{#GIMP_DIR32}\lib\gimp\{#GIMP_PKGCONFIG_VERSION}\plug-ins\twain\twain.exe"; DestDir: "{app}\lib\gimp\{#GIMP_PKGCONFIG_VERSION}\plug-ins\twain"; Components: gimp32on64; Flags: {#COMMON_FLAGS}
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
;upgrade zlib1.dll in System32 if it's present there to avoid breaking plugins
;sharedfile flag will ensure that the upgraded file is left behind on uninstall to avoid breaking other programs that use the file
Source: "{#DEPS_DIR32}\bin\zlib1.dll"; DestDir: "{sys}"; Components: {#GIMP_ARCHS}; Flags: restartreplace sharedfile 32bit uninsrestartdelete comparetimestamp; Check: BadSysDLL('zlib1.dll',32)
Source: "{#DEPS_DIR64}\bin\zlib1.dll"; DestDir: "{sys}"; Components: gimp64; Flags: restartreplace sharedfile uninsrestartdelete comparetimestamp; Check: BadSysDLL('zlib1.dll',64)
2024-11-08 16:29:54 -03:00
;allow specific config files to be overridden if '/configoverride=' is set at run time
2024-06-16 11:28:20 -03:00
#define FindHandle
#sub ProcessConfigFile
#define FileName FindGetFileName(FindHandle)
Source: "{code:GetExternalConfDir}\{#FileName}"; DestDir: "{app}\{#ConfigDir}"; Flags: external restartreplace; Check: CheckExternalConf('{#FileName}')
#if BaseDir != GIMP_DIR32
Source: "{code:GetExternalConfDir}\{#FileName}"; DestDir: "{app}\32\{#ConfigDir}"; Components: gimp32on64; Flags: external restartreplace; Check: CheckExternalConf('{#FileName}')
#endif
#endsub
#define FindResult
#sub ProcessConfigDir
#emit ';; ' + ConfigDir
#emit ';; ' + BaseDir
#for {FindHandle = FindResult = FindFirst(AddBackslash(BaseDir) + AddBackSlash(ConfigDir) + "*", 0); \
FindResult; FindResult = FindNext(FindHandle)} ProcessConfigFile
#if FindHandle
#expr FindClose(FindHandle)
#endif
#endsub
#define public BaseDir GIMP_DIR32
2025-02-22 21:37:14 -03:00
#define public ConfigDir "etc\gimp\" + GIMP_PKGCONFIG_VERSION
2024-06-16 11:28:20 -03:00
#expr ProcessConfigDir
#define public ConfigDir "etc\fonts"
#expr ProcessConfigDir
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
#endif //NOFILES
2024-06-16 12:49:17 -03:00
;We need at least an empty folder to avoid GIMP*_LOCALEDIR warnings
[Dirs]
Name: "{app}\32\share\locale"; Components: gimp32on64; Flags: uninsalwaysuninstall
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-11-08 16:29:54 -03:00
;4.2 SPECIAL-CASE FILES TO BE WIPED
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
[InstallDelete]
Type: files; Name: "{app}\bin\gimp-?.?.exe"
Type: files; Name: "{app}\bin\gimp-?.??.exe"
Type: files; Name: "{app}\bin\gimp-console-?.?.exe"
Type: files; Name: "{app}\bin\gimp-console-?.??.exe"
;old ghostscript
Type: filesandordirs; Name: "{app}\share\ghostscript\*"
;get previous GIMP icon name from uninstall name in Registry
2024-11-23 09:31:58 -03:00
Type: files; Name: "{autoprograms}\{reg:HKA\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\GIMP-{#GIMP_MUTEX_VERSION}_is1,DisplayName|GIMP {#GIMP_MUTEX_VERSION}}.lnk"; Check: CheckRegValueExists('SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\GIMP-{#GIMP_MUTEX_VERSION}_is1','DisplayName')
Type: files; Name: "{autodesktop}\{reg:HKA\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\GIMP-{#GIMP_MUTEX_VERSION}_is1,DisplayName|GIMP {#GIMP_MUTEX_VERSION}}.lnk"; Check: CheckRegValueExists('SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\GIMP-{#GIMP_MUTEX_VERSION}_is1','DisplayName')
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
;remove old babl and gegl plugins
Type: filesandordirs; Name: "{app}\lib\babl-0.1"
Type: filesandordirs; Name: "{app}\lib\gegl-0.4"
2025-03-28 19:50:50 -03:00
;This was bunbled in 3.0 RC1 but not needed since the "Debug" menu is hidden in stable releases
2025-05-26 16:30:34 -03:00
#if !Defined(GIMP_UNSTABLE) && Defined(GIMP_RELEASE)
2024-11-10 20:19:45 -03:00
Type: files; Name: "{app}\bin\dot.exe"
#endif
2025-03-28 19:50:50 -03:00
;No need to all these python binaries shipped in 3.0 RC1
2024-11-23 20:20:50 -03:00
Type: files; Name: "{app}\bin\python3*.exe"
2025-03-28 19:50:50 -03:00
;Uneeded shipped headers in 3.0 RC3 (we now ship only babl, gegl and gimp)
Type: filesandordirs; Name: "{app}\include\exiv2"
Type: filesandordirs; Name: "{app}\include\gexiv2"
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-11-08 16:29:54 -03:00
[UninstallDelete]
Type: files; Name: "{app}\uninst\uninst.inf"
2025-02-22 21:37:14 -03:00
Type: files; Name: "{app}\lib\gimp\{#GIMP_PKGCONFIG_VERSION}\interpreters\lua.interp"
Type: files; Name: "{app}\lib\gimp\{#GIMP_PKGCONFIG_VERSION}\environ\pygimp.env"
2024-11-08 16:29:54 -03:00
2024-06-16 11:28:20 -03:00
2024-11-08 16:29:54 -03:00
;4.3 KEYS TO BE REGISTERED
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
[Registry]
2024-11-16 14:47:09 -03:00
;'ms-settings:appsfeatures' page (using info from 3.2.3 [Setup] section above)
2024-11-08 16:29:54 -03:00
;Root: HKA; Subkey: "Software\Microsoft\Windows\CurrentVersion\Uninstall\GIMP-{#GIMP_MUTEX_VERSION}_is1"; //(auto registered by Inno)
2024-11-16 14:47:09 -03:00
;Add GIMP .exe to PATH/'Win + R' (conflicts with MSIX. See: ..\store\AppxManifest.xml)
;Root: HKA; Subkey: "Software\Microsoft\Windows\CurrentVersion\App Paths\gimp-{#GIMP_MUTEX_VERSION}.exe"; Flags: uninsdeletekey
;Root: HKA; Subkey: "Software\Microsoft\Windows\CurrentVersion\App Paths\gimp-{#GIMP_MUTEX_VERSION}.exe"; ValueType: string; ValueName: ""; ValueData: "{app}\bin\gimp-{#GIMP_MUTEX_VERSION}.exe"
;Root: HKA; Subkey: "Software\Microsoft\Windows\CurrentVersion\App Paths\gimp-{#GIMP_MUTEX_VERSION}.exe"; ValueType: string; ValueName: "Path"; ValueData: "{app}\bin"
2024-06-16 11:28:20 -03:00
;Shell "Open with"
2024-10-31 09:37:36 -03:00
Root: HKA; Subkey: "Software\Classes\Applications\gimp-{#GIMP_MUTEX_VERSION}.exe"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\Applications\gimp-{#GIMP_MUTEX_VERSION}.exe"; ValueType: string; ValueName: "FriendlyAppName"; ValueData: "GIMP"
Root: HKA; Subkey: "Software\Classes\Applications\gimp-{#GIMP_MUTEX_VERSION}.exe\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\bin\gimp-{#GIMP_MUTEX_VERSION}.exe,1"
Root: HKA; Subkey: "Software\Classes\Applications\gimp-{#GIMP_MUTEX_VERSION}.exe\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\bin\gimp-{#GIMP_MUTEX_VERSION}.exe"" ""%1"""
2024-11-08 16:29:54 -03:00
;'ms-settings:defaultapps' page
2024-10-31 09:37:36 -03:00
Root: HKA; Subkey: "Software\GIMP {#GIMP_MUTEX_VERSION}"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\GIMP {#GIMP_MUTEX_VERSION}\Capabilities"; ValueType: string; ValueName: "ApplicationName"; ValueData: "GIMP"
Root: HKA; Subkey: "Software\GIMP {#GIMP_MUTEX_VERSION}\Capabilities"; ValueType: string; ValueName: "ApplicationIcon"; ValueData: "{app}\bin\gimp-{#GIMP_MUTEX_VERSION}.exe,0"
Root: HKA; Subkey: "Software\GIMP {#GIMP_MUTEX_VERSION}\Capabilities"; ValueType: string; ValueName: "ApplicationDescription"; ValueData: "GIMP is a free raster graphics editor used for image retouching and editing, free-form drawing, converting between different image formats, and more specialized tasks."
Root: HKA; Subkey: "Software\RegisteredApplications"; ValueType: string; ValueName: "GIMP {#GIMP_MUTEX_VERSION}"; ValueData: "Software\GIMP {#GIMP_MUTEX_VERSION}\Capabilities"; Flags: uninsdeletevalue
2024-06-16 11:28:20 -03:00
;Associations
#pragma option -e-
#define protected
#define Line=0
#define FileLine
#sub ProcessAssociation
#if !defined(Finished)
#if Copy(FileLine,1,1)=="#" || FileLine==""
//skip comments and empty lines
#else
2025-05-28 21:35:27 -03:00
#pragma message "Processing file_associations.list: " + FileLine
2024-10-31 09:37:36 -03:00
Root: HKA; Subkey: "Software\Classes\.{#FileLine}\OpenWithProgids"; ValueType: string; ValueName: "GIMP{#GIMP_MUTEX_VERSION}.{#FileLine}"; ValueData: ""; Flags: uninsdeletevalue
Root: HKA; Subkey: "Software\Classes\GIMP{#GIMP_MUTEX_VERSION}.{#FileLine}"; ValueType: string; ValueName: ""; ValueData: "GIMP {#CUSTOM_GIMP_VERSION} {#UpperCase(FileLine)}"; Flags: uninsdeletekey
2025-03-26 13:05:53 -03:00
Root: HKA; Subkey: "Software\Classes\GIMP{#GIMP_MUTEX_VERSION}.{#FileLine}\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\bin\gimp-{#GIMP_MUTEX_VERSION}.exe,2"
2024-10-31 09:37:36 -03:00
Root: HKA; Subkey: "Software\Classes\GIMP{#GIMP_MUTEX_VERSION}.{#FileLine}\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\bin\gimp-{#GIMP_MUTEX_VERSION}.exe"" ""%1"""
Root: HKA; Subkey: "Software\Classes\Applications\gimp-{#GIMP_MUTEX_VERSION}.exe\SupportedTypes"; ValueType: string; ValueName: ".{#FileLine}"; ValueData: ""
Root: HKA; Subkey: "Software\GIMP {#GIMP_MUTEX_VERSION}\Capabilities\FileAssociations"; ValueType: string; ValueName: ".{#FileLine}"; ValueData: "GIMP{#GIMP_MUTEX_VERSION}.{#FileLine}"
2024-06-16 11:28:20 -03:00
#endif
#endif
#endsub
#define FileHandle
2025-05-28 21:35:27 -03:00
#for {FileHandle = FileOpen(AddBackslash(BUILD_DIR)+"plug-ins\file_associations.list"); \
2024-06-16 11:28:20 -03:00
FileHandle && !FileEof(FileHandle); FileLine = FileRead(FileHandle)} \
ProcessAssociation
#if FileHandle
#expr FileClose(FileHandle)
#endif
2025-03-26 13:05:53 -03:00
;Associations (special case for .xcf files)
Root: HKA; Subkey: "Software\Classes\.xcf\OpenWithProgids"; ValueType: string; ValueName: "GIMP{#GIMP_MUTEX_VERSION}.xcf"; ValueData: ""; Flags: uninsdeletevalue
2025-05-29 10:51:18 -03:00
Root: HKA; Subkey: "Software\Classes\GIMP{#GIMP_MUTEX_VERSION}.xcf"; ValueType: string; ValueName: ""; ValueData: "GIMP {#CUSTOM_GIMP_VERSION} XCF"; Flags: uninsdeletekey
2025-03-26 13:05:53 -03:00
Root: HKA; Subkey: "Software\Classes\GIMP{#GIMP_MUTEX_VERSION}.xcf\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\bin\gimp-{#GIMP_MUTEX_VERSION}.exe,1"
Root: HKA; Subkey: "Software\Classes\GIMP{#GIMP_MUTEX_VERSION}.xcf\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\bin\gimp-{#GIMP_MUTEX_VERSION}.exe"" ""%1"""
Root: HKA; Subkey: "Software\Classes\Applications\gimp-{#GIMP_MUTEX_VERSION}.exe\SupportedTypes"; ValueType: string; ValueName: ".xcf"; ValueData: ""
Root: HKA; Subkey: "Software\GIMP {#GIMP_MUTEX_VERSION}\Capabilities\FileAssociations"; ValueType: string; ValueName: ".xcf"; ValueData: "GIMP{#GIMP_MUTEX_VERSION}.xcf"
2025-04-10 13:22:04 -03:00
;Associations (make association for .ico files but do not set DefaultIcon since their content is the DefaultIcon)
2024-10-31 09:37:36 -03:00
Root: HKA; Subkey: "Software\Classes\.ico\OpenWithProgids"; ValueType: string; ValueName: "GIMP{#GIMP_MUTEX_VERSION}.ico"; ValueData: ""; Flags: uninsdeletevalue
2025-05-29 10:51:18 -03:00
Root: HKA; Subkey: "Software\Classes\GIMP{#GIMP_MUTEX_VERSION}.ico"; ValueType: string; ValueName: ""; ValueData: "GIMP {#CUSTOM_GIMP_VERSION} ICO"; Flags: uninsdeletekey
2024-10-31 09:37:36 -03:00
Root: HKA; Subkey: "Software\Classes\GIMP{#GIMP_MUTEX_VERSION}.ico\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "%1"
Root: HKA; Subkey: "Software\Classes\GIMP{#GIMP_MUTEX_VERSION}.ico\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\bin\gimp-{#GIMP_MUTEX_VERSION}.exe"" ""%1"""
Root: HKA; Subkey: "Software\Classes\Applications\gimp-{#GIMP_MUTEX_VERSION}.exe\SupportedTypes"; ValueType: string; ValueName: ".ico"; ValueData: ""
2025-03-26 13:05:53 -03:00
Root: HKA; Subkey: "Software\GIMP {#GIMP_MUTEX_VERSION}\Capabilities\FileAssociations"; ValueType: string; ValueName: ".ico"; ValueData: "GIMP{#GIMP_MUTEX_VERSION}.ico"
2024-06-16 11:28:20 -03:00
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-11-08 16:29:54 -03:00
;5 INSTALLER CUSTOM CODE
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
[Code]
2024-06-02 10:25:03 -03:00
//GENERAL VARS AND UTILS
const
CP_ACP = 0;
CP_UTF8 = 65001;
COLOR_HOTLIGHT = 26;
var
//pgSimple: TWizardPage;
build/windows: Make Installer aware of Install, Reinstall and Update modes
Closes #12998.
On Install mode, we correctly allow users to customize the installation.
This is the expected use case of the "Customize" button: the first user be
able to decide if the installation will be system-wide or on local user,
to see the license, to choose the install dir, to select components etc.
On Reinstall and Update mode, however, some options choosen byf the first
user can't be undone, mainly components, since Inno never had support to
"modify" installs (it can only not install the unchecked components).
So, in our current scenario (before this commit):
- If python support was installed but on the update the user uncheck it,
the old python and all old gimp python plug-ins will remain installed
- The same applies for postscript (.ps) component and 32-bit TWAIN
So, the chances of breaking the install are very high. Inno knows that
and displays a built-in warning, but even that dialog have limitations.
So, let's not keep that false impression of being able to modify the
install, let's fix that by hidding "Customize" on Reinstall and Update.
2025-03-22 16:59:05 -03:00
InstallType: String;
2024-06-02 10:25:03 -03:00
InstallMode: (imNone, imSimple, imCustom, imRebootContinue);
ConfigOverride: (coUndefined, coOverride, coDontOverride);
Force32bitInstall: Boolean;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
function WideCharToMultiByte(CodePage: Cardinal; dwFlags: DWORD; lpWideCharStr: String; cchWideCharStr: Integer;
lpMultiByteStr: PAnsiChar; cbMultiByte: Integer; lpDefaultChar: Integer;
lpUsedDefaultChar: Integer): Integer; external 'WideCharToMultiByte@Kernel32 stdcall';
function MultiByteToWideChar(CodePage: Cardinal; dwFlags: DWORD; lpMultiByteStr: PAnsiChar; cbMultiByte: Integer;
lpWideCharStr: String; cchWideChar: Integer): Integer;
external 'MultiByteToWideChar@Kernel32 stdcall';
function GetLastError(): DWORD; external 'GetLastError@Kernel32 stdcall';
function GetSysColor(nIndex: Integer): DWORD; external 'GetSysColor@user32.dll stdcall';
2024-06-02 10:25:03 -03:00
function GetButtonWidth(const Texts: TArrayOfString; const Minimum: Integer): Integer;
var MeasureLabel: TNewStaticText;
i: Integer;
begin
MeasureLabel := TNewStaticText.Create(WizardForm);
with MeasureLabel do
begin
Parent := WizardForm;
Left := 0;
Top := 0;
AutoSize := True;
end;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
Result := Minimum;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
for i := 0 to GetArrayLength(Texts) - 1 do
begin
MeasureLabel.Caption := Texts[i];
if (MeasureLabel.Width + ScaleX(16)) > Result then
Result := (MeasureLabel.Width + ScaleX(16));
end;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
MeasureLabel.Free;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
end;
#include "util_general.isi"
2024-06-02 10:25:03 -03:00
#include "util_MessageWithURL.isi"
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
//0. PRELIMINARY SETUP CODE
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
//Existing 32-bit
procedure Check32bitOverride;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
var i: Integer;
2024-06-02 10:25:03 -03:00
old: String;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
begin
2024-06-02 10:25:03 -03:00
Force32bitInstall := False;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
old := LowerCase(GetPreviousData('32bitMode',''));
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
if old = 'true' then //ignore command line if previous install is already present
Force32bitInstall := True
else if old = 'false' then
Force32bitInstall := False
else
for i := 0 to ParamCount do //not a bug (in script anyway) - ParamCount returns the index of last ParamStr element, not the actual count
if ParamStr(i) = '/32' then
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
begin
2024-06-02 10:25:03 -03:00
Force32bitInstall := True;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
break;
end;
2024-06-02 10:25:03 -03:00
DebugMsg('Check32bitOverride',BoolToStr(Force32bitInstall) + '[' + old + ']');
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
end;
2024-06-02 10:25:03 -03:00
procedure RegisterPreviousData(PreviousDataKey: Integer);
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
begin
2024-06-02 10:25:03 -03:00
if Is64BitInstallMode() then
SetPreviousData(PreviousDataKey,'32BitMode',BoolToStr(Force32bitInstall));
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
end;
2024-06-02 10:25:03 -03:00
//Resume after reboot (if needed)
function RestartSetupAfterReboot(): Boolean; forward;
//Screen bit depth
function GetDC(hWnd: Integer): Integer; external 'GetDC@User32 stdcall';
function ReleaseDC(hWnd, hDC: Integer): Integer; external 'ReleaseDC@User32 stdcall';
function GetDeviceCaps(hDC, nIndex: Integer): Integer; external 'GetDeviceCaps@GDI32 stdcall';
const
BITSPIXEL = 12;
PLANES = 14;
function BPPTooLowWarning(): Boolean;
var hDC, bpp, pl: Integer;
Message,Buttons: TArrayOfString;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
begin
2024-06-02 10:25:03 -03:00
hDC := GetDC(0);
pl := GetDeviceCaps(hDC, PLANES);
bpp := GetDeviceCaps(hDC, BITSPIXEL);
ReleaseDC(0,hDC);
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
bpp := pl * bpp;
if bpp < 32 then
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
begin
2024-06-02 10:25:03 -03:00
SetArrayLength(Message,1);
SetArrayLength(Buttons,2);
Message[0] := CustomMessage('Require32BPP');
Buttons[0] := CustomMessage('Require32BPPContinue');
Buttons[1] := CustomMessage('Require32BPPExit');
if (not WizardSilent) and
(MessageWithURL(Message, CustomMessage('Require32BPPTitle'), Buttons, mbError, 2, 2) = 2) then
Result := False
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
else
2024-06-02 10:25:03 -03:00
Result := True;
end
else
Result := True;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
end;
build/windows: Make Installer aware of Install, Reinstall and Update modes
Closes #12998.
On Install mode, we correctly allow users to customize the installation.
This is the expected use case of the "Customize" button: the first user be
able to decide if the installation will be system-wide or on local user,
to see the license, to choose the install dir, to select components etc.
On Reinstall and Update mode, however, some options choosen byf the first
user can't be undone, mainly components, since Inno never had support to
"modify" installs (it can only not install the unchecked components).
So, in our current scenario (before this commit):
- If python support was installed but on the update the user uncheck it,
the old python and all old gimp python plug-ins will remain installed
- The same applies for postscript (.ps) component and 32-bit TWAIN
So, the chances of breaking the install are very high. Inno knows that
and displays a built-in warning, but even that dialog have limitations.
So, let's not keep that false impression of being able to modify the
install, let's fix that by hidding "Customize" on Reinstall and Update.
2025-03-22 16:59:05 -03:00
//Check what type of installation is being done
procedure CheckInstallType;
var
isInstalled: String;
InstallLocation: String;
Installed_AppVersion: String;
Installed_AppVersionInt: Int64;
Installer_AppVersionInt: Int64;
2025-04-01 16:31:53 -03:00
ErrorCode: Integer;
build/windows: Make Installer aware of Install, Reinstall and Update modes
Closes #12998.
On Install mode, we correctly allow users to customize the installation.
This is the expected use case of the "Customize" button: the first user be
able to decide if the installation will be system-wide or on local user,
to see the license, to choose the install dir, to select components etc.
On Reinstall and Update mode, however, some options choosen byf the first
user can't be undone, mainly components, since Inno never had support to
"modify" installs (it can only not install the unchecked components).
So, in our current scenario (before this commit):
- If python support was installed but on the update the user uncheck it,
the old python and all old gimp python plug-ins will remain installed
- The same applies for postscript (.ps) component and 32-bit TWAIN
So, the chances of breaking the install are very high. Inno knows that
and displays a built-in warning, but even that dialog have limitations.
So, let's not keep that false impression of being able to modify the
install, let's fix that by hidding "Customize" on Reinstall and Update.
2025-03-22 16:59:05 -03:00
begin
isInstalled := 'notInstalled';
if RegQueryStringValue(HKCU, 'Software\Microsoft\Windows\CurrentVersion\Uninstall\GIMP-{#GIMP_MUTEX_VERSION}_is1',
'DisplayVersion', Installed_AppVersion) then begin
RegQueryStringValue(HKCU, 'Software\Microsoft\Windows\CurrentVersion\Uninstall\GIMP-{#GIMP_MUTEX_VERSION}_is1',
'InstallLocation', InstallLocation);
StrToVersion(Installed_AppVersion, Installed_AppVersionInt);
isInstalled := 'Installed';
end;
if RegQueryStringValue(HKLM, 'Software\Microsoft\Windows\CurrentVersion\Uninstall\GIMP-{#GIMP_MUTEX_VERSION}_is1',
'DisplayVersion', Installed_AppVersion) then begin
RegQueryStringValue(HKLM, 'Software\Microsoft\Windows\CurrentVersion\Uninstall\GIMP-{#GIMP_MUTEX_VERSION}_is1',
'InstallLocation', InstallLocation);
StrToVersion(Installed_AppVersion, Installed_AppVersionInt);
isInstalled := 'Installed';
end;
StrToVersion('{#FULL_GIMP_VERSION}', Installer_AppVersionInt);
2025-04-11 08:18:12 -03:00
if (isInstalled = 'Installed') and not DirExists(ExtractFilePath(RemoveBackslashUnlessRoot(InstallLocation))) then begin
build/windows: Make Installer aware of Install, Reinstall and Update modes
Closes #12998.
On Install mode, we correctly allow users to customize the installation.
This is the expected use case of the "Customize" button: the first user be
able to decide if the installation will be system-wide or on local user,
to see the license, to choose the install dir, to select components etc.
On Reinstall and Update mode, however, some options choosen byf the first
user can't be undone, mainly components, since Inno never had support to
"modify" installs (it can only not install the unchecked components).
So, in our current scenario (before this commit):
- If python support was installed but on the update the user uncheck it,
the old python and all old gimp python plug-ins will remain installed
- The same applies for postscript (.ps) component and 32-bit TWAIN
So, the chances of breaking the install are very high. Inno knows that
and displays a built-in warning, but even that dialog have limitations.
So, let's not keep that false impression of being able to modify the
install, let's fix that by hidding "Customize" on Reinstall and Update.
2025-03-22 16:59:05 -03:00
InstallType := 'itRepair';
end else if isInstalled = 'notInstalled' then begin
InstallType := 'itInstall';
end else if ComparePackedVersion(Installer_AppVersionInt, Installed_AppVersionInt) = 0 then begin
InstallType := 'itReinstall';
end else if ComparePackedVersion(Installer_AppVersionInt, Installed_AppVersionInt) > 0 then begin
InstallType := 'itUpdate';
end else begin
InstallType := 'itDowngrade';
end;
DebugMsg('CheckInstallType','Installed GIMP {#GIMP_MUTEX_VERSION} is: ' + Installed_AppVersion + ', installer is: {#FULL_GIMP_VERSION}. So Install type is: ' + InstallType);
2025-04-01 16:31:53 -03:00
2025-04-10 15:03:55 -03:00
//Inno does not support direct downgrade so let's block it to not break installs
2025-04-01 16:31:53 -03:00
if (not WizardSilent) and (InstallType = 'itDowngrade') then begin
if SuppressibleMsgBox(FmtMessage(CustomMessage('DowngradeError'), [Installed_AppVersion, '{#FULL_GIMP_VERSION}']), mbCriticalError, MB_OK, IDOK) = IDOK then begin
ShellExecAsOriginalUser('','ms-settings:appsfeatures','','',SW_SHOW,ewNoWait,ErrorCode);
Abort;
end;
2025-04-08 20:10:10 -03:00
end else if (WizardSilent) and (InstallType = 'itDowngrade') then begin
DebugMsg('CheckInstallType',CustomMessage('DowngradeError'));
Abort;
2025-04-01 16:31:53 -03:00
end;
build/windows: Make Installer aware of Install, Reinstall and Update modes
Closes #12998.
On Install mode, we correctly allow users to customize the installation.
This is the expected use case of the "Customize" button: the first user be
able to decide if the installation will be system-wide or on local user,
to see the license, to choose the install dir, to select components etc.
On Reinstall and Update mode, however, some options choosen byf the first
user can't be undone, mainly components, since Inno never had support to
"modify" installs (it can only not install the unchecked components).
So, in our current scenario (before this commit):
- If python support was installed but on the update the user uncheck it,
the old python and all old gimp python plug-ins will remain installed
- The same applies for postscript (.ps) component and 32-bit TWAIN
So, the chances of breaking the install are very high. Inno knows that
and displays a built-in warning, but even that dialog have limitations.
So, let's not keep that false impression of being able to modify the
install, let's fix that by hidding "Customize" on Reinstall and Update.
2025-03-22 16:59:05 -03:00
end;
2024-06-02 10:25:03 -03:00
function InitializeSetup(): Boolean;
2025-05-26 16:30:34 -03:00
#if Defined(GIMP_UNSTABLE) || Defined(GIMP_RC_VERSION) || !Defined(GIMP_RELEASE)|| Defined(DEVEL_WARNING)
2024-06-02 10:25:03 -03:00
var Message,Buttons: TArrayOfString;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
#endif
2024-06-02 10:25:03 -03:00
begin
2025-04-01 16:31:53 -03:00
CheckInstallType;
2024-06-02 10:25:03 -03:00
ConfigOverride := coUndefined;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
Check32bitOverride;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
Result := RestartSetupAfterReboot(); //resume install after reboot - skip all setting pages, and install directly
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
if Result then
Result := BPPTooLowWarning();
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
if not Result then //no need to do anything else
exit;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
//Unstable version warning
2025-05-26 16:30:34 -03:00
#if Defined(GIMP_UNSTABLE) || Defined(GIMP_RC_VERSION) || !Defined(GIMP_RELEASE) || Defined(DEVEL_WARNING)
2024-06-02 10:25:03 -03:00
Explode(Message, CustomMessage('DevelopmentWarning'), #13#10);
SetArrayLength(Buttons,2);
Buttons[0] := CustomMessage('DevelopmentButtonContinue');
Buttons[1] := CustomMessage('DevelopmentButtonExit');
if (not WizardSilent) and
(MessageWithURL(Message, CustomMessage('DevelopmentWarningTitle'), Buttons, mbError, 2, 2) = 2) then
begin
Result := False;
Exit;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
end;
#endif
2024-06-02 10:25:03 -03:00
try
2025-04-11 16:51:05 -03:00
ExtractTemporaryFile('installsplash_top.scale-100.bmp');
ExtractTemporaryFile('installsplash_top.scale-125.bmp');
ExtractTemporaryFile('installsplash_top.scale-150.bmp');
ExtractTemporaryFile('installsplash_top.scale-175.bmp');
ExtractTemporaryFile('installsplash_top.scale-200.bmp');
ExtractTemporaryFile('installsplash_top.scale-225.bmp');
ExtractTemporaryFile('installsplash_top.scale-250.bmp');
ExtractTemporaryFile('installsplash_bottom.bmp');
2024-06-02 10:25:03 -03:00
except
DebugMsg('InitializeSetup','Error extracting temporary file: ' + GetExceptionMessage);
MsgBox(CustomMessage('ErrorExtractingTemp') + #13#13 + GetExceptionMessage,mbError,MB_OK);
Result := False;
exit;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
end;
2024-06-02 10:25:03 -03:00
//if InstallMode <> imRebootContinue then
// SuppressibleMsgBox(CustomMessage('UninstallWarning'),mbError,MB_OK,IDOK);
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
end;
2024-06-02 10:25:03 -03:00
//1. WELCOME: add splash image with buttons in non-default positions
var
2025-04-11 16:51:05 -03:00
WelcomeBitmapTop: TBitmapImage;
2024-06-02 10:25:03 -03:00
WelcomeBitmapBottom: TBitmapImage;
btnInstall, btnCustomize: TNewButton;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
procedure UpdateWizardImages();
2025-04-11 16:51:05 -03:00
var TopBitmap,BottomBitmap: TFileStream;
2024-06-02 10:25:03 -03:00
begin
2025-04-25 13:10:34 -03:00
if not WizardSilent then begin
//Automatically scaled splash image
WelcomeBitmapTop := TBitmapImage.Create(WizardForm.WelcomePage);
with WelcomeBitmapTop do
begin
Parent := WizardForm.WelcomePage;
Width := WizardForm.WelcomePage.ClientWidth
Height := 1080 * Width / 1920
Left := 0;
Top := (WizardForm.ClientHeight - Height) / 2;
AutoSize := False;
Stretch := True;
Center := True;
2025-04-11 16:51:05 -03:00
end;
2025-04-25 13:10:34 -03:00
try
if WelcomeBitmapTop.Height <= 314 then begin
TopBitmap := TFileStream.Create(ExpandConstant('{tmp}\installsplash_top.scale-100.bmp'),fmOpenRead);
end else if WelcomeBitmapTop.Height <= 386 then begin
TopBitmap := TFileStream.Create(ExpandConstant('{tmp}\installsplash_top.scale-125.bmp'),fmOpenRead);
end else if WelcomeBitmapTop.Height <= 459 then begin
TopBitmap := TFileStream.Create(ExpandConstant('{tmp}\installsplash_top.scale-150.bmp'),fmOpenRead);
end else if WelcomeBitmapTop.Height <= 556 then begin
TopBitmap := TFileStream.Create(ExpandConstant('{tmp}\installsplash_top.scale-175.bmp'),fmOpenRead);
end else if WelcomeBitmapTop.Height <= 604 then begin
TopBitmap := TFileStream.Create(ExpandConstant('{tmp}\installsplash_top.scale-200.bmp'),fmOpenRead);
end else if WelcomeBitmapTop.Height <= 700 then begin
TopBitmap := TFileStream.Create(ExpandConstant('{tmp}\installsplash_top.scale-225.bmp'),fmOpenRead);
end else begin
TopBitmap := TFileStream.Create(ExpandConstant('{tmp}\installsplash_top.scale-250.bmp'),fmOpenRead);
end;
DebugMsg('UpdateWizardImages','Height: ' + IntToStr(WelcomeBitmapTop.Height));
WizardForm.WizardBitmapImage.Bitmap.LoadFromStream(TopBitmap);
WelcomeBitmapTop.Bitmap := WizardForm.WizardBitmapImage.Bitmap;
except
DebugMsg('UpdateWizardImages','Error loading image: ' + GetExceptionMessage);
finally
if TopBitmap <> nil then
TopBitmap.Free;
end;
WizardForm.WelcomePage.Color := clNone;
//Blurred background
WelcomeBitmapBottom := TBitmapImage.Create(WizardForm);
with WelcomeBitmapBottom do
begin
Left := 0;
Top := 0;
Parent := WizardForm;
Width := WizardForm.ClientWidth;
Height := WizardForm.ClientHeight;
Stretch := True;
end;
try
BottomBitmap := TFileStream.Create(ExpandConstant('{tmp}\installsplash_bottom.bmp'),fmOpenRead);
WizardForm.WizardBitmapImage.Bitmap.LoadFromStream(BottomBitmap);
WelcomeBitmapBottom.Bitmap := WizardForm.WizardBitmapImage.Bitmap;
except
DebugMsg('UpdateWizardImages','Error loading image: ' + GetExceptionMessage);
finally
if BottomBitmap <> nil then
BottomBitmap.Free;
end;
WizardForm.WizardBitmapImage.Width := WizardForm.ClientWidth;
WizardForm.WizardBitmapImage.Height := WizardForm.ClientHeight;
end;
2024-06-02 10:25:03 -03:00
end;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
procedure PrepareWelcomePage();
begin
if not WizardSilent then
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
begin
2024-06-02 10:25:03 -03:00
WizardForm.NextButton.Visible := False;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2025-03-24 17:10:44 -03:00
if not (InstallType = 'itRepair') then begin
btnInstall.Visible := True;
end;
2024-06-02 10:25:03 -03:00
btnInstall.TabOrder := 1;
2025-04-10 15:03:55 -03:00
//Inno does not support "repairing" a lost install so let's show Customize button to allow to repair installs
//Inno does not support changing components at reinstall or update so let's hide Customize to not break installs
2025-03-24 17:10:44 -03:00
if (InstallType = 'itRepair') or (InstallType = 'itInstall') then begin
build/windows: Make Installer aware of Install, Reinstall and Update modes
Closes #12998.
On Install mode, we correctly allow users to customize the installation.
This is the expected use case of the "Customize" button: the first user be
able to decide if the installation will be system-wide or on local user,
to see the license, to choose the install dir, to select components etc.
On Reinstall and Update mode, however, some options choosen byf the first
user can't be undone, mainly components, since Inno never had support to
"modify" installs (it can only not install the unchecked components).
So, in our current scenario (before this commit):
- If python support was installed but on the update the user uncheck it,
the old python and all old gimp python plug-ins will remain installed
- The same applies for postscript (.ps) component and 32-bit TWAIN
So, the chances of breaking the install are very high. Inno knows that
and displays a built-in warning, but even that dialog have limitations.
So, let's not keep that false impression of being able to modify the
install, let's fix that by hidding "Customize" on Reinstall and Update.
2025-03-22 16:59:05 -03:00
btnCustomize.Visible := True;
end;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
WizardForm.Bevel.Visible := False;
WizardForm.WelcomeLabel1.Visible := False;
WizardForm.WelcomeLabel2.Visible := False;
WelcomeBitmapBottom.Visible := True;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
end;
end;
procedure CleanUpCustomWelcome();
begin
WizardForm.NextButton.Visible := True;
2025-03-24 17:10:44 -03:00
if not (InstallType = 'itRepair') then begin
btnInstall.Visible := False;
end;
if (InstallType = 'itRepair') or (InstallType = 'itInstall') then begin
build/windows: Make Installer aware of Install, Reinstall and Update modes
Closes #12998.
On Install mode, we correctly allow users to customize the installation.
This is the expected use case of the "Customize" button: the first user be
able to decide if the installation will be system-wide or on local user,
to see the license, to choose the install dir, to select components etc.
On Reinstall and Update mode, however, some options choosen byf the first
user can't be undone, mainly components, since Inno never had support to
"modify" installs (it can only not install the unchecked components).
So, in our current scenario (before this commit):
- If python support was installed but on the update the user uncheck it,
the old python and all old gimp python plug-ins will remain installed
- The same applies for postscript (.ps) component and 32-bit TWAIN
So, the chances of breaking the install are very high. Inno knows that
and displays a built-in warning, but even that dialog have limitations.
So, let's not keep that false impression of being able to modify the
install, let's fix that by hidding "Customize" on Reinstall and Update.
2025-03-22 16:59:05 -03:00
btnCustomize.Visible := False;
end;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
WizardForm.Bevel.Visible := True;
WelcomeBitmapBottom.Visible := False;
end;
procedure InstallOnClick(Sender: TObject);
begin
DebugMsg('Install mode','Simple');
InstallMode := imSimple;
CleanUpCustomWelcome();
WizardForm.NextButton.OnClick(TNewButton(Sender).Parent);
end;
procedure CustomizeOnClick(Sender: TObject);
begin
DebugMsg('Install mode','Custom');
InstallMode := imCustom;
CleanUpCustomWelcome();
WizardForm.NextButton.OnClick(TNewButton(Sender).Parent);
end;
procedure InitCustomPages();
var i,ButtonWidth: Integer;
ButtonText: TArrayOfString;
MeasureLabel: TNewStaticText;
//lblInfo: TNewStaticText;
begin
DebugMsg('InitCustomPages','wpLicense');
2025-03-24 17:10:44 -03:00
CheckInstallType;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
btnInstall := TNewButton.Create(WizardForm);
with btnInstall do
begin
Parent := WizardForm;
Width := WizardForm.NextButton.Width;
Height := WizardForm.NextButton.Height;
Left := WizardForm.NextButton.Left;
Top := WizardForm.NextButton.Top;
build/windows: Make Installer aware of Install, Reinstall and Update modes
Closes #12998.
On Install mode, we correctly allow users to customize the installation.
This is the expected use case of the "Customize" button: the first user be
able to decide if the installation will be system-wide or on local user,
to see the license, to choose the install dir, to select components etc.
On Reinstall and Update mode, however, some options choosen byf the first
user can't be undone, mainly components, since Inno never had support to
"modify" installs (it can only not install the unchecked components).
So, in our current scenario (before this commit):
- If python support was installed but on the update the user uncheck it,
the old python and all old gimp python plug-ins will remain installed
- The same applies for postscript (.ps) component and 32-bit TWAIN
So, the chances of breaking the install are very high. Inno knows that
and displays a built-in warning, but even that dialog have limitations.
So, let's not keep that false impression of being able to modify the
install, let's fix that by hidding "Customize" on Reinstall and Update.
2025-03-22 16:59:05 -03:00
if InstallType = 'itInstall' then begin
Caption := CustomMessage('Install');
end else if InstallType = 'itReinstall' then begin
Caption := CustomMessage('Reinstall');
end else if InstallType = 'itUpdate' then begin
Caption := CustomMessage('Update');
end;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
Default := True;
Visible := False;
OnClick := @InstallOnClick;
end;
//used to measure text width
MeasureLabel := TNewStaticText.Create(WizardForm);
with MeasureLabel do
begin
Parent := WizardForm;
Left := 0;
Top := 0;
AutoSize := True;
2025-03-24 17:10:44 -03:00
if InstallType = 'itRepair' then begin
Caption := CustomMessage('Repair');
end else if InstallType = 'itInstall' then begin
Caption := CustomMessage('Customize');
end;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
end;
btnCustomize := TNewButton.Create(WizardForm);
with btnCustomize do
begin
Parent := WizardForm;
Width := WizardForm.NextButton.Width;
if Width < (MeasureLabel.Width + ScaleX(8)) then
Width := MeasureLabel.Width + ScaleX(8);
Height := WizardForm.NextButton.Height;
Left := WizardForm.ClientWidth - (WizardForm.CancelButton.Left + WizardForm.CancelButton.Width);
//Left := WizardForm.BackButton.Left;
Top := WizardForm.NextButton.Top;
Visible := False;
2025-03-24 17:10:44 -03:00
if InstallType = 'itRepair' then begin
Caption := CustomMessage('Repair');
end else if InstallType = 'itInstall' then begin
Caption := CustomMessage('Customize');
end;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
OnClick := @CustomizeOnClick;
end;
MeasureLabel.Free;
build/windows: Make Installer aware of Install, Reinstall and Update modes
Closes #12998.
On Install mode, we correctly allow users to customize the installation.
This is the expected use case of the "Customize" button: the first user be
able to decide if the installation will be system-wide or on local user,
to see the license, to choose the install dir, to select components etc.
On Reinstall and Update mode, however, some options choosen byf the first
user can't be undone, mainly components, since Inno never had support to
"modify" installs (it can only not install the unchecked components).
So, in our current scenario (before this commit):
- If python support was installed but on the update the user uncheck it,
the old python and all old gimp python plug-ins will remain installed
- The same applies for postscript (.ps) component and 32-bit TWAIN
So, the chances of breaking the install are very high. Inno knows that
and displays a built-in warning, but even that dialog have limitations.
So, let's not keep that false impression of being able to modify the
install, let's fix that by hidding "Customize" on Reinstall and Update.
2025-03-22 16:59:05 -03:00
2024-06-02 10:25:03 -03:00
end;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
//2. LICENSE
procedure InfoBeforeLikeLicense();
begin
2024-12-16 13:09:17 -03:00
WizardForm.Bevel.Visible := False;
2024-06-02 10:25:03 -03:00
WizardForm.InfoBeforeClickLabel.Visible := False;
WizardForm.InfoBeforeMemo.Height := WizardForm.InfoBeforeMemo.Height + WizardForm.InfoBeforeMemo.Top - WizardForm.InfoBeforeClickLabel.Top;
WizardForm.InfoBeforeMemo.Top := WizardForm.InfoBeforeClickLabel.Top;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
end;
2025-04-08 13:37:55 -03:00
//3. INSTALL DIR: override Inno custom dir icon
procedure NativeDirIcon();
var TypRect: TRect;
Icon: THandle;
IconSize: Integer;
begin
WizardForm.SelectDirBitmapImage.Visible := False;
Icon := ExtractIcon(0,'imageres.dll',3)
with TBitmapImage.Create(WizardForm.SelectDirPage) do begin
Parent := WizardForm.SelectDirPage;
with Bitmap do begin
Left := 0;
Top := 0;
AutoSize := True;
Center := True;
Width := ScaleY(32);
Height := ScaleY(32);
Canvas.FillRect(TypRect);
2025-04-11 16:51:05 -03:00
2025-04-08 13:37:55 -03:00
if WizardForm.Font.PixelsPerInch >= 168 then begin //175% scaling
IconSize := 64;
end else if WizardForm.Font.PixelsPerInch >= 144 then begin //150% scaling
IconSize := 48;
end else if WizardForm.Font.PixelsPerInch >= 120 then begin //125% scaling
IconSize := 32;
end else begin //100% scaling
IconSize := 32;
end;
DrawIconEx(Canvas.Handle, 0, 0, Icon, IconSize, IconSize, 0, 0, DI_NORMAL);
end;
end;
end;
2024-06-02 10:25:03 -03:00
//4. COMPONENTS: Add panel with description on click, to the right of the list
var
lblComponentDescription: TNewStaticText;
procedure ComponentsListOnClick(pSender: TObject); forward;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
procedure SelectComponentsFaceLift();
var pnlDescription: TPanel;
lblDescription: TNewStaticText;
begin
DebugMsg('SelectComponentsFaceLift','');
if WizardForm.ComponentsList.Width = WizardForm.SelectComponentsPage.Width then
WizardForm.ComponentsList.Width := Round(WizardForm.ComponentsList.Width * 0.6)
else
exit;
DebugMsg('SelectComponentsFaceLift','2');
WizardForm.ComponentsList.OnClick := @ComponentsListOnClick;
lblDescription := TNewStaticText.Create(WizardForm.ComponentsList.Parent)
with lblDescription do
begin
Left := WizardForm.ComponentsList.Left + WizardForm.ComponentsList.Width + ScaleX(16);
Top := WizardForm.ComponentsList.Top;
AutoSize := True;
Caption := CustomMessage('ComponentsDescription');
end;
pnlDescription := TPanel.Create(WizardForm.ComponentsList.Parent);
with pnlDescription do
begin
Parent := WizardForm.ComponentsList.Parent;
Left := WizardForm.ComponentsList.Left + WizardForm.ComponentsList.Width + ScaleX(8);
Width := WizardForm.TypesCombo.Width - WizardForm.ComponentsList.Width - ScaleX(8);
2024-05-25 11:06:28 -03:00
ParentColor := True;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
BevelOuter := bvLowered;
BevelInner := bvRaised;
Top := WizardForm.ComponentsList.Top + Round(lblDescription.Height * 0.4);
Height := WizardForm.ComponentsList.Height - Round(lblDescription.Height * 0.4);
end;
lblDescription.Parent := WizardForm.ComponentsList.Parent; //place lblDescription above pnlDescription
lblComponentDescription := TNewStaticText.Create(pnlDescription);
with lblComponentDescription do
begin
Parent := pnlDescription;
Left := ScaleX(8);
WordWrap := True;
AutoSize := False;
Width := Parent.Width - ScaleX(16);
Height := Parent.Height - ScaleY(20);
Top := ScaleY(12);
end;
end;
procedure ComponentsListOnClick(pSender: TObject);
var i,j: Integer;
Components: TArrayOfString;
ComponentDesc: String;
begin
DebugMsg('ComponentsListOnClick','');
2025-03-28 19:50:50 -03:00
Components := ['Gimp','Deps','Debug','Dev','Ghostscript','Lua','Python','Translations','MyPaint','Gimp32'];
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
ComponentDesc := '';
for i := 0 to TNewCheckListBox(pSender).Items.Count - 1 do
if TNewCheckListBox(pSender).Selected[i] then
begin
for j := 0 to Length(Components) - 1 do
begin
if TNewCheckListBox(pSender).Items.Strings[i] = CustomMessage('Components' + Components[j]) then
ComponentDesc := CustomMessage('Components' + Components[j] + 'Description');
end;
if ComponentDesc <> '' then
break;
end;
lblComponentDescription.Caption := ComponentDesc;
end;
2024-06-02 10:25:03 -03:00
//5. TAKS (no customizations)
//6. READY: Add formatting support to text box on ready page
var
ReadyMemoRichText: String;
procedure ReadyFaceLift();
var rtfNewReadyMemo: TRichEditViewer;
begin
DebugMsg('ReadyFaceLift','');
WizardForm.ReadyMemo.Visible := False;
rtfNewReadyMemo := TRichEditViewer.Create(WizardForm.ReadyMemo.Parent);
with rtfNewReadyMemo do
begin
Parent := WizardForm.ReadyMemo.Parent;
Scrollbars := ssVertical;
Color := WizardForm.Color;
BevelKind := bkFlat;
BorderStyle := bsNone;
UseRichEdit := True;
RTFText := ReadyMemoRichText;
ReadOnly := True;
Left := WizardForm.ReadyMemo.Left;
Top := WizardForm.ReadyMemo.Top;
Width := WizardForm.ReadyMemo.Width;
Height := WizardForm.ReadyMemo.Height;
Visible := True;
end;
end;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
function CopyW(const S: String; const Start, Len: Integer): String; //work-around for unicode-related bug in Copy
begin
Result := Copy(S, Start, Len);
end;
function Unicode2RTF(const pIn: String): String; //convert to RTF-compatible unicode
var i: Integer;
c: SmallInt;
begin
Result := '';
for i := 1 to Length(pIn) do
if Ord(pIn[i]) <= 127 then
begin
Result := Result + pIn[i];
end else
begin
c := Ord(pIn[i]); //code points above 7FFF must be expressed as negative numbers
Result := Result + '\u' + IntToStr(c) + '?';
end;
end;
2024-06-02 10:25:03 -03:00
const
RTFPara = '\par ';
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
function ParseReadyMemoText(pSpaces,pText: String): String;
var sTemp: String;
begin
sTemp := CopyW(pText,Pos(#10,pText)+1,Length(pText));
sTemp := Replace('{','\{',sTemp);
sTemp := Replace('\','\\',sTemp);
sTemp := Replace(#13#10,RTFpara,sTemp);
sTemp := Replace(pSpaces,'',sTemp);
sTemp := '\b ' + CopyW(pText,1,Pos(#13,pText)-1) + '\par\sb0' +
'\li284\b0 ' + sTemp + '\par \pard';
Result := Unicode2RTF(sTemp);
end;
2024-06-02 10:25:03 -03:00
const
2024-06-15 13:08:01 -03:00
RTFHeader = '{\rtf1\deff0{\fonttbl{\f0\fswiss\fprq2\fcharset0 Segoe UI;}{\f1\fnil\fcharset2 Segoe UI Symbol;}}\viewkind4\uc1\fs18';
2024-06-02 10:25:03 -03:00
//RTFBullet = '{\pntext\f1\''B7\tab}';
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
function UpdateReadyMemo(pSpace, pNewLine, pMemoUserInfo, pMemoDirInfo, pMemoTypeInfo, pMemoComponentsInfo, pMemoGroupInfo, pMemoTasksInfo: String): String;
var sText: String;
bShowAssoc: Boolean;
i,j: Integer;
begin
DebugMsg('UpdateReadyMemo','');
(* Prepare the text for new Ready Memo *)
sText := RTFHeader;
if pMemoDirInfo <> '' then
sText := sText + ParseReadyMemoText(pSpace,pMemoDirInfo) + '\sb100';
sText := sText + ParseReadyMemoText(pSpace,pMemoTypeInfo);
sText := sText + '\sb100' + ParseReadyMemoText(pSpace,pMemoComponentsInfo);
If pMemoTasksInfo<>'' then
sText := sText + '\sb100' + ParseReadyMemoText(pSpace,pMemoTasksInfo);
ReadyMemoRichText := Copy(sText,1,Length(sText)-6) + '}';
Result := 'If you see this, something went wrong';
end;
2024-06-02 10:25:03 -03:00
//7.1 BEFORE INSTALL
2025-05-24 11:21:20 -03:00
procedure PreparingFaceLift();
begin
WizardForm.Bevel.Visible := False;
end;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-12-26 19:03:51 -03:00
//Create restore point
procedure RestorePoint();
var
ResultCode: Integer;
begin
StatusLabel(CustomMessage('CreatingRestorePoint'),'');
2025-05-09 04:00:38 -03:00
if not ShellExec('RunAs', 'powershell', '-Command "$job = Start-Job -ScriptBlock { Checkpoint-Computer -Description "GIMP_' + ExpandConstant('{#CUSTOM_GIMP_VERSION}') + '_install" -RestorePointType APPLICATION_INSTALL }; Wait-Job $job -Timeout 24; if ($job.State -eq \"Running\") { Stop-Job $job -Confirm:$false }; Receive-Job $job"',
2024-12-26 19:03:51 -03:00
'', SW_HIDE, ewWaitUntilTerminated, ResultCode) then
begin
DebugMsg('RestorePoint','Failed to create restore point. Error code: ' + IntToStr(ResultCode));
end;
end;
2024-06-02 10:25:03 -03:00
//Unistall old version of GIMP (only if needed)
const
UNINSTALL_MAX_WAIT_TIME = 10000;
UNINSTALL_CHECK_TIME = 250;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
type
TRemoveOldGIMPResult = (rogContinue, rogRestartRequired, rogUninstallFailed, rogCantUninstall);
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
procedure DoUninstall(const UninstStr, InstallDir: String; const pInfoLabel: TNewStaticText; var oResult: TRemoveOldGIMPResult);
var InResult: TRemoveOldGIMPResult;
ResultCode, i: Integer;
begin
InResult := oResult;
DebugMsg('DoUninstall','Uninstall string: ' + UninstStr);
//when installing to same directory, assume that restart is required by default ...
if LowerCase(RemoveBackslashUnlessRoot(InstallDir)) = LowerCase(RemoveBackslashUnlessRoot(ExpandConstant('{app}'))) then
oResult := rogRestartRequired
else
oResult := InResult;
pInfoLabel.Caption := InstallDir;
if not Exec('>',UninstStr,'',SW_SHOW,ewWaitUntilTerminated,ResultCode) then
begin
DebugMsg('DoUninstall','Exec('+UninstStr+') failed: ' + IntToStr(ResultCode));
if not DirExists(InstallDir) then //old install directory doesn't exist, assume it was deleted, and Registry info is orphaned
begin
DebugMsg('DoUninstall','Install directory doesn'#39't exist: ' + InstallDir + ', resuming install');
oResult := InResult
end else
begin
oResult := rogUninstallFailed;
end;
exit;
end;
DebugMsg('DoUninstall','Exec succeeded, uninstaller result: ' + IntToStr(ResultCode));
//... unless the complete installation directory was removed on uninstall
i := 0;
while i < (UNINSTALL_MAX_WAIT_TIME / UNINSTALL_CHECK_TIME) do
begin
if not DirExists(ExpandConstant('{app}')) then
begin
DebugMsg('DoUninstall','Existing GIMP directory removed, restoring previous restart requirement');
oResult := InResult; //restore previous result
break;
end;
DebugMsg('DoUninstall','Waiting for ' + ExpandConstant('{app}') + ' to disappear [' + IntToStr(i) + ']');
Sleep(UNINSTALL_CHECK_TIME); //it may take a few seconds for the uninstaller to remove the directory after it's exited
Inc(i);
end;
end;
function RemoveOldGIMPVersions(): TRemoveOldGIMPResult;
var lblInfo1,lblInfo2: TNewStaticText;
RootKey: Integer;
OldPath, UninstallString, WhichStr: String;
begin
Result := rogContinue;
lblInfo1 := TNewStaticText.Create(WizardForm.PreparingPage);
with lblInfo1 do
begin
Parent := WizardForm.PreparingPage;
Left := 0;
Top := 0;
AutoSize := True;
WordWrap := True;
Width := WizardForm.PreparingPage.ClientWidth;
Caption := CustomMessage('RemovingOldVersion');
end;
2024-06-02 10:25:03 -03:00
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
lblInfo2 := TNewStaticText.Create(WizardForm.PreparingPage);
with lblInfo2 do
begin
Parent := WizardForm.PreparingPage;
Left := 0;
AutoSize := True;
WordWrap := True;
Width := WizardForm.PreparingPage.ClientWidth;
Top := lblInfo1.Height + ScaleY(8);
end;
if ExpandConstant('{param:debugresume|0}') = '1' then
Result := rogRestartRequired; //for testing
if Is64BitInstallMode() then
RootKey := HKLM32
else
RootKey := HKLM;
if RegValueExists(RootKey,'Software\Microsoft\Windows\CurrentVersion\Uninstall\WinGimp-2.0_is1',
'Inno Setup: App Path') then
begin
if RegQueryStringValue(RootKey,'Software\Microsoft\Windows\CurrentVersion\Uninstall\WinGimp-2.0_is1',
'Inno Setup: App Path',OldPath) then
begin
DebugMsg('RemoveOldGIMPVersions','Found legacy GIMP install, removing');
if RegValueExists(RootKey,'Software\Microsoft\Windows\CurrentVersion\Uninstall\WinGimp-2.0_is1',
'QuietUninstallString') then
WhichStr := 'QuietUninstallString'
else if RegValueExists(RootKey,'Software\Microsoft\Windows\CurrentVersion\Uninstall\WinGimp-2.0_is1',
'UninstallString') then
WhichStr := 'UninstallString'
else
begin
Result := rogCantUninstall;
exit;
end;
if not RegQueryStringValue(RootKey,'Software\Microsoft\Windows\CurrentVersion\Uninstall\WinGimp-2.0_is1',
WhichStr,UninstallString) then
begin
Result := rogCantUninstall;
exit;
end;
if WhichStr = 'UninstallString' then
UninstallString := UninstallString + ' /SILENT';
UninstallString := UninstallString + ' /NORESTART';
2024-06-02 10:25:03 -03:00
DoUninstall(UninstallString, OldPath, lblInfo2, Result);
end;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
end;
2024-06-02 10:25:03 -03:00
lblInfo1.Free;
lblInfo2.Free;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
end;
2024-06-02 10:25:03 -03:00
procedure CreateRunOnceEntry; forward;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
function PrepareToInstall(var pNeedsRestart: Boolean): String;
var ChecksumBefore, ChecksumAfter: String;
RemoveResult: TRemoveOldGIMPResult;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
begin
2024-06-02 10:25:03 -03:00
ChecksumBefore := MakePendingFileRenameOperationsChecksum;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
RemoveResult := RemoveOldGIMPVersions;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
if RemoveResult = rogRestartRequired then //old version was uninstalled, but something was left behind, so to be safe a reboot
begin //is enforced - this can only happen when reusing install directory
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
DebugMsg('PrepareToInstall','RemoveOldGIMPVersions requires restart');
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
ChecksumAfter := MakePendingFileRenameOperationsChecksum;
if (ChecksumBefore <> ChecksumAfter) or (ExpandConstant('{param:debugresume|0}') = '1') then
begin //this check is most likely redundant, since the uninstaller will be added to pending rename operations
CreateRunOnceEntry;
pNeedsRestart := True;
Result := CustomMessage('RebootRequiredFirst');
end;
end else
if RemoveResult = rogContinue then
begin
DebugMsg('PrepareToInstall','RemoveOldGIMPVersions finished successfully');
Result := ''; //old version was uninstalled successfully, nothing was left behind, so install can continue immediately
end else
if RemoveResult = rogUninstallFailed then
begin
DebugMsg('PrepareToInstall','RemoveOldGIMPVersions failed to uninstall old GIMP version');
2024-10-31 09:37:36 -03:00
Result := FmtMessage(CustomMessage('RemovingOldVersionFailed'),['{#CUSTOM_GIMP_VERSION}',ExpandConstant('{app}')]);
2024-06-02 10:25:03 -03:00
end else
if RemoveResult = rogCantUninstall then
begin
DebugMsg('PrepareToInstall','RemoveOldGIMPVersions failed to uninstall old GIMP version [1]');
2024-10-31 09:37:36 -03:00
Result := FmtMessage(CustomMessage('RemovingOldVersionCantUninstall'),['{#CUSTOM_GIMP_VERSION}',ExpandConstant('{app}')]);
2024-06-02 10:25:03 -03:00
end else
begin
DebugMsg('PrepareToInstall','Internal error 11');
Result := FmtMessage(CustomMessage('InternalError'),['11']); //should never happen
end;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
end;
2025-04-13 14:50:37 -03:00
//remove .pdb files from previous installs
2024-06-02 10:25:03 -03:00
//there's no built-in way in Inno to recursively delete files with wildcard+extension
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
procedure RemoveDebugFilesFromDir(pDir: String; var pDirectories: TArrayOfString);
var FindRec: TFindRec;
begin
DebugMsg('RemoveDebugFilesFromDir', pDir);
WizardForm.FilenameLabel.Caption := pDir;
if FindFirst(AddBackSlash(pDir) + '*', FindRec) then
begin
try
repeat
if FindRec.Attributes and FILE_ATTRIBUTE_DIRECTORY = 0 then
begin
2025-04-13 14:50:37 -03:00
//Up to GIMP 3.0.2 we shipped only DWARF .debug symbols
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
if (Length(FindRec.Name) > 6) and (LowerCase(Copy(FindRec.Name, Length(FindRec.Name) - 5, 6)) = '.debug') then
begin
2025-04-13 14:50:37 -03:00
DebugMsg('RemoveDebugFilesFromDir', '> ' + FindRec.Name);
DeleteFile(AddBackSlash(pDir) + FindRec.Name);
end;
//Starting with GIMP 3.0.4 we ship native CodeView .pdb symbols
if (Length(FindRec.Name) > 4) and (LowerCase(Copy(FindRec.Name, Length(FindRec.Name) - 3, 4)) = '.pdb') then
begin
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
DebugMsg('RemoveDebugFilesFromDir', '> ' + FindRec.Name);
DeleteFile(AddBackSlash(pDir) + FindRec.Name);
end;
end else
begin
if (FindRec.Name <> '.') and (FindRec.Name <> '..') then
begin
SetArrayLength(pDirectories, GetArrayLength(pDirectories) + 1);
pDirectories[GetArrayLength(pDirectories) - 1] := AddBackSlash(pDir) + FindRec.Name;
end;
end;
until not FindNext(FindRec);
finally
FindClose(FindRec);
end;
end;
end;
procedure RemoveDebugFiles();
var Directories: TArrayOfString;
Index: Integer;
begin
SetArrayLength(Directories, 1);
Directories[0] := ExpandConstant('{app}');
Index := 0;
WizardForm.StatusLabel.Caption := CustomMessage('RemovingOldFiles');
repeat
RemoveDebugFilesFromDir(Directories[Index], Directories);
Inc(Index);
until Index = GetArrayLength(Directories);
end;
2024-06-02 10:25:03 -03:00
procedure AssociationsCleanUp(); forward;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
//Check if icon exists in registry
function CheckRegValueExists(const SubKeyName, ValueName: String): Boolean;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
begin
2024-06-02 10:25:03 -03:00
Result := RegValueExists(HKEY_AUTO, SubKeyName, ValueName);
DebugMsg('CheckRegValueExists',SubKeyName + ', ' + ValueName + ': ' + BoolToStr(Result));
end;
//Legacy arch check
function Check3264(const pWhich: String): Boolean;
begin
if pWhich = '64' then //x64 or arm64
Result := Is64BitInstallMode() and (not Force32bitInstall)
else if pWhich = '32' then
Result := (not Is64BitInstallMode()) or Force32bitInstall
else if pWhich = 'x64' then
Result := Is64BitInstallMode() and IsX64 and (not Force32bitInstall)
else if pWhich = 'arm64' then
Result := Is64BitInstallMode() and IsARM64 and (not Force32bitInstall)
else
RaiseException('Unknown check');
end;
//some programs improperly install libraries to the System32 directory, which then causes problems with plugins
//this function checks if such file exists in System32, and lets setup update the file when it exists
function BadSysDLL(const pFile: String; const pPlatform: Integer): Boolean;
var OldRedir: Boolean;
begin
Result := False;
if pPlatform = 64 then
begin
if Is64BitInstallMode() then //only check when installing in 64bit mode
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
begin
2024-06-02 10:25:03 -03:00
OldRedir := EnableFsRedirection(False);
DebugMsg('BadSysDLL','64: ' + ExpandConstant('{sys}\' + pFile));
Result := FileExists(ExpandConstant('{sys}\' + pFile));
EnableFsRedirection(OldRedir);
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
end;
2024-06-02 10:25:03 -03:00
end
else if pPlatform = 32 then
begin
if Is64BitInstallMode() then //check 32bit system directory on x64 windows
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
begin
2024-06-02 10:25:03 -03:00
DebugMsg('BadSysDLL','32on64: ' + ExpandConstant('{syswow64}\' + pFile));
Result := FileExists(ExpandConstant('{syswow64}\' + pFile));
end
else
begin
DebugMsg('BadSysDLL','32: ' + ExpandConstant('{sys}\' + pFile));
Result := FileExists(ExpandConstant('{sys}\' + pFile));
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
end;
2024-06-02 10:25:03 -03:00
end
else
begin
RaiseException('Unsupported platform');
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
end;
2024-06-02 10:25:03 -03:00
DebugMsg('BadSysDLL','Result: ' + BoolToStr(Result));
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
end;
2024-06-02 10:25:03 -03:00
//Override some 'etc' configs (if requested)
const
CONFIG_OVERRIDE_PARAM = 'configoverride';
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
function DoConfigOverride: Boolean;
var i: Integer;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
begin
2024-06-02 10:25:03 -03:00
if ConfigOverride = coUndefined then
begin
DebugMsg('DoConfigOverride', 'First call');
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
Result := False;
ConfigOverride := coDontOverride;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
for i := 0 to ParamCount() do //use ParamCount/ParamStr to allow specifying /configoverride without any parameters
if LowerCase(Copy(ParamStr(i),1,15)) = '/' + CONFIG_OVERRIDE_PARAM then
begin
Result := True;
ConfigOverride := coOverride;
break;
end;
end
else if ConfigOverride = coOverride then
Result := True
else
Result := False;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
DebugMsg('DoConfigOverride', BoolToStr(Result));
end;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
function GetExternalConfDir(Unused: String): String;
begin
if ExpandConstant('{param:' + CONFIG_OVERRIDE_PARAM + '|<>}') = '<>' then
Result := ExpandConstant('{src}\')
else
Result := ExpandConstant('{param:' + CONFIG_OVERRIDE_PARAM + '|<>}\');
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
DebugMsg('GetExternalConfDir', Result);
end;
function CheckExternalConf(const pFile: String): Boolean;
begin
if not DoConfigOverride then //no config override
Result := False
else
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
begin
2024-06-02 10:25:03 -03:00
if FileExists(GetExternalConfDir('') + pFile) then //config file override only applies when that file exists
Result := True
else
Result := False;
end;
DebugMsg('CheckExternalConf', pFile + ': ' + BoolToStr(Result));
end;
//7.2 INSTALL: show GIMP text (aka billboard) above progress bar
2025-05-26 16:30:34 -03:00
#if Defined(GIMP_UNSTABLE)
2025-04-01 16:31:53 -03:00
const
GIMP_URL = 'https://gimp.org/downloads/devel/';
2024-06-12 12:26:34 -03:00
#else
2025-04-01 16:31:53 -03:00
const
GIMP_URL = 'https://gimp.org/downloads/';
2024-06-12 12:26:34 -03:00
#endif
2024-06-02 10:25:03 -03:00
procedure lblURL_OnClick(Sender: TObject);
var ErrorCode: Integer;
begin
ShellExecAsOriginalUser('',GIMP_URL,'','',SW_SHOW,ewNoWait,ErrorCode);
end;
function MeasureLabel(const pText: String): Integer; //WordWrap + AutoSize works better with TNewStaticText than with TLabel,
var lblMeasure: TNewStaticText; //abuse this
begin
lblMeasure := TNewStaticText.Create(WizardForm.InstallingPage);
with lblMeasure do
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
begin
2024-06-02 10:25:03 -03:00
Parent := WizardForm.InstallingPage;
AutoSize := True;
WordWrap := True;
Width := Parent.ClientWidth;
Caption := pText;
Result := Height;
end;
lblMeasure.Free;
end;
procedure InstallingFaceLift();
var lblMessage1,lblURL,lblMessage2: TLabel; //TNewStaticText doesn't support alignment
begin
2025-01-02 13:27:04 -03:00
WizardForm.Bevel.Visible := False;
2024-06-02 10:25:03 -03:00
with WizardForm.ProgressGauge do
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
begin
2024-06-02 10:25:03 -03:00
Height := ScaleY(21);
Top := WizardForm.InstallingPage.ClientHeight - Top - Height;
WizardForm.StatusLabel.Top := Top - WizardForm.FilenameLabel.Height - ScaleY(4);
WizardForm.FilenameLabel.Top := Top + Height + ScaleY(4);
end;
lblMessage1 := TLabel.Create(WizardForm.InstallingPage);
with lblMessage1 do
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
begin
2024-06-02 10:25:03 -03:00
Parent := WizardForm.InstallingPage;
Alignment := taCenter;
WordWrap := True;
AutoSize := False;
Width := WizardForm.InstallingPage.ClientWidth;
Height := MeasureLabel(CustomMessage('Billboard1'));
Caption := CustomMessage('Billboard1');
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
end;
2024-06-02 10:25:03 -03:00
lblURL := TLabel.Create(WizardForm.InstallingPage);
with lblURL do
begin
Parent := WizardForm.InstallingPage;
AutoSize := True;
WordWrap := False;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
Font.Color := GetSysColor(COLOR_HOTLIGHT);
Font.Style := [fsUnderline];
Font.Size := 12;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
Cursor := crHand;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
OnClick := @lblURL_OnClick;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
Caption := GIMP_URL;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
Left := Integer(WizardForm.InstallingPage.ClientWidth / 2 - Width / 2);
end;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
lblMessage2 := TLabel.Create(WizardForm.InstallingPage);
with lblMessage2 do
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
begin
2024-06-02 10:25:03 -03:00
Parent := WizardForm.InstallingPage;
Alignment := taCenter;
WordWrap := True;
AutoSize := False;
Width := WizardForm.InstallingPage.ClientWidth;
Height := MeasureLabel(CustomMessage('Billboard2'));
Caption := CustomMessage('Billboard2');
end;
lblMessage1.Top := Integer(WizardForm.StatusLabel.Top / 2 -
(lblMessage1.Height + ScaleY(4) + lblURL.Height + ScaleY(4) + lblMessage2.Height) / 2);
lblURL.Top := lblMessage1.Top + lblMessage1.Height + ScaleY(4);
lblMessage2.Top := lblURL.Top + lblURL.Height + ScaleY(4);
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
end;
2024-06-02 10:25:03 -03:00
//7.3 AFTER INSTALL
//Create .interp files
procedure PrepareInterp();
var InterpFile,InterpContent,LuaBin: String;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
begin
2024-06-02 10:25:03 -03:00
#ifdef PYTHON
2024-06-16 16:03:12 -03:00
if IsComponentSelected('py32') or IsComponentSelected('py64') or IsComponentSelected('pyARM64') then
2024-06-02 10:25:03 -03:00
begin
StatusLabel(CustomMessage('SettingUpPyGimp'),'');
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2025-02-22 21:37:14 -03:00
InterpFile := ExpandConstant('{app}\lib\gimp\{#GIMP_PKGCONFIG_VERSION}\interpreters\pygimp.interp');
2024-06-02 10:25:03 -03:00
DebugMsg('PrepareInterp','Writing interpreter file for gimp-python: ' + InterpFile);
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2025-05-26 16:30:34 -03:00
#if Defined(GIMP_UNSTABLE) || !Defined(GIMP_RELEASE)
2024-11-18 15:50:23 -03:00
//python.exe is prefered in unstable versions because of error output
#define PYTHON="python.exe"
2024-06-02 10:25:03 -03:00
#else
2024-11-18 15:50:23 -03:00
//pythonw.exe is prefered in stable releases because it works silently
#define PYTHON="pythonw.exe"
2024-06-02 10:25:03 -03:00
#endif
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
InterpContent := 'python=' + ExpandConstant('{app}\bin\{#PYTHON}') + #10 +
'python3=' + ExpandConstant('{app}\bin\{#PYTHON}') + #10 +
'/usr/bin/python=' + ExpandConstant('{app}\bin\{#PYTHON}') + #10 +
'/usr/bin/python3=' + ExpandConstant('{app}\bin\{#PYTHON}') + #10 +
':Python:E::py::python:'#10;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
if not SaveStringToUTF8File(InterpFile,InterpContent,False) then
begin
DebugMsg('PrepareInterp','Problem writing the file. [' + InterpContent + ']');
SuppressibleMsgBox(CustomMessage('ErrorUpdatingPython') + ' (2)',mbInformation,mb_ok,IDOK);
end;
end;
#endif
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
#ifdef LUA
2024-06-16 16:03:12 -03:00
if IsComponentSelected('lua32') or IsComponentSelected('lua64') or IsComponentSelected('luaARM64') then
2024-06-02 10:25:03 -03:00
begin
2025-02-22 21:37:14 -03:00
InterpFile := ExpandConstant('{app}\lib\gimp\{#GIMP_PKGCONFIG_VERSION}\interpreters\lua.interp');
2024-06-02 10:25:03 -03:00
DebugMsg('PrepareInterp','Writing interpreter file for lua: ' + InterpFile);
LuaBin := 'luajit.exe'
InterpContent := 'lua=' + ExpandConstant('{app}\bin\') + LuaBin + #10 +
'luajit=' + ExpandConstant('{app}\bin\') + LuaBin + #10 +
'/usr/bin/luajit=' + ExpandConstant('{app}\bin\') + LuaBin + #10 +
'/usr/bin/lua=' + ExpandConstant('{app}\bin\') + LuaBin + #10 +
':Lua:E::lua::' + LuaBin + ':'#10;
if not SaveStringToUTF8File(InterpFile,InterpContent,False) then
begin
DebugMsg('PrepareInterp','Problem writing the file. [' + InterpContent + ']');
SuppressibleMsgBox(CustomMessage('ErrorUpdatingPython') + ' (2)',mbInformation,mb_ok,IDOK);
end;
end;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
#endif
2024-06-02 10:25:03 -03:00
// !!! use comma for binfmt delimiter and full Windows path in interpreter field of binfmt
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
begin
2025-02-22 21:37:14 -03:00
InterpFile := ExpandConstant('{app}\lib\gimp\{#GIMP_PKGCONFIG_VERSION}\interpreters\gimp-script-fu-interpreter.interp');
2024-06-02 10:25:03 -03:00
DebugMsg('PrepareInterp','Writing interpreter file for gimp-script-fu-interpreter: ' + InterpFile);
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2025-02-22 21:37:14 -03:00
InterpContent := 'gimp-script-fu-interpreter=' + ExpandConstant('{app}\bin\gimp-script-fu-interpreter-{#GIMP_PKGCONFIG_VERSION}.exe') + #10 +
'gimp-script-fu-interpreter-{#GIMP_PKGCONFIG_VERSION}=' + ExpandConstant('{app}\bin\gimp-script-fu-interpreter-{#GIMP_PKGCONFIG_VERSION}.exe') + #10 +
'/usr/bin/gimp-script-fu-interpreter=' + ExpandConstant('{app}\bin\gimp-script-fu-interpreter-{#GIMP_PKGCONFIG_VERSION}.exe') + #10 +
',ScriptFu,E,,scm,,' + ExpandConstant('{app}\bin\gimp-script-fu-interpreter-{#GIMP_PKGCONFIG_VERSION}.exe') + ','#10;
2024-06-02 10:25:03 -03:00
if not SaveStringToUTF8File(InterpFile,InterpContent,False) then
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
begin
2024-06-02 10:25:03 -03:00
DebugMsg('PrepareInterp','Problem writing the file. [' + InterpContent + ']');
SuppressibleMsgBox(CustomMessage('ErrorUpdatingScriptFu') + ' (2)',mbInformation,mb_ok,IDOK);
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
end;
2024-06-02 10:25:03 -03:00
end;
end; //PrepareInterp
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
//Create .env files
procedure PrepareGimpEnvironment();
2025-02-16 18:12:39 -03:00
var EnvFile,Env,sTemp: String;
2024-06-02 10:25:03 -03:00
begin
StatusLabel(CustomMessage('SettingUpEnvironment'),'');
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
//set PATH to be used by plug-ins
2025-02-22 21:37:14 -03:00
EnvFile := ExpandConstant('{app}\lib\gimp\{#GIMP_PKGCONFIG_VERSION}\environ\default.env');
2024-06-02 10:25:03 -03:00
DebugMsg('PrepareGimpEnvironment','Setting environment in ' + EnvFile);
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
Env := #10'PATH=${gimp_installation_dir}\bin';
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
if IsComponentSelected('gimp32on64') then
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
begin
2024-06-02 10:25:03 -03:00
Env := Env + ';${gimp_installation_dir}\32\bin' + #10;
end else
begin
Env := Env + #10;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
end;
2024-06-02 10:25:03 -03:00
DebugMsg('PrepareGimpEnvironment','Appending ' + Env);
if not SaveStringToUTF8File(EnvFile,Env,True) then
begin
DebugMsg('PrepareGimpEnvironment','Problem appending');
SuppressibleMsgBox(FmtMessage(CustomMessage('ErrorChangingEnviron'),[EnvFile]),mbInformation,mb_ok,IDOK);
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
end;
2025-02-16 18:12:39 -03:00
// Set revision
2025-02-22 21:37:14 -03:00
EnvFile := ExpandConstant('{app}\share\gimp\{#GIMP_PKGCONFIG_VERSION}\gimp-release');
2025-03-25 12:28:37 -03:00
DebugMsg('PrepareGimpEnvironment','Setting revision number {#REVISION} in ' + EnvFile);
2025-02-16 18:12:39 -03:00
//LoadStringFromUTF8File(EnvFile,Env);
//sTemp := Replace('=0','={#REVISION}',Env);
2025-03-19 20:21:19 -03:00
sTemp := '[package]' + #10 + 'revision={#REVISION}' + #10
2025-02-16 18:12:39 -03:00
if not SaveStringToUTF8File(EnvFile,sTemp,False) then
begin
2025-03-25 12:24:29 -03:00
DebugMsg('PrepareGimpEnvironment','Problem setting revision');
2025-02-16 18:12:39 -03:00
SuppressibleMsgBox(FmtMessage(CustomMessage('ErrorChangingEnviron'),[EnvFile]),mbInformation,mb_ok,IDOK);
end;
2024-06-02 10:25:03 -03:00
// Disable check-update when run with specific option
if ExpandConstant('{param:disablecheckupdate|false}') = 'true' then
begin
2025-02-22 21:37:14 -03:00
EnvFile := ExpandConstant('{app}\share\gimp\{#GIMP_PKGCONFIG_VERSION}\gimp-release');
2024-06-02 10:25:03 -03:00
DebugMsg('DisableCheckUpdate','Disabling check-update in ' + EnvFile);
Env := 'check-update=false'
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
2024-06-02 10:25:03 -03:00
if not SaveStringToUTF8File(EnvFile,Env,True) then
begin
DebugMsg('PrepareGimpEnvironment','Problem appending');
SuppressibleMsgBox(FmtMessage(CustomMessage('ErrorChangingEnviron'),[EnvFile]),mbInformation,mb_ok,IDOK);
end;
end;
end;//PrepareGimpEnvironment
//Unistaller info
procedure SaveToUninstInf(const pText: AnsiString); forward;
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
procedure SaveToUninstInf(const pText: AnsiString);
var sUnInf: String;
sOldContent: String;
begin
sUnInf := ExpandConstant('{app}\uninst\uninst.inf');
if not FileExists(sUnInf) then //save small header
SaveStringToUTF8File(sUnInf,#$feff+'#Additional uninstall tasks'#13#10+ //#$feff BOM is required for LoadStringsFromFile
'#This file uses UTF-8 encoding'#13#10+
'#'#13#10+
'#Empty lines and lines beginning with # are ignored'#13#10+
'#'#13#10+
'#Add uninstallers for GIMP add-ons that should be removed together with GIMP like this:'#13#10+
'#Run:<description>/<full path to uninstaller>/<parameters for automatic uninstall>'#13#10+
'#'#13#10+
'#The file is parsed in reverse order' + #13#10 +
'' + #13#10 //needs '' in front, otherwise preprocessor complains
,False)
else
begin
LoadStringFromUTF8File(sUnInf,sOldContent);
if Pos(#13#10+pText+#13#10,sOldContent) > 0 then //don't write duplicate lines
exit;
end;
SaveStringToUTF8File(sUnInf,pText+#13#10,True);
end;
2024-06-02 10:25:03 -03:00
#include "util_uninst.isi"
//8. DONE/FINAL PAGE (no customizations)
//INITIALIZE AND ORDER INSTALLER PAGES
procedure InitializeWizard();
begin
UpdateWizardImages();
InitCustomPages();
2025-04-08 13:37:55 -03:00
NativeDirIcon();
2024-06-02 10:25:03 -03:00
end;
function ShouldSkipPage(pPageID: Integer): Boolean;
begin
DebugMsg('ShouldSkipPage','ID: '+IntToStr(pPageID));
Result := ((InstallMode = imSimple) or (InstallMode = imRebootContinue)) and (pPageID <> wpFinished);
if Result then
DebugMsg('ShouldSkipPage','Yes')
else
DebugMsg('ShouldSkipPage','No');
end;
procedure CurPageChanged(pCurPageID: Integer);
begin
DebugMsg('CurPageChanged','ID: '+IntToStr(pCurPageID));
case pCurPageID of
wpWelcome:
PrepareWelcomePage();
wpInfoBefore:
InfoBeforeLikeLicense();
wpSelectComponents:
SelectComponentsFaceLift();
wpReady:
ReadyFaceLift();
2025-05-24 11:21:20 -03:00
wpPreparing:
PreparingFaceLift();
2024-06-02 10:25:03 -03:00
wpInstalling:
InstallingFaceLift();
end;
end;
procedure CurStepChanged(pCurStep: TSetupStep);
begin
case pCurStep of
ssInstall:
begin
2024-12-26 19:03:51 -03:00
if IsAdminInstallMode() then begin
RestorePoint();
end;
2024-06-02 10:25:03 -03:00
RemoveDebugFiles();
AssociationsCleanup();
end;
ssPostInstall:
begin
PrepareInterp();
PrepareGimpEnvironment();
end;
end;
end;
//Reboot if needed
build/windows, devel-docs: Make Installer stuff human readable and less hardcoded
The Inno installer scripts contents (only 3 files: files, gimp3264 and
32on64) and filenames have been organized, making them much easier to
read, and slightly less hardcoded so less prone to being misunderstood
and pervasively receiving packaging stuff.
Just to be clear, one more time: the Inno installer (or future MSIX)
scripts never should be the center of attention. This "installcentrism"
caused a domino effect of partially "abandoning" the packaging, build.sh
and the meson scripts, which explains the existence of this MR...
(Some things still hardcoded since wildcards in Inno are very limited.
Also, the rational ordering principles of this MR were not applied since
these scripts are heavily based on the x86 .zip package and changing the
order of things here, according to my tests, breaks things quite easily)
2023-12-25 09:10:21 -03:00
#include "util_rebootcontinue.isi"
#expr SaveToFile(AddBackslash(SourcePath) + "Preprocessed.iss")