Commit Graph

803 Commits

Author SHA1 Message Date
Bruno 98d3956fef
build/linux: Fix flatpak ignoring fork source code
See: https://gitlab.gnome.org/GNOME/gimp/-/merge_requests/1670#note_2152565

This makes the NIGHTLY flatpak use the local GIMP source. This reduces the
internet usage and makes possible to generate .flatpak from every branch out
there, which turns the flatpak finally really useful to code development.

Of course, this makes impossible to run 'flatpak-builder NIGHTLY_manifest.json'
without cloning or downloading GIMP code, but this is not a regression since:

1) the NIGHTLY manifest is in-source to begin with, so same thing as our other
   building methods (except macOS), which runs over the code they are stored

2) the chances of someone downloading partial source code (the NIGHTLY manifest
   alone) so being unable to build are low since this file isn't too easy to find

3) even if someone do this and don't like, we are not violating flatpak building
   pratices since this option exists to be used (and will be in NIGHTLY only)
2024-07-06 13:08:47 -03:00
Bruno 26645ab404 build/linux: Temporarily drop 'aalib'
It's failing badly even with the gcc trick.
I hope re-adding it soon with the MSYS2 patches.
2024-07-06 11:19:41 +00:00
Bruno ad7ef08ea0 build/linux: Antecipate some Clang changes to properly work on aarch64
Despite we not building gimp nightly on aarch64 we need to sync with beta.

So, this updates to LLVM/Clang 18, which fixes 'gexiv2' and 'poppler'
problems with deps on that arch. 'json-c' and 'luajit'  were adjusted too
with the use of proper build options to fix errors.
2024-07-06 11:19:41 +00:00
Bruno 78c85f6f45 build/linux: Sync poppler, ghostscript and openblas with beta manifest 2024-07-06 11:19:41 +00:00
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 2450b93062 meson, build/linux: Fix 'sed' hell in Flatpak build
Thanks @Jehan for noticing the right fix, way better than !1281
and subsequent tortuous workarounds.
2024-06-24 17:39: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 d071d01666 Revert "build/linux: Drop 'cfitsio' for now due to security concerns"
This reverts commit d64cbf1993.

By the way, change to a more trustful source repo in the hope of working.
2024-06-21 14:20:39 +00:00
Bruno ebeef5d7ef
build/linux: Move HEIC support to an extension
Ported from downstream (with proper adaptations):
3d7f13ff3c
2024-06-20 14:33:47 -03: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 5e500aeb78
Issue #11714: Temporary fix failing Flatpak builds 2024-06-20 08:03:22 -03: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 a1cb43d977 build/linux: Add way to locally emulate flatpak CI building
This is useful to debugging only
2024-06-19 01:02:58 +00: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 bb9716d609
build/linux: Enable colorful output under 'flatpak-builder'
Following 0f425554

Ninja and Cmake (which some modules use) supports colorful output.
To enable it, we need to set in the manifest due to the sandboxing.

See also: https://github.com/flatpak/flatpak-builder/issues/605
2024-06-18 16:09:05 -03:00
Bruno d64cbf1993
build/linux: Drop 'cfitsio' for now due to security concerns
Temporarily drops 'cfitsio' which started weeks ago to change its hash.
In my tests, after "fixing" the hash, sometimes it alternates to another,
which breaks the build again. This is too hard to maintain and unsafe(?).
2024-06-18 14:58:07 -03:00
Bruno Lopes 3a54c37daa
gitlab-ci, build/linux: Move Flatpak CI code to scripts that works
This will make easier to debug problems locally if needed and
have the potential to reduce the first barrier for Linux newbies.
2024-06-18 14:57:39 -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 Lopes a91599c454 build/linux: Reduce bashisms on AppImage script 2024-06-01 16:27:20 +00:00
Bruno 796005216d build/windows: Very small clean-up to PowerShell scripts 2024-06-01 13:47:35 +00:00
Bruno Lopes 375782fd64 gitlab-ci: Use LLD linker in Debian and Flatpak jobs
Following 55427487 and 85ed2847

It is a bit unusual to use 'clang' + 'GNU ld' combo.
Also, lld is advertised to be way faster.
2024-06-01 11:28:21 +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