[vlc-commits] [Git][videolan/vlc][master] 7 commits: package/win32: strip the installed package with meson
Steve Lhomme (@robUx4)
gitlab at videolan.org
Tue Sep 29 11:48:03 UTC 2026
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
e775d4c3 by Steve Lhomme at 2026-09-29T12:46:37+02:00
package/win32: strip the installed package with meson
Otherwise the installer contains the unstripped binaries.
Even with PDB files the unstripped binaries are significantly bigger.
- - - - -
8b6c543e by Steve Lhomme at 2026-09-29T12:46:37+02:00
package/win32 : determine the git tag early
- - - - -
13468581 by Steve Lhomme at 2026-09-29T12:46:37+02:00
meson: share the Windows installer suffix
- - - - -
7188b588 by Steve Lhomme at 2026-09-29T12:46:37+02:00
package/win32 : add the NSIS builder as custom meson/ninja targets
So we can easily can it via meson/ninja once it's installed.
This needs to be executed after "meson install".
- - - - -
db5ef4f2 by Steve Lhomme at 2026-09-29T12:46:37+02:00
package/win32 : generate the NSIS installer in one ninja call
So we don't rely on make with meson.
- - - - -
7cdd933c by Steve Lhomme at 2026-09-29T12:46:37+02:00
package/win32 : allow using wine to run i686 binaries in 64-bit host
- - - - -
15b71e3f by Steve Lhomme at 2026-09-29T12:46:37+02:00
CI: build win32-llvm with meson
So we have one target that tests the installer(s) via meson.
- - - - -
5 changed files:
- extras/ci/gitlab-ci.yml
- extras/package/win32/NSIS/meson.build
- extras/package/win32/build.sh
- extras/package/win32/meson.build
- meson_options.txt
Changes:
=====================================
extras/ci/gitlab-ci.yml
=====================================
@@ -174,6 +174,7 @@ win32-llvm:
variables:
<<: *variables-win32
LIBVLC_EXTRA_BUILD_FLAGS: -x
+ UWP_EXTRA_BUILD_FLAGS: -m
win64:
extends: .win-common
=====================================
extras/package/win32/NSIS/meson.build
=====================================
@@ -1,6 +1,7 @@
# nsis packaging
-have_win64 = host_machine.cpu_family() == 'x86_64' or host_machine.cpu_family() == 'aarch64' or host_machine.cpu() == 'arm64'
+nsis_required = get_option('nsis').allowed() and not get_option('nsis').auto()
+makensis = find_program('makensis', required: nsis_required)
nsi_conf = cdata
nsi_conf.set('BUILD_LUA_TRUE', lua_dep.found() and get_option('lua').allowed() ? '' : '#')
@@ -26,6 +27,8 @@ if have_win64
endif
endif
+# TODO use nsis-pluginapi if possible to be compatible with the system makensis
+
nsProcess = shared_library('nsProcess',
'nsProcess/nsProcess.c', 'nsProcess/pluginapi.c',
c_args: nsProcess_cargs,
@@ -55,3 +58,30 @@ install_data('nsProcess.nsh', install_dir : 'NSIS')
install_data('vlc_branding.bmp', install_dir : 'NSIS')
install_subdir('languages', install_dir : '.')
install_subdir('helpers', install_dir : '.')
+
+if have_win_store
+ nsi_script_dir = 'vlc-' + winstaller_suffix + '-uwp'
+elif cc.compiles(ucrt_version_test, name: 'compiles with Universal C Runtime')
+ nsi_script_dir = 'vlc-' + winstaller_suffix + '-ucrt'
+else
+ nsi_script_dir = 'vlc-' + winstaller_suffix
+endif
+
+if makensis.found()
+ spad_nsis = custom_target('spad-nsis',
+ command: [makensis, nsi_script_dir / 'spad.nsi'],
+ input: spad_nsi,
+ output: 'spad-setup.exe', # real name but located in installed folder
+ build_by_default: false,
+ console: true)
+
+ vlc_nsis = custom_target('vlc-nsis',
+ command: [makensis, nsi_script_dir / 'vlc.win32.nsi'],
+ input: vlc_nsi,
+ output: 'vlc-' + vlc_version + '-' + winstaller_suffix + '.exe', # real name but root build folder
+ build_by_default: false,
+ console: true,
+ depends: nsProcess)
+
+ alias_target('package-win32-exe', spad_nsis, vlc_nsis)
+endif
=====================================
extras/package/win32/build.sh
=====================================
@@ -202,7 +202,7 @@ fi
make -j$JOBS
# avoid installing wine on WSL
-# wine is needed to build Qt with shaders
+# wine is needed to build Qt with shaders or running vlc-cache-gen
if test -z "$(command -v wine)"
then
if test -n "$(command -v wsl.exe)"
@@ -217,6 +217,8 @@ HOST="$(cc -dumpmachine)"
HOST_ARCH="${HOST%%-*}"
if [ "$HOST_ARCH" = "$ARCH" ]; then
VLC_EXE_WRAPPER="wine"
+elif [ "$HOST_ARCH" = "x86_64" ] && [ "$ARCH" = "i686" ]; then
+ VLC_EXE_WRAPPER="wine"
fi
cd ../../
@@ -579,10 +581,6 @@ if [ -n "$BUILD_MESON" ]; then
# we don't want to install in <destdir>/usr/local, just <destdir>
MCONFIGFLAGS="$MCONFIGFLAGS --prefix=/"
- if [ "$INSTALLER" = "n" ] || [ "$INSTALLER" = "r" ] || [ "$INSTALLER" = "u" ]; then
- MCONFIGFLAGS="$MCONFIGFLAGS -Dnsis=enabled"
- fi
-
# generate the crossfile.meson
test -e $SHORTARCH-meson/crossfile.meson && unlink $SHORTARCH-meson/crossfile.meson
exec 3>$SHORTARCH-meson/crossfile.meson || return $?
@@ -637,26 +635,33 @@ if [ -n "$BUILD_MESON" ]; then
else
MDESTDIR="${BUILD_PATH}/$SHORTARCH-meson/vlc-$SHORTARCH"
fi
- MINSTALLFLAGS="--destdir=$MDESTDIR $MINSTALLFLAGS"
+ MINSTALLFLAGS="--destdir=$MDESTDIR --strip $MINSTALLFLAGS"
if [ "$INSTALLER" = "n" ]; then
+ VLC_GIT_TAG="$(git describe --tags --long --match '?.*.*' --always)"
+
meson install -C ${BUILD_PATH}/$SHORTARCH-meson ${MINSTALLFLAGS}
- makensis $MDESTDIR/spad.nsi
- makensis $MDESTDIR/vlc.win32.nsi
+ if [ -z "$WINSTORE" ]; then
+ # generate .exe installer
+ ninja -C ${BUILD_PATH}/$SHORTARCH-meson package-win32-exe
+ fi
- VLC_GIT_TAG="$(git describe --tags --long --match '?.*.*' --always)"
rm -rf ${BUILD_PATH}/$SHORTARCH-meson/vlc-$SHORTARCH-$VLC_GIT_TAG-debug.7z
cd ${BUILD_PATH}/$SHORTARCH-meson && \
7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on vlc-$SHORTARCH-$VLC_GIT_TAG-debug.7z vlc-$SHORTARCH
elif [ "$INSTALLER" = "r" ]; then
meson dist -C ${BUILD_PATH}/$SHORTARCH-meson -j$JOBS --no-tests
meson install -C ${BUILD_PATH}/$SHORTARCH-meson ${MINSTALLFLAGS}
- makensis $MDESTDIR/spad.nsi
- makensis $MDESTDIR/vlc.win32.nsi
+ if [ -z "$WINSTORE" ]; then
+ # generate .exe installer
+ ninja -C ${BUILD_PATH}/$SHORTARCH-meson package-win32-exe
+ fi
elif [ "$INSTALLER" = "u" ]; then
meson install -C ${BUILD_PATH}/$SHORTARCH-meson ${MINSTALLFLAGS}
- makensis $MDESTDIR/spad.nsi
- makensis $MDESTDIR/vlc.win32.nsi
+ if [ -z "$WINSTORE" ]; then
+ # generate .exe installer
+ ninja -C ${BUILD_PATH}/$SHORTARCH-meson package-win32-exe
+ fi
fi
else
info "Bootstrapping"
=====================================
extras/package/win32/meson.build
=====================================
@@ -8,6 +8,22 @@ install_data('../../../THANKS', rename : 'THANKS.txt', install_dir : '.')
install_data('../../../share/icons/vlc.ico', install_dir : '.')
-if get_option('nsis').allowed()
+have_win64 = host_machine.cpu_family() == 'x86_64' or host_machine.cpu_family() == 'aarch64' or host_machine.cpu() == 'arm64'
+if have_win64
+ if host_machine.cpu_family() == 'aarch64'
+ winstaller_suffix = 'winarm64'
+ else
+ winstaller_suffix = 'win64'
+ endif
+else
+ if host_machine.cpu_family() == 'arm'
+ winstaller_suffix = 'winarm'
+ else
+ winstaller_suffix = 'win32'
+ endif
+endif
+
+if get_option('nsis').disable_auto_if(
+ host_system != 'windows' or have_win_store).allowed()
subdir('NSIS')
endif
=====================================
meson_options.txt
=====================================
@@ -827,7 +827,7 @@ option('v4l2',
option('nsis',
type: 'feature',
- value: 'disabled',
+ value: 'auto',
description: 'Generate NSIS files to create Windows installer')
# TODO: Missing rpi-omxil
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/005e69e67a8730f128e44bde68437fbb048cf45f...15b71e3fa6d49ed2845dfb1324760984eae6101c
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/005e69e67a8730f128e44bde68437fbb048cf45f...15b71e3fa6d49ed2845dfb1324760984eae6101c
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