This adds a bit more verbosity to the installer script while omitting some.
The version params (e.g. gimp_version) are dropped since now config.h is
mandatory (this is a natural conclusion of the generation of assets).
The ARTIFACTS_SUFFIX is being dropped on building scripts because:
1) This will make possible to further simplify Installer scripts in other commit
2) There is no script that uses multi-arch _build/_install at same time on CI
However, there are two use cases: to build Debian and flatpak; and, on Win,
to build on CLANGARM64 and CLANG64 (?). But probably they are pretty niche.
I suppose that people who build on Debian (or other dev-oriented distro)
willn't want to mantain deps in two sys prefixes (pkg and GNOME runtime)
+ two gimp prefixes (out of sandbox and sandbox) due to huge storage use.
Why someone would want to build with emulation on Win ARM64 I don't know.
Anyway, people that know how to do this stuff probably can change the .sh.
3) When building locally, the contributor doesn't need to know the arch at all.
Indeed, without this suffix, the scripts are inline with gimp-web-devel and
prevent some first-sight confusion when reading them that I've seen on IRC.
4) These arch suffixes can be understood as '_install-*' being distributable
which is not true. So, without this suffix we could make more clear
what is a package (when GitLab fix the glob bug in 'expose_as' someday).
---
Despite .gitlab-ci.yml not being a script, it needed to be touched too
because cross scripts depends on Debian jobs due to gimp-data MR.
The numbering is now inline with actual the order of jobs on CI
to make easier to understand what the numbers represent.
To understand why bundling is number 2 see: d09a2a6f and 2dc6f411
The storing of Windows scripts was changed to make easier to
call them, to better convey that they work outside CI and
to be consistent with other build/ subdirectories.
As decided in #10922, 32-bit will be tolerated in 3.0 series because of TWAIN.
So, let's package only the bare minimum files to the 32-bit TWAIN plug-in work.
This reduces the final installation size by approximately 215MB.
It's a common pratice to tell the user what version is being installed
even if this is somewhat obvious (the user opened the installer, he
should know it). Many installers do this and Win MSIX installer too.
However, there is no sign in our Installer about what version is
being installed (the reused splash/intro image doesn't count because
it isn't always different at each micro or revision, and text is small).
---
To accomplish that feature, the Inno langs needed to be patched since
Inno actually forbidden to use that feature when we have a Welcome page.
https://groups.google.com/g/innosetup/c/w0sebw5YAeg
But 'UninstallAppFullTitle' from the following langs couldn't be patched:
- Japanese
- Lativian
There are two approaches regarding the icon for Windows installers .exe:
1) same icon as the app: this give more identity, but creates confusion if
you saved the installer in the same dir of the installed app shortcut.
This approach is also confusing in the task bar (e.g.: running GIMP
stable while installing GIMP unstable);
2) generic icon (e.g. a box, a cd) provided by the tool: more generic if
you downloaded two installers generated by the same tool (ours is Inno)
I choose a middle ground and created a icon with: the app icon and an
"installer" symbol (a package box), which conveys the best of two words.
This also fixes the Inno inborn bug of the unninstaller with install icon.
After running almost all the py plug-ins, I noticed that few py modules and
pkgs are used to justify the need of a slightly faster build time with .pyc.
In the actual bloated status (with all .pyc), lib/python* is about 260 MB big.
With the bare minimum .pyc after the tests above, python*/ is less than 90.
So, let's purge the .pyc at bundling time (I'm not reinventing the wheel,
Krita do this too), which reduces the .zip bundles (so the Inno and MSIX
installs) in 170MB, the Installer .exe in 45MB and MSIX download in 60MB.
---
Let's also disable any .pyc generation, since GIMP installed with Inno in the
system-wide (aka admin) mode or installed with MSIX both doesn't handle well:
py plug-ins work but have CLI errors, unlike Inno user-mode and .zip bundle.
Actually, the Language dialog is always displayed, which is not too good since:
1) This is inconsistent: the install mode dialog (to choose user or system)
appears before using the system lang automatically. Even if Inno fix this:
2) This is tiring: depending on the context, the user can see up to 5 dialogs:
SmartScreen (1) > Install mode (2) > installer lang (3) > dev warning (4)
> SetupMutex (5): https://groups.google.com/g/innosetup/c/bkRtnHz2ygg
3) This is redundant: even if only 2 and 3 are displayed, why 2? Inno will
auto select the sys lang, which the user understand to search GIMP for PC;
4) This is confusing: even the lang dialog message being clear, some users
genuinely conclude that the selection will carry over to GIMP install like
the old Adobe CS installer (#5515). !1628 makes more clear that not, but
reducing confusion even more is a welcome plus considering points above.
So, let's use 'ShowLanguageDialog=auto'. That option ensures that the dialog
will NOT appear if the sys lang have a translation present in the installer,
which matches what every program does and even installers like Inkscape one.
If the lang isn't included in the installer, the dialog WILL appear so the
user can choose one which he is more fluent, being is a nice middle ground.
This solves an old bug that makes Inno report GIMP as being almost 1.8GB,
which is not true (it's 1.3GB at most). That was probably caused by the
overuse of components intersections (e.g.: gs + gimp, py + deps), which
Inno does not handle well (sometimes it not even displayed the cmp size).
TWAIN component is still reporting a wrong size since it's a totally
different beast, it will be fixed later.
Following c6634d66 and 09d6402a
These files are too small and aren't reused so no point keeping them modular.
Also, with them inside .iss we reduce the clutter in the installer/ folder.
The gimp.org main page was being used as the updates URL but the
downloads page is more direct, avoiding confusion with news or with
the stable big red button (remember: we also have dev installers).
Following e93e0f49
This defaults 'Segoe UI' for Installer texts and for license's body. This
font is still used as the default in Windows 11 and even in online docs.
We are also bumping to 9 pt as outlined in the final Win32 guidelines:
https://learn.microsoft.com/en-us/windows/win32/uxguide/vis-fonts
I've done microscopic pixel checks and confirmed that this produces a Win32
compliant design, which renders kerning and spacing equal as 'Win + R' and
UWP Notepad (please note that some "legacier" Win32 apps renders different)
---
Also, change from Lucida Console to 'Consolas' (default console font since
at least Win8). Today it is Cascadia Mono but not included with Win 10.
This makes the output more complete but at the same time less
polluted regarding the bundling scripts (base, deps and sym).
---
Also, packaging scripts (inno and msix) were touched as consequence
of experiments about drop bundling, for saving space (~20MB), of:
- etc/gtk (MSYS2 don't build immodules)
- share/ghostscript (macOS .dmg don't package it)
- share/libthai (macOS .dmg don't package it)
- share/locale (???, decided to kept only gtk and iso-codes to test)
- share/man (installer don't package it, maybe because Windows can't open)
- share/poppler (macOS .dmg don't package it)
- bin/bzip2.exe (???)
- bin/gdk-pixbuf-query-loaders.exe (loaders.cache already bundled)
- bin/gspawn*.exe. (???)
- share/gir-1.0 (installer don't package it)
- share/lua (???)
- share/vala (installer don't package it)
The "???" ones seems to not be used according to my local tests. If
they are, a bug will appear so we will be able to know, comment in
the script (for maximum clarity towards the future) then revert.
In the process, make the Installer localization process less 'masochist'
(in other words: less manual). The custom '.xml' was the only way since
the iso-codes, Dammed Lies and Inno namings don't match.
The installer is probably the most complex packaging format so one of the
biggest examples of packaging love over the years into it in our repo.
But the readability of installer scripts... leave a lot to be desired.
Now, the main script is organized following the order of installer pages
with some comments. This will make easier to future contributors work
(but this commit probably isn't perfect since it's a big change to read)
We have counter measures to avoid installing while gimp opened at 'prep time',
but until now none for the installer itself. Let's fix it with SetupMutex.
The final UX is just less worse (than today): the user needs first to select a
language, then only after this the dialog about two installer will be prompt.
Seems that Inno devs willn't fix: https://github.com/jrsoftware/issrc/pull/461
This commit just makes the installer display a (unchecked) checkbox, like Win
pkg manager (WinGet) so it's doesn't change the actual behavior. It also don't
break string freeze since the .isl string already exists and have translations.
The benefit to some users is having one less click to launch GIMP: [checkbox] >
[close]; instead of: [close] > [start menu icon] > [gimp in 'recommendations'].
This style mimics the color scheme used by Win32 applications since Vista (and
still used in Win11). The all grey scheme ended in XP. Let's move on.
But we will keep the actual window size and without being able to resize since
these two Inno features (WizardSizePercent and WizardResizable) are broken.
(The progress bar was changed too to conform with the defaults and uninstaller)
Now, the installer files match the meson config.h naming:
'gimp_version', 'gimp_app_version' and 'gimp_api_version'.
"devel" was replaced by meson 'gimp_unstable' too.
util_version was dropped since it lost its utility.
Native arm64 and x64 TWAIN binaries are not built anymore. No need to
discard at dist time what doesn't exist. (32-bit TWAIN not affected)
Also, start to using our own ARM64 runners to do the dist. This is more
reliable since the shared x64 runners can (and indeed) cause long queue.
- Splash images will now be stored from gimp-data.
- The installer BMP image scripts also move in the same time.
- We don't need devel and non-devel variants of the BMP images in InnoSetup
scripts since the images are generated from the actual splash.
This commit unites two scripts (.sh + .bat) in one .ps1. PS was choosed, since:
1) We don't need MSYS2 to distribute with Inno at first. Now, who wants to
just distribute GIMP can do it easier natively without a separate environ.
2) PS is actually pretty solid and have a good number of cmdlets, unlike the
ancient CMD, which barely supported more than 9 parameters in .bat files.
Consequently, some redundant variable checks have been removed from the .ISS.
Also, changes the name of the job and script for better consistency with the
upcoming MS Store job.
These files are not deleted when the Unstable (GIMP 2.99) or Stable (GIMP 3)
version are installed because the root is different. So, they can be removed.
As consensus on Windows contributors, it is more useful for most users
the generation of the desktop shortcut by default.
Now, users who don't want it should uncheck the option in custom install
or manually delete the shortcut after a full install.
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)
Debian changes:
- Since autotools has gone, we don't need to specify 'meson' in the
debian job and others.
- The "INSTALL_PREFIX" was renamed for the more usual "GIMP_PREFIX" and
the meson sintax of Debian jobs was also updated.
Windows changes:
- Then, clarify that the win64-nightly and win32-nightly jobs are, in
fact, in the 'packaging' step, since we don't really "distribute" GIMP
in .zip and the commands are almost the same of the packaging .SH
script, without scripted optimizations for Inno Installer (or future
.MSIX), crucial for distribution.
- We don't need to specify "native" sufix in any build since they are
the rule and cross builds are the exception.
General changes:
- The job names was changed to be more consistent and in accordance
with the folders present in the artifacts.
- The 'nightly' sufix was removed from the Inno Windows Installer job
and others, since this doesn't reflect the real build frequency.
- The scripts filenames are altered to stay "in order". This is not
essential but ultra convenient since it is easy to view and search.
(The -uni suffix is explained in a further commit)
- All artifacts names now have the commit to avoid apparently duplicate
files when downloading same step artifacts from different projects.
- Finally, rearrange the order of jobs rationally: first the OSes and
archs (from the most free and modern to the most closed and legacy),
then the stages (from 'prepare' to 'analysis'), ending with the
frequency of jobs (from the most frequent, called at each push, to
the least/weekly).
Overall, this changes, although difficult to review at the first
sight, will avoid in the future quite "dumb" issues like:
GNOME/gimp#10195