From 381ea0c6d28dde37564fa8cf1b2644b6df66bce8 Mon Sep 17 00:00:00 2001 From: Bruno Lopes Date: Fri, 26 Dec 2025 19:15:15 -0300 Subject: [PATCH] build/windows: Move Windows .pdb utility to tools/ This reverts 63f5ea9d regarding the file naming Since the script is an utility pretty much one-task, it suits better on tools, similarly to what we do on babl and meson (but on these we put on root). And, along with 8c0f92b3, it makes build/windows less scary with less files. --- build/windows/1_build-deps-msys2.ps1 | 4 ++-- meson.build | 4 ++-- .../meson_install_win_debug.py | 0 3 files changed, 4 insertions(+), 4 deletions(-) rename build/windows/2_bundle-gimp-uni_sym.py => tools/meson_install_win_debug.py (100%) diff --git a/build/windows/1_build-deps-msys2.ps1 b/build/windows/1_build-deps-msys2.ps1 index 129b56be99..e21a3f0dd6 100644 --- a/build/windows/1_build-deps-msys2.ps1 +++ b/build/windows/1_build-deps-msys2.ps1 @@ -135,7 +135,7 @@ function self_build ([string]$repo, [array]$branch, [array]$patches, [array]$opt { if ("$dep" -ne 'babl' -and "$dep" -ne 'gegl') { - Add-Content meson.build "meson.add_install_script(find_program('$("$GIMP_DIR".Replace('\','/'))/build/windows/2_bundle-gimp-uni_sym.py'))" + Add-Content meson.build "meson.add_install_script(find_program('$("$GIMP_DIR".Replace('\','/'))/tools/meson_install_win_debug.py'))" } $clang_opts_meson=@('-Dc_args=-"fansi-escape-codes -gcodeview"', '-Dcpp_args=-"fansi-escape-codes -gcodeview"', '-Dc_link_args="-Wl,--pdb="', '-Dcpp_link_args="-Wl,--pdb="') } @@ -147,7 +147,7 @@ function self_build ([string]$repo, [array]$branch, [array]$patches, [array]$opt { if (-not "$env:VCPKG_ROOT" -and "$env:MSYSTEM_PREFIX" -ne 'MINGW32') { - Add-Content CMakeLists.txt "install(CODE `"execute_process(COMMAND `${Python3_EXECUTABLE`} $("$GIMP_DIR".Replace('\','/'))/build/windows/2_bundle-gimp-uni_sym.py`)`")" + Add-Content CMakeLists.txt "install(CODE `"execute_process(COMMAND `${Python3_EXECUTABLE`} $("$GIMP_DIR".Replace('\','/'))/tools/meson_install_win_debug.py`)`")" $clang_opts_cmake=@('-DCMAKE_C_FLAGS="-gcodeview"', '-DCMAKE_CXX_FLAGS="-gcodeview"', '-DCMAKE_EXE_LINKER_FLAGS="-Wl,--pdb="', '-DCMAKE_SHARED_LINKER_FLAGS="-Wl,--pdb="', '-DCMAKE_MODULE_LINKER_FLAGS="-Wl,--pdb="') } cmake -G Ninja -B _build-$(@($env:VCPKG_DEFAULT_TRIPLET,$env:MSYSTEM_PREFIX) | ?{$_} | select -First 1) -DCMAKE_INSTALL_PREFIX="$GIMP_PREFIX" ` diff --git a/meson.build b/meson.build index 97662d62d7..8a0d11d01c 100644 --- a/meson.build +++ b/meson.build @@ -203,7 +203,7 @@ if platform_windows if cc.get_argument_syntax() == 'msvc' # MSVC's rc.exe style: /DKey=Value' - rc_define_flag = [] + rc_define_flag = [] rc_define_fmt = '/D@0@=@1@' else # GNU's windres.exe style: --define Key="Value" @@ -2052,7 +2052,7 @@ pkgconfig.generate(libgimpui, # Ideally meson should take care of it automatically. # See: https://github.com/mesonbuild/meson/issues/12977 if platform_windows and debugging_format == 'native' and cc.get_argument_syntax() != 'msvc' - install_win_debug_script = find_program('build/windows/2_bundle-gimp-uni_sym.py') + install_win_debug_script = find_program('tools/meson_install_win_debug.py') meson.add_install_script(install_win_debug_script) endif diff --git a/build/windows/2_bundle-gimp-uni_sym.py b/tools/meson_install_win_debug.py similarity index 100% rename from build/windows/2_bundle-gimp-uni_sym.py rename to tools/meson_install_win_debug.py