meson, app: Remove Wintel emulation layer after TWAIN disabling

Since we will not distribute 32-bit TWAIN with the intaller anymore,
GIMP is now architecture-native on Windows like on Linux and macOS,
so there is no use for WoW64 emulation on native 64-bit installations.

Users that need to use TWAIN can build GIMP on MINGW32 shell,
using -Dtwain-unmaintained=true build option at meson setup.
This commit is contained in:
Bruno Lopes 2026-03-15 14:53:45 -03:00
parent 9fb127f684
commit 3fef9e5dc6
3 changed files with 0 additions and 53 deletions

View file

@ -111,10 +111,6 @@ static gboolean gimp_plug_in_write (GIOChannel *channel,
static gboolean gimp_plug_in_flush (GIOChannel *channel,
gpointer data);
#if defined G_OS_WIN32 && defined WIN32_32BIT_DLL_FOLDER
static void gimp_plug_in_set_dll_directory (const gchar *path);
#endif
#ifndef G_OS_WIN32
static void gimp_plug_in_close_waitpid (GPid pid,
gint status,
@ -361,39 +357,6 @@ gimp_plug_in_flush (GIOChannel *channel,
return TRUE;
}
#if defined G_OS_WIN32 && defined WIN32_32BIT_DLL_FOLDER
static void
gimp_plug_in_set_dll_directory (const gchar *path)
{
LPWSTR w_path;
const gchar *install_dir;
gchar *bin_dir;
LPWSTR w_bin_dir;
DWORD BinaryType;
w_path = NULL;
w_bin_dir = NULL;
install_dir = gimp_installation_directory ();
if (path &&
(w_path = g_utf8_to_utf16 (path, -1, NULL, NULL, NULL)) &&
GetBinaryTypeW (w_path, &BinaryType) &&
BinaryType == SCS_32BIT_BINARY)
bin_dir = g_build_filename (install_dir, WIN32_32BIT_DLL_FOLDER, NULL);
else
bin_dir = g_build_filename (install_dir, "bin", NULL);
w_bin_dir = g_utf8_to_utf16 (bin_dir, -1, NULL, NULL, NULL);
if (w_bin_dir)
{
SetDllDirectoryW (w_bin_dir);
g_free (w_bin_dir);
}
g_free (bin_dir);
g_free (w_path);
}
#endif
#ifndef G_OS_WIN32
static void
gimp_plug_in_close_waitpid (GPid pid,
@ -649,9 +612,6 @@ gimp_plug_in_open (GimpPlugIn *plug_in,
/* Fork another process. We'll remember the process id so that we
* can later use it to kill the filter if necessary.
*/
#if defined G_OS_WIN32 && defined WIN32_32BIT_DLL_FOLDER
gimp_plug_in_set_dll_directory (argv[0]);
#endif
if (! gimp_spawn_async (argv, envp, spawn_flags, &plug_in->pid, &error))
{
gimp_message (plug_in->manager->gimp, NULL, GIMP_MESSAGE_ERROR,
@ -690,10 +650,6 @@ gimp_plug_in_open (GimpPlugIn *plug_in,
cleanup:
#if defined G_OS_WIN32 && defined WIN32_32BIT_DLL_FOLDER
gimp_plug_in_set_dll_directory (NULL);
#endif
if (debug)
g_free (argv);

View file

@ -703,13 +703,6 @@ appstream = dependency('appstream', version: '>='+appstream_minver)
libarchive = dependency('libarchive')
################################################################################
# Check for 32-bit DLLs (Win32 64-bit)
if platform_windows and host_cpu_family == 'x86_64'
conf.set_quoted('WIN32_32BIT_DLL_FOLDER', get_option('win32-32bits-dll-folder'))
endif
################################################################################
# Check for detailed backtraces support
@ -2219,7 +2212,6 @@ final_message = [
''' Dr. Mingw (Win32): @0@'''.format(drmingw.found()),
''' Relocatable Bundle: @0@'''.format(relocatable_bundle),
''' Default ICC directory (Linux): @0@'''.format(icc_directory),
''' 32-bit DLL folder (Win32): @0@'''.format(get_option('win32-32bits-dll-folder')),
''' Dashboard backtraces: @0@'''.format(dashboard_backtrace),
''' Debug symbols format: @0@'''.format(debugging_format),
''' Binary symlinks: @0@'''.format(enable_default_bin),

View file

@ -25,7 +25,6 @@ option('gimpdir', type: 'string', value: '', description: 'Change d
option('icc-directory', type: 'string', value: '', description: 'Path to default color profiles for this system')
option('with-sendmail', type: 'string', value: '', description: 'Use Sendmail instead of Xdg-email')
option('win32-32bits-dll-folder', type: 'string', value: '32/bin', description: 'alternative folder with 32-bit versions of DLL libraries on Windows')
option('libunwind', type: 'boolean', value: true, description: 'Build with libunwind for backtrace')
option('libbacktrace', type: 'boolean', value: true, description: 'Build with libbacktrace support')
option('win-debugging', type: 'combo', value: 'native', description: 'Build with native/CodeView debug symbols or with DWARF',