Commit Graph

599 Commits

Author SHA1 Message Date
Bruno e59dec503e
build/windows: Include only the bare minimum files to run TWAIN
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.
2024-06-25 14:52:14 -03:00
Bruno adda94e4d2 build/windows: Mimic 'AppVerName' against Inno pervasive behavior
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
2024-06-24 19:56:46 +00:00
Bruno e5b6dab298 build/windows: Merge '(INFO): moving DWARF...' with '(INFO): extracting...'
This makes easier to understand to where the .debug files are being moved.
2024-06-24 12:21:18 +00:00
Bruno 51b2f2b037 build/windows: Silence 'glib-compile-schemas' in Crossroad Deps script
Wine always outputs an ugly warning, even the command running fine.
Some first-time contributors got confused about this on IRC.
2024-06-24 00:01:08 +00:00
Bruno 00e11df317 build/windows: Debloat 'share/locale' bundling
Only iso_639.mo is needed. This also reduces the bundle and installs in 15MB.
2024-06-23 23:38:49 +00:00
Bruno 56269a68f6 build/windows: Add custom icon to the Installer setup
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.
2024-06-23 20:30:36 +00:00
Bruno 16dc7b4047 build/windows: Debloat 'lib/python3.11' bundling
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.
2024-06-23 14:09:22 +00:00
Bruno 8a2ce9d16f build/windows: Make Installer's Language dialog automatic
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.
2024-06-22 21:53:25 +00:00
Bruno dfceba448f build/windows: Fix Inno wrong components size calc (part 1)
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.
2024-06-22 18:52:20 +00:00
Bruno 9b29cc35be build/windows: Reduce redundancy on [Files] flags 2024-06-22 18:52:20 +00:00
Bruno 744abbbd6b build: Respect contributor's own GIMP_PREFIX
This makes the scripts less pervasive locally.
2024-06-20 16:20:11 +00:00
Bruno 3ea2fd4e19 build/windows: Avoid bloated .mo in Crossbuild bundling
Since CROSSROAD_PREFIX have system and GIMP_PREFIX mixed, we shouldn't
rely on that folder to list the supported langs. Let's do it more smartly.
2024-06-20 12:10:02 +00:00
Bruno 46698e25d5 build/windows: Clarify Installer optional params 2024-06-19 13:03:03 +00:00
Bruno 5c3620cbe7 build/windows: Move *associations.isi and *configoverride.isi to main .iss
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.
2024-06-19 13:03:03 +00:00
Bruno 3ee8c4e9a5
build/windows: Debloat 'share/glib-2.0' bundling
According to my tests, seems that only 'gschemas.compiled' is needed
2024-06-18 22:52:54 -03:00
Bruno 18187926cd
build/windows: Bundle 'share/lua' again on Windows
Despite that folder mysteriously not being mandatory on Linux
(the contents are different), on Windows (in PCs without MSYS2)
this is required by a warning. So, partially reverts c808d13b
2024-06-18 22:52:38 -03:00
Bruno c7f7c5d147
build/windows: Direct Installer users to the specific updates page
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).
2024-06-18 16:57:03 -03:00
Bruno de556c0734
build/windows: Move Installer (fully) to Win32 Vista design
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.
2024-06-16 08:17:20 -03:00
Bruno 8315967735 build/windows: Little fix after b38d0455 2024-06-15 15:40:45 +00:00
Bruno b38d0455c3
build/windows: Make clear crossbuild awful situation
Some contributors got confused about how to crossbuild on IRC. Let's help them.
2024-06-15 08:47:18 -03:00
Bruno c808d13b6e build/windows: Debloat a bit Windows bundling
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.
2024-06-15 00:34:54 +00:00
Bruno Lopes 21ffb58903
Issue #811: Make each language a component for the Installer
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.
2024-06-12 11:38:36 -03:00
Bruno c02160a949
build/windows: No need to download Inno Korean translation
It is shipped with Inno by default in version 6.3.
2024-06-09 18:26:02 -03:00
Bruno 2f74496ebf
build/windows: No need to add BOM anymore
Inno Installer 6.3 added support to UTF-8 *.isl files without a BOM
2024-06-09 18:21:27 -03:00
Bruno 8e576fb741 build/windows: Add fractional scaling to Installer Intro (actually End) image
Following a1ce459a
2024-06-09 16:58:03 +00:00
Bruno 12707592c2 build/windows: Add 'libxslt' to unified deps list
Some package stopped to need 'libxslt' out of nowhere.
Don't know when and why that happened, best I found was:
c3a5cacbaf
2024-06-06 14:07:10 +00:00
Bruno a8b9bedf3c
Issue #5146: Change Installer ProductInfo in revisions
This allows better versioning control by ITs.
2024-06-05 20:33:16 -03:00
Bruno fb5474ae4d
Issue #4053: Add "*default_bin" support on Windows and enable it
Almost every program have a non-versioned .exe on Windows. MSYS2 does this too.
2024-06-05 11:51:14 -03:00
Bruno a2bd501cee build/windows: Move Store assets generation to gimp-data
gimp-data is the correct place, along with the installer assets.
2024-06-04 16:29:59 +00:00
Bruno 1a70eba570 Revert "build/windows: generate a default XCF file to be copied by Windows"
This reverts commit 085d8a02b5.

For some reason, Windows doesn't allow us to use that feature
(confirmed this after using the version from the Store itself,
not the .msixbundle)
2024-06-04 16:29:59 +00:00
Bruno fad40afe45
build/windows: Organize *gimp3264.iss [Code] to not look like Assembly
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)
2024-06-03 16:42:13 -03:00
Bruno 09d6402a5b
build/windows: Update Installer dir code following latest changes 2024-06-03 06:49:22 -03:00
Bruno Lopes 57012174fb build/windows: Don't allow multiple Installers at same time
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
2024-06-01 20:42:06 +00:00
Bruno 796005216d build/windows: Very small clean-up to PowerShell scripts 2024-06-01 13:47:35 +00:00
Bruno Lopes 884b05f168 gitlab-ci, build/windows: Move back split of 32-bit symbols to gimp job
Following 0199faac

We use arm64 runners for the installer job to avoid queues, but...
llvm-objcopy is well know to lack parity and one sympthom is the
'invalid SymbolTableIndex' warning when handling x86 debug symbols.
2024-06-01 10:57:24 +00:00
Bruno Lopes 2f49ff0810 build/windows: Offer option to launch GIMP after install
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'].
2024-06-01 10:53:14 +00:00
Bruno Lopes 9a4d46f077 build/windows: Don't generate .interp files for Native .zip bundles
Following 59b62c33
2024-05-29 10:43:39 +00:00
Bruno Lopes cb8c8711a6 build/windows: Enable GEGL dev docs building on Windows
This is not broken according to my tests but babl is.
2024-05-28 13:32:03 +00:00
Bruno Lopes 2e748ddbfc build/windows: Make crossroad GIMP script work locally
Following fdc2f080.
2024-05-28 09:39:16 +00:00
Bruno Lopes 00af02fa19 build/windows: Make crossroad Deps script work locally
Following fdc2f080.

Also, do some cleanups.
2024-05-28 09:39:16 +00:00
Bruno Lopes ed97f08d0b build/windows: Delete Splash images from 2.9 era not used anymore
They should have been deleted by !1373 but there were so many things to
do that it is completely natural that these two files went unnoticed.
2024-05-25 17:44:22 -03:00
Bruno Lopes e93e0f49a0 build/windows: Move Inno installer to 'modern' style
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)
2024-05-25 19:15:54 +00:00
Bruno Lopes c7d271d892 build/windows: Silence Inno warnings regarding langs
We have no control over lang teams. No reason to keep the output polluted.
2024-05-25 07:44:57 -03:00
Bruno Lopes f34f55dd65 build/windows: Organize Installer [Setup] to make some sense 2024-05-25 07:44:49 -03:00
Bruno Lopes 6276d9d777 build/windows: Drop hardcoded Installer right-top icon
Now, the icon is generated from the (new) logo .svg in gimp-data.
Also, it now have full HiPPI (aka fractional scaling) support.
2024-05-24 16:22:23 -03:00
Bruno Lopes a1ce459a1b build/windows: Drop hardcoded Intro image from 2.9 (pre-2.10) series
Now, the image is generated from splash image in gimp-data
2024-05-24 12:16:07 -03:00
Bruno Lopes c6634d66ff build/windows: Make Installer versioning vars more neutral
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.
2024-05-24 13:22:03 +00:00
Bruno Lopes 0199faac2c gitlab-ci, build: Make DWARF (.debug) symbols splitting an Installer only script
Splitted .debug are not needed by crossbuilds, and breaks .msix certification.
2024-05-24 13:11:18 +00:00
Bruno Lopes dc21fb7601 meson, build: Disable CodeView (.pdb) generation and bundling for now
1) Right now, MS Partner Center doesn't tell us if the .pdb bunbled as .appxsym
are fine and we only have "Unknow" dumps in the Health page from MS Par. Cen.

My theory, according to my tests with 'SymChk', 'PDBCopy' and 'llvm-pdbutil',
is that this is happening because .pdb from clang or gcc are not "perfect", but
I really have no proof to afirm this, since Partner Center tell us nothing
about them, and we don't even know if the .appxsym were uploaded to begin with.

---

2) The compiler can't generate DWARF (.debug*) symbols when generating .pdb,
which breaks debugging in DrMingw and even lldb according to my tests.
(This is not a fault of the .pdb format but a circumstance: our debuggers
only support DWARF, which is the format already used by MSYS2 packages)

---

So, the .pdb will return probably only in the potential vcpkg transition.
2024-05-24 13:11:18 +00:00
Bruno Lopes edddb83784 build/windows: Fixes and cleanup to native scripts
Previous changes broken local building courtesy and probably DirectInput too.
Noticed that the universal variables can not work in some contexts, fixed.

Also, done some little cleanups.
2024-05-21 22:59:44 +00:00