[vlc-commits] [Git][videolan/vlc][master] 4 commits: meson: use an actual i686 compiler to build nsProcess.dll
Steve Lhomme (@robUx4)
gitlab at videolan.org
Fri Oct 2 09:44:39 UTC 2026
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
a0b19d8c by Steve Lhomme at 2026-10-02T11:06:36+02:00
meson: use an actual i686 compiler to build nsProcess.dll
When building for ARM64 all the compiler options are passed to
clang in addition of --target=i686-w64-mingw32. But some ARM64
options may not be available when compiling for i686 (like branch-protection).
- - - - -
de692ba3 by Steve Lhomme at 2026-10-02T11:06:36+02:00
package/win32: do not link nsProcess.dll with ole32
It does not use it nor has dependencies using it.
- - - - -
f9057bab by Steve Lhomme at 2026-10-02T11:06:36+02:00
package/win32: fail the nsProcess build if no source/object is used
The plugin has known entry points that we can force to link with.
- - - - -
33dd7af8 by Steve Lhomme at 2026-10-02T11:06:36+02:00
package/win32: force generating the NSIS builder in nightly/release/unsigned builds
These are the targets that call package-win32-exe so we should fail the configuration
is something is missing.
- - - - -
4 changed files:
- extras/package/win32/NSIS/meson.build
- + extras/package/win32/NSIS/nsProcess.def
- extras/package/win32/build.sh
- extras/package/win32/package.mak
Changes:
=====================================
extras/package/win32/NSIS/meson.build
=====================================
@@ -18,22 +18,35 @@ if not have_win64
endif
nsProcess_link_args = ['-static-libgcc']
-if have_win64
+# TODO use nsis-pluginapi if possible to be compatible with the system makensis
+# it provides the matching pluginapi.h and a library to link with
+
+nsProcess_sources = files('nsProcess/nsProcess.c', 'nsProcess/pluginapi.c')
+nsProcess_src = []
+nsProcess_obj = []
+if host_machine.cpu_family() != 'x86'
# nsProcess.dll needs to be a 32-bit DLL
- # with clang we can select it via -target i686-w64-mingw32
- if cc.has_argument(['--target=i686-w64-mingw32']) and cc.has_link_argument(['--target=i686-w64-mingw32'])
- nsProcess_cargs += '--target=i686-w64-mingw32'
+ # with clang we can link a i686 DLL via -target i686-w64-mingw32
+ if cc.has_link_argument(['--target=i686-w64-mingw32'], required: nsis_required)
nsProcess_link_args += '--target=i686-w64-mingw32'
- endif
-endif
-# TODO use nsis-pluginapi if possible to be compatible with the system makensis
+ x86_compiler = generator(find_program('i686-w64-mingw32-gcc'),
+ output: ['@BASENAME at .obj'],
+ arguments: ['@INPUT@', '-c', '-o', '@OUTPUT@', nsProcess_cargs])
+ nsProcess_obj += x86_compiler.process(nsProcess_sources)
+ endif
+else
+ # TODO always use this mode when we switch to a native .exe installer
+ # for each architecture
+ nsProcess_src = nsProcess_sources
+endif
nsProcess = shared_library('nsProcess',
- 'nsProcess/nsProcess.c', 'nsProcess/pluginapi.c',
+ nsProcess_src,
c_args: nsProcess_cargs,
link_args: nsProcess_link_args,
- dependencies : [ cc.find_library('ole32', required: true) ],
+ objects: nsProcess_obj,
+ vs_module_defs: 'nsProcess.def',
name_prefix: '',
install: true,
install_dir: 'NSIS')
=====================================
extras/package/win32/NSIS/nsProcess.def
=====================================
@@ -0,0 +1,6 @@
+LIBRARY "nsProcess.dll"
+EXPORTS
+_FindProcess
+_KillProcess
+_CloseProcess
+_Unload
=====================================
extras/package/win32/build.sh
=====================================
@@ -576,6 +576,10 @@ if [ -n "$BUILD_MESON" ]; then
VLC_LDFLAGS="$VLC_LDFLAGS -Wl,-pdb="
fi
+ if [ "$INSTALLER" = "n" ] || [ "$INSTALLER" = "r" ] || [ "$INSTALLER" = "u" ]; then
+ MCONFIGFLAGS="$MCONFIGFLAGS -Dnsis=enabled"
+ fi
+
BUILD_PATH="$( pwd -P )"
# we don't want to install in <destdir>/usr/local, just <destdir>
=====================================
extras/package/win32/package.mak
=====================================
@@ -127,10 +127,10 @@ endif
$(win32_destdir)/NSIS/nsProcess.dll: extras/package/win32/NSIS/nsProcess/nsProcess.c extras/package/win32/NSIS/nsProcess/pluginapi.c
mkdir -p "$(win32_destdir)/NSIS/"
if HAVE_WIN64
- i686-w64-mingw32-gcc $^ -shared -o $@ -lole32 -static-libgcc -D_UNICODE=1 -DUNICODE=1
+ i686-w64-mingw32-gcc $^ -shared -o $@ -static-libgcc -D_UNICODE=1 -DUNICODE=1
i686-w64-mingw32-strip $@
else
- $(CC) $^ -D_WIN32_IE=0x0601 -shared -o $@ -lole32 -static-libgcc -D_UNICODE=1 -DUNICODE=1
+ $(CC) $^ -D_WIN32_IE=0x0601 -shared -o $@ -static-libgcc -D_UNICODE=1 -DUNICODE=1
$(STRIP) $@
endif
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/d773e91d3b270a8ad1241a7426a09f322cf33110...33dd7af81ab12dc5a19e5b99dea90dd55c95d8d3
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/d773e91d3b270a8ad1241a7426a09f322cf33110...33dd7af81ab12dc5a19e5b99dea90dd55c95d8d3
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the vlc-commits
mailing list