From 3d026f3d1446a1adfcecc129e56dc287b19de2ba Mon Sep 17 00:00:00 2001 From: Bruno Lopes Date: Sun, 15 Mar 2026 15:05:11 -0300 Subject: [PATCH] build: Remove Wintel support from the .exe installer It was only used for TWAIN, which we do not distribute anymore. (Emulation binaries were already not on the MSIX since its first version). --- build/windows/installer/3_dist-gimp-inno.ps1 | 26 +------- build/windows/installer/base_executables.isi | 2 +- build/windows/installer/base_gimp3264.iss | 29 +-------- build/windows/installer/base_twain32on64.isi | 60 ------------------- build/windows/installer/base_twain32on64.list | 8 --- build/windows/installer/lang/setup.isl.xml.in | 8 --- 6 files changed, 6 insertions(+), 127 deletions(-) delete mode 100644 build/windows/installer/base_twain32on64.isi delete mode 100644 build/windows/installer/base_twain32on64.list diff --git a/build/windows/installer/3_dist-gimp-inno.ps1 b/build/windows/installer/3_dist-gimp-inno.ps1 index 6b0c84a610..c4b5541922 100644 --- a/build/windows/installer/3_dist-gimp-inno.ps1 +++ b/build/windows/installer/3_dist-gimp-inno.ps1 @@ -54,12 +54,11 @@ $INNO_PATH = Get-ItemProperty (Resolve-Path Registry::'HKEY_CURRENT_USER\Softwar Set-Alias iscc "$INNO_PATH\iscc.exe" ## This script needs a bit of Python to work -#FIXME: Restore the condition when TWAIN 32-bit support is dropped -#if (-not (Get-Command "python" -ErrorAction SilentlyContinue) -or "$(Get-Command "python" -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Source)" -like '*WindowsApps*') -# { +if (-not (Get-Command "python" -ErrorAction SilentlyContinue) -or "$(Get-Command "python" -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Source)" -like '*WindowsApps*') + { Invoke-Expression ((Get-Content build\windows\1_build-deps-msys2.ps1 | Select-String '-not \$env:MSYS_ROOT' -Context 0,12) -replace '> ','') $env:PATH = "$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/bin;$env:PATH" -# } + } Write-Output "(INFO): Installed Inno: $inno_version_downloaded | Installed Python: $((python --version) -replace '[^0-9.]', '')" Write-Output "$([char]27)[0Ksection_end:$(Get-Date -UFormat %s -Millisecond 0):installer_tlkt$([char]13)$([char]27)[0K" @@ -189,19 +188,6 @@ Write-Output "$([char]27)[0Ksection_end:$(Get-Date -UFormat %s -Millisecond 0):i # (Most of the file processing and special-casing is done on *gimp3264.iss [Files] section. # The resulting .exe installer content should be identical to the .msix and vice-versa) -## Get 32-bit TWAIN deps list -if (Test-Path "$X86_BUNDLE") - { - Write-Output "$([char]27)[0Ksection_start:$(Get-Date -UFormat %s -Millisecond 0):installer_files[collapsed=true]$([char]13)$([char]27)[0KGenerating 32-bit TWAIN dependencies list" - $twain_list_file = 'build\windows\installer\base_twain32on64.list' - Copy-Item $twain_list_file "$twain_list_file.bak" - $twain_list = (python tools\lib_bundle.py --debug debug-only $(Resolve-Path $X86_BUNDLE/lib/gimp/*/plug-ins/twain/twain.exe) $env:MSYS_ROOT/mingw32/ $X86_BUNDLE/ 32 | - Select-String 'Installed' -CaseSensitive -Context 0,1000) -replace " `t- ",'bin\' - (Get-Content $twain_list_file) | Foreach-Object {$_ -replace "@DEPS_GENLIST@","$twain_list"} | Set-Content $twain_list_file - (Get-Content $twain_list_file) | Select-string 'Installed' -notmatch | Set-Content $twain_list_file - Write-Output "$([char]27)[0Ksection_end:$(Get-Date -UFormat %s -Millisecond 0):installer_files$([char]13)$([char]27)[0K" - } - # 5. COMPILE .EXE INSTALLER $INSTALLER="gimp-${CUSTOM_GIMP_VERSION}-setup.exe" @@ -211,12 +197,6 @@ iscc -DREVISION="$revision" -DBUILD_DIR="$BUILD_DIR" $supported_archs -DDEBUG_SY Set-Location ..\..\.. Write-Output "$([char]27)[0Ksection_end:$(Get-Date -UFormat %s -Millisecond 0):installer_making$([char]13)$([char]27)[0K" -## Revert change done in TWAIN list -if ($twain_list_file) - { - Remove-Item $twain_list_file - Move-Item "$twain_list_file.bak" $twain_list_file - } ## Clean changes in Inno installation fix_msg 'Default.isl' revert fix_msg $langsArray_Official revert diff --git a/build/windows/installer/base_executables.isi b/build/windows/installer/base_executables.isi index 8db3c9b267..911c5e3ee7 100644 --- a/build/windows/installer/base_executables.isi +++ b/build/windows/installer/base_executables.isi @@ -12,7 +12,7 @@ ;Required arch-specific components (compact installation) #define OPTIONAL_DLL="libgs*.dll,lua*.dll,corelgilua*.dll,gluas.dll,libpython*.dll" -#define OPTIONAL_EXE="file-ps.exe,lua*.exe,python*.exe,twain.exe" +#define OPTIONAL_EXE="file-ps.exe,lua*.exe,python*.exe" Source: "{#BUNDLE}\bin\libgimp*.dll"; DestDir: "{app}\bin"; Components: gimp{#COMPONENT}; Flags: {#COMMON_FLAGS} Source: "{#BUNDLE}\bin\gimp*.exe"; DestDir: "{app}\bin"; Components: gimp{#COMPONENT}; Flags: {#COMMON_FLAGS} diff --git a/build/windows/installer/base_gimp3264.iss b/build/windows/installer/base_gimp3264.iss index 4ac959f24b..1bd8610fca 100644 --- a/build/windows/installer/base_gimp3264.iss +++ b/build/windows/installer/base_gimp3264.iss @@ -357,10 +357,6 @@ Name: loc; Description: "{cm:ComponentsTranslations}"; Types: full custom #include ASSETS_DIR + "\base_po-cmp.list" ;MyPaint Brushes Name: mypaint; Description: "{cm:ComponentsMyPaint}"; Types: full custom -;32-bit TWAIN support -#ifdef X86_BUNDLE -Name: gimp32on64; Description: "{cm:ComponentsGimp32}"; Types: full custom; Flags: checkablealone; Check: Check3264('64') -#endif [Files] ;setup files @@ -440,12 +436,6 @@ Source: "{#X86_BUNDLE}\lib\gimp\{#GIMP_PKGCONFIG_VERSION}\plug-ins\twain.exe"; D #include "base_executables.isi" #endif -;Optional 32-bit specific bins for TWAIN, since x64 and arm64 twain drivers are rare -#ifdef X86_BUNDLE -#include "base_twain32on64.isi" -Source: "{#X86_BUNDLE}\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} -#endif - ;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 #ifdef ARM64_BUNDLE @@ -463,9 +453,6 @@ Source: "{#X86_BUNDLE}\bin\zlib1.dll"; DestDir: "{sys}"; Components: {#GIMP_ARCH #sub ProcessConfigFile #define FileName FindGetFileName(FindHandle) Source: "{code:GetExternalConfDir}\{#FileName}"; DestDir: "{app}\{#ConfigDir}"; Flags: external restartreplace; Check: CheckExternalConf('{#FileName}') - #if BaseDir != MAIN_BUNDLE -Source: "{code:GetExternalConfDir}\{#FileName}"; DestDir: "{app}\32\{#ConfigDir}"; Components: gimp32on64; Flags: external restartreplace; Check: CheckExternalConf('{#FileName}') - #endif #endsub #define FindResult #sub ProcessConfigDir @@ -485,12 +472,6 @@ Source: "{code:GetExternalConfDir}\{#FileName}"; DestDir: "{app}\32\{#ConfigDir} #endif //NOFILES -;We need at least an empty folder to avoid GIMP*_LOCALEDIR warnings -[Dirs] -#ifdef X86_BUNDLE -Name: "{app}\32\share\locale"; Components: gimp32on64; Flags: uninsalwaysuninstall -#endif - ;4.2 SPECIAL-CASE FILES TO BE WIPED [InstallDelete] Type: files; Name: "{app}\bin\gimp-?.?.exe" @@ -1063,7 +1044,7 @@ var i,j: Integer; begin DebugMsg('ComponentsListOnClick',''); - Components := ['Gimp','Deps','Debug','Dev','Ghostscript','Lua','Python','Translations','MyPaint','Gimp32']; + Components := ['Gimp','Deps','Debug','Dev','Ghostscript','Lua','Python','Translations','MyPaint']; ComponentDesc := ''; for i := 0 to TNewCheckListBox(pSender).Items.Count - 1 do @@ -1587,13 +1568,7 @@ begin Env := #10'PATH=${gimp_installation_dir}\bin'; - if IsComponentSelected('gimp32on64') then - begin - Env := Env + ';${gimp_installation_dir}\32\bin' + #10; - end else - begin - Env := Env + #10; - end; + Env := Env + #10; DebugMsg('PrepareGimpEnvironment','Appending ' + Env); diff --git a/build/windows/installer/base_twain32on64.isi b/build/windows/installer/base_twain32on64.isi deleted file mode 100644 index de10c8b7f6..0000000000 --- a/build/windows/installer/base_twain32on64.isi +++ /dev/null @@ -1,60 +0,0 @@ -#if 0 -[Files] -#endif -//process list of 32bit GIMP files that are installed on x64 (for TWAIN support) -#pragma option -e- - -#define protected - -#define FileHandle -#define FileLine - -#define ReplPos -#define ReplStr - -#define Line=0 -#define SRC_DIR X86_BUNDLE - -//avoid too much nesting -#sub DoActualWork - #if Copy(FileLine,Len(FileLine),1)=="\" - //include whole directory -Source: "{#SRC_DIR}\{#FileLine}*"; DestDir: "{app}\32\{#Copy(FileLine,1,Len(FileLine)-1)}"; Components: gimp32on64; Flags: recursesubdirs restartreplace replacesameversion uninsrestartdelete ignoreversion solidbreak - #else - //include files from a certain directory - #define OutputDir Copy(FileLine,1,RPos("\",FileLine)-1) -Source: "{#SRC_DIR}\{#FileLine}"; DestDir: "{app}\32\{#OutputDir}"; Components: gimp32on64; Flags: restartreplace uninsrestartdelete ignoreversion - #endif -#endsub - -#sub Process32on64Line - #if !defined(Finished) - //show that something's happening - #expr Line=Line+1 - #pragma message "Processing base_twain32on64.list line " + Str(Line) - - #if Copy(FileLine,1,1)=="#" || FileLine=="" - //skip comments and empty lines - #elif Copy(FileLine,1,1)=="!" - #if Copy(FileLine,2)=="GIMP" - #expr SRC_DIR=X86_BUNDLE - #elif Copy(FileLine,2)=="GTK" - #expr SRC_DIR=X86_BUNDLE - #elif Copy(FileLine,2)=="end" - #define public Finished 1 - //finished - #else - #error "Unknown command: "+FileLine - #endif - #else - #expr DoActualWork - #endif - #endif -#endsub - -#for {FileHandle = FileOpen(AddBackslash(SourcePath)+"base_twain32on64.list"); \ - FileHandle && !FileEof(FileHandle); FileLine = FileRead(FileHandle)} \ - Process32on64Line -#if FileHandle - #expr FileClose(FileHandle) -#endif diff --git a/build/windows/installer/base_twain32on64.list b/build/windows/installer/base_twain32on64.list deleted file mode 100644 index fcb2c1410e..0000000000 --- a/build/windows/installer/base_twain32on64.list +++ /dev/null @@ -1,8 +0,0 @@ -#list of 32bit files to install on x64 -!GTK -lib\gdk-pixbuf-2.0\2.10.0\loaders\*.dll -lib\gdk-pixbuf-2.0\2.10.0\loaders.cache -lib\babl-0.1\*.dll -lib\gegl-0.4\gegl*.dll -@DEPS_GENLIST@ -!end diff --git a/build/windows/installer/lang/setup.isl.xml.in b/build/windows/installer/lang/setup.isl.xml.in index edba8035a2..eb54b8377b 100644 --- a/build/windows/installer/lang/setup.isl.xml.in +++ b/build/windows/installer/lang/setup.isl.xml.in @@ -151,14 +151,6 @@ Allow GIMP to load PostScript files - - - Support for 32-bit plug-ins - - - - Include files necessary for using 32-bit plug-ins.%nRequired for TWAIN support. -