[vlc-commits] [Git][videolan/vlc][3.0.x] 29 commits: win32: package: fix missing files depending on the build configuration
Steve Lhomme (@robUx4)
gitlab at videolan.org
Sun Nov 24 11:16:22 UTC 2024
Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC
Commits:
8fb1e341 by Steve Lhomme at 2024-11-24T10:31:37+00:00
win32: package: fix missing files depending on the build configuration
(cherry picked from commit 4103ffe169e3747f797776b6e994af7d868af503)
- - - - -
ffbd3bb8 by Steve Lhomme at 2024-11-24T10:31:37+00:00
package/win32: build.sh: don't require a wine installation on WSL
No need to add a lot of packages just to run one program.
(cherry picked from commit 803f18544377610101472a143af6a98c0f59cbee) (rebased)
rebased:
- the code around is slightly different
- - - - -
c3f04a62 by Steve Lhomme at 2024-11-24T10:31:37+00:00
package/win32: build.sh: fix fake wine call in WSL
(cherry picked from commit e560d83b9d9067ad67d06cb12b6e9768cb909283)
- - - - -
c813d72a by Steve Lhomme at 2024-11-24T10:31:37+00:00
configure: detect how to transform windows pathes
winepath, wslpath and cygpath have a compatible syntax (at least -w and -u).
They should be used depending on what is available in the build environment
rather than hardcoding "wine winepath".
(cherry picked from commit 6151644c327403534551abcd6ee60a9717ae434f)
- - - - -
bb0f4f96 by Steve Lhomme at 2024-11-24T10:31:37+00:00
package/win32: build.sh: don't generate -debug.zip package
We don't need 2 variants of the same thing. The zip version is twice bigger
than the 7z. This is a developer package, they can deal with 7z files.
(cherry picked from commit 04d7d5c32f16fd1fa4e8535ac02b79149f28a527)
- - - - -
24846a9c by Steve Lhomme at 2024-11-24T10:31:37+00:00
msi: use a UNIX path for the config.wxi
Wix is OK with it and UNIX MSI tools will not handle the Windows path.
(cherry picked from commit 672c356c1350cbbb32efb019d55a65f1d67e4c56)
- - - - -
4ff2699f by Steve Lhomme at 2024-11-24T10:31:37+00:00
win32: package: use forward slash for Windows pathes
wix has no problem with that
(cherry picked from commit 4f82ee8a386ba8ec2ce238cf76003919918a6833)
- - - - -
0343e5f6 by Steve Lhomme at 2024-11-24T10:31:37+00:00
win32: package: group the wine path for the virtual build drive
(cherry picked from commit 4649dc4fd6430c25acae8f44df0631f26e074f0f)
- - - - -
0a1c6f9b by Steve Lhomme at 2024-11-24T10:31:37+00:00
win32: package: use the output .msi file as a target
So we can show when we generate it.
(cherry picked from commit 59d7186b9202a3f63f020d57607f239d2d791ce4)
- - - - -
7d369e17 by Steve Lhomme at 2024-11-24T10:31:37+00:00
contrib: allow passing parameters to the unzip call
.zip files usually don't have a top directory with a version number.
(cherry picked from commit c93ee73db16c22dd8e1d4be3b01dfeba535660e5)
- - - - -
f5fe404b by Steve Lhomme at 2024-11-24T10:31:37+00:00
contrib: wix: add the Wix tool as a windows prebuilt bin package
Rather than relying on it being installed somewhere on wine we can use our own
and control which version is used.
It's always added to the windows builds even though it may not be used in the
end. But the package is not big and doesn't require any building.
It requires dotnet 4.0 being installed in Wine.
While WIX is open source, the wix 3.5 we are using cannot realistically be
built in our contribs as it's hardcoded to build with VS 2008. Even the most
recent builds of WIX still don't build in Linux. We already use a prebuilt
version in Docker images, except it's a .msi file that is installed via wine.
(cherry picked from commit 777b11043897c70dca4932019b2a61d62a66840e)
- - - - -
25197927 by Steve Lhomme at 2024-11-24T10:31:37+00:00
configure: allow setting the directory where packaged files are put
By default packaged files (Windows, Mac) are build in <top_build>/vlc-4.0.0-dev.
This allows setting a different directory which might avoid some copies when
building into a third party project.
(cherry picked from commit 56faa4e12abca0e62697f139aeac60a0eba1e3bb)
- - - - -
1b2d086e by Steve Lhomme at 2024-11-24T10:31:37+00:00
contrib: update wix to a more recent version
Use winterop.dll from the 3.5 package as that's the only one that can use LZX
compression with Wine.
(cherry picked from commit a8eeadb109922af38d5edba3fc1049a79709be77)
- - - - -
ae18a517 by Steve Lhomme at 2024-11-24T10:31:37+00:00
contrib: wix: use Github to get 3.14.0.6526
The hash matches the version we used.
They keep removing their old downloads from their website...
(cherry picked from commit efb169a38668ecb58979abb64a9f20b988932766)
- - - - -
9b6eaf30 by Steve Lhomme at 2024-11-24T10:31:37+00:00
contrib: wix: update to 3.14.1.8722
The previous URL is still valid but the tarball silently changed from 3.14.0.6526 to 3.14.0.8606.
Skip to the latest 3.14 release. Until they silently change the tarball using the same URL.
(cherry picked from commit 9b3edfbbac0e02da263e5c736454d9ffaeac036d)
- - - - -
1c0ecc9d by Steve Lhomme at 2024-11-24T10:31:37+00:00
contrib: wix: don't pretend they are native tools
prebuilt contains the cross-compiled tools.
(cherry picked from commit 1bab36476f3f549111381f6de2214fb5b51c443b) (rebased)
rebased:
- the code around is slightly different
- - - - -
650413d5 by Steve Lhomme at 2024-11-24T10:31:37+00:00
configure: add an option to set the PATH to WIX
In the CI the path is in a wine location. If we build WIX in contribs, we can
use that path instead.
We default to the contrib path unless set by the user.
(cherry picked from commit a9f4e219648104daa4b9b66b06c1f80bd735998d)
- - - - -
3304cfcf by Steve Lhomme at 2024-11-24T10:31:37+00:00
win32: replace Wix heat with a python script
It allows showing friendly names in the .msi for each file rather than some hash.
For now we never keep the .pdb files.
(cherry picked from commit 6f996ffa27a620e1a25cffc2039a322eb4fdabc2)
- - - - -
f6bacb5d by Steve Lhomme at 2024-11-24T10:31:37+00:00
win32: package: use the package dir instead of vlc-4.0.0-dev
(cherry picked from commit 939e574ef27665a2a62fa90c82582f2a5963beaf) (rebased)
rebased:
- the code around is slightly different
- - - - -
fa2084f0 by Steve Lhomme at 2024-11-24T10:31:37+00:00
win32: package: build inside the output directory
So we don't need to include windows style path. By default light.exe looks for
files in the current directory.
(cherry picked from commit 385db2b181df63ea28dfe92259418f1be537a9b9)
- - - - -
d95ada17 by Steve Lhomme at 2024-11-24T10:31:37+00:00
win32: msi: use the detected way to handle windows pathes
Rather than hardcoding "wine winepath".
(cherry picked from commit 268d209e207ea40410dbfc37bc9e55636a0f7b66)
- - - - -
6ad8308e by Steve Lhomme at 2024-11-24T10:31:37+00:00
win32: package: use the configured path to the WIX binaries
(cherry picked from commit a5ea1181bc66e2f7aed3100ee94daa9ba5bff6cb)
- - - - -
560c6d24 by Steve Lhomme at 2024-11-24T10:31:37+00:00
package/win32: build.sh: generate the built 7z+zip+msi in parallel
But we need to do the debug package first as the other will strip debug
information that is needed in the debug packages.
(cherry picked from commit 93895d57d08656a5f64970c89d8f61b290cbf38f)
- - - - -
36e1a8b2 by Steve Lhomme at 2024-11-24T10:31:37+00:00
package/win32: show the usage when a bogus option is passed
(cherry picked from commit 756bd8f250dd03c4165a8d4119cd3491861b3f1c) (rebased)
rebased:
- 3.0 doesn't have the meson option
- - - - -
297ed29d by Alexandre Janniaux at 2024-11-24T10:31:37+00:00
configure.ac: remove x-test checks
The variable is already quoted so there's no need to x-test them.
(cherry picked from commit 5e2724f55ca7684b5c60020f94978968792db430)
- - - - -
038e789b by Steve Lhomme at 2024-11-24T10:31:37+00:00
package/win32: use $()" rather than "``" for commands
(cherry picked from commit 5080e48b32cc70fbe72f8023c2da5d9003209002) (rebased)
rebased:
- the code around used VLC_LDFLAGS/VLC_CPPFLAGS
- - - - -
c10746f2 by Steve Lhomme at 2024-11-24T10:31:37+00:00
npapi: don't use broken --enable-pdb option
It's not used in VLC 4 either.
- - - - -
559a171b by Steve Lhomme at 2024-11-24T10:31:37+00:00
package/win32: remove -pdb option from heat Python script
It's not used. And BooleanOptionalAction only available since Python 3.9.
- - - - -
f2a4147e by Steve Lhomme at 2024-11-24T10:31:37+00:00
package/win32: fix relative path joining with older Python
It's not supported with a Path before 3.6 [1].
[1] https://docs.python.org/3/library/os.path.html#os.path.join
- - - - -
13 changed files:
- configure.ac
- contrib/src/main.mak
- + contrib/src/wix/SHA512SUMS
- + contrib/src/wix/rules.mak
- + contrib/src/wixlzx/SHA512SUMS
- + contrib/src/wixlzx/rules.mak
- extras/package/npapi.am
- extras/package/win32/build.sh
- extras/package/win32/msi.mak
- extras/package/win32/msi/config.wxi.in
- + extras/package/win32/msi/msi-heat.py
- extras/package/win32/msi/product.wxs
- extras/package/win32/package.mak
Changes:
=====================================
configure.ac
=====================================
@@ -261,6 +261,21 @@ case "${host_os}" in
AC_DEFINE([_BSD_SOURCE], [1], [ISO C, POSIX, and 4.3BSD things.])
AC_DEFINE([_SVID_SOURCE], [1], [ISO C, POSIX, and SVID things.])
+ AC_ARG_WITH(packagedir,
+ AS_HELP_STRING([--with-packagedir=DIR],
+ [output the packaged VLC files in DIR (default vlc-$PACKAGE_VERSION)]))
+ AS_IF([test "${with_packagedir}" != ""], [
+ AS_IF([test -d "${with_packagedir}"], [
+ PACKAGE_DIR=`cd "${with_packagedir}" && pwd -P`
+ ],[
+ dnl this should be an absolute path
+ PACKAGE_DIR="${with_packagedir}"
+ ])
+ ], [
+ PACKAGE_DIR=`pwd -P`"/vlc-${PACKAGE_VERSION}"
+ ])
+ AC_SUBST([PACKAGE_DIR])
+
case "${host_os}" in
*mingw32*)
SYS=mingw32
@@ -1248,6 +1263,43 @@ if test "${ac_cv_c_attribute_packed}" != "no"; then
AC_DEFINE(HAVE_ATTRIBUTE_PACKED, 1, Support for __attribute__((packed)) for structs)
fi
+WIN32_PATH_CMD=
+AS_IF([test "${SYS}" = "mingw32"], [
+ AC_MSG_CHECKING([how to transform windows pathes])
+ win32_path_cmd=no
+ for win_path in "cygpath" "wslpath" "wine winepath"
+ do
+ ac_try="$win_path -u c: >/dev/null"
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ if test $ac_status = 0; then
+ win32_path_cmd=$win_path
+ break
+ fi
+ done
+ AS_IF([test "${win32_path_cmd}" != "no"],[
+ WIN32_PATH_CMD=${win32_path_cmd}
+ AC_MSG_RESULT([using '${win32_path_cmd}'])
+ ],[
+ AC_MSG_RESULT([not possible])
+ ])
+])
+
+AC_SUBST([WIN32_PATH_CMD])
+
+AC_ARG_WITH([wix],
+ AS_HELP_STRING([--with-wix=DIR], [location of WIX binary (default: contribs)])
+)
+AS_IF([test -z "${with_wix}"], [
+ AS_IF([test -n "${CONTRIB_DIR}"], [
+ with_wix="${CONTRIB_DIR}/bin"
+ ])
+])
+AS_IF([test "${with_wix}" != "no"], [
+ WIXPATH="${with_wix}"
+])
+AC_SUBST([WIXPATH])
+
dnl
dnl Check the CPU
dnl
=====================================
contrib/src/main.mak
=====================================
@@ -368,7 +368,7 @@ UNPACK = $(RM) -R $@ \
$(foreach f,$(filter %.tar.gz %.tgz,$^), && tar $(TAR_VERBOSE)xzfo $(f)) \
$(foreach f,$(filter %.tar.bz2,$^), && tar $(TAR_VERBOSE)xjfo $(f)) \
$(foreach f,$(filter %.tar.xz,$^), && tar $(TAR_VERBOSE)xJfo $(f)) \
- $(foreach f,$(filter %.zip,$^), && unzip $(f))
+ $(foreach f,$(filter %.zip,$^), && unzip $(f) $(UNZIP_PARAMS))
UNPACK_DIR = $(patsubst %.tar,%,$(basename $(notdir $<)))
APPLY = (cd $(UNPACK_DIR) && patch -fp1) <
pkg_static = (cd $(UNPACK_DIR) && $(SRC_BUILT)/pkg-static.sh $(1))
=====================================
contrib/src/wix/SHA512SUMS
=====================================
@@ -0,0 +1 @@
+ff58d224e545722eb794d413c541ad483ab834f9ce92e2528fe8aeb645717ab077db833ae783e1a31ad9e50803eb80fdc9efcda72535493a3f0faea4aa3ba36d wix3.14.1.8722.zip
=====================================
contrib/src/wix/rules.mak
=====================================
@@ -0,0 +1,26 @@
+WIX_VERSION=314
+WIX_SUB_VERSION=1
+WIX_FULL_VERSION=3.14.1.8722
+WIX_URL := $(GITHUB)/wixtoolset/wix3/releases/download/wix$(WIX_VERSION)$(WIX_SUB_VERSION)rtm/wix$(WIX_VERSION)-binaries.zip
+
+ifdef HAVE_WIN32
+# this requires dotnet 4.0 to be installed when running wix
+PKGS += wix
+endif
+
+.sum-wix: wix$(WIX_FULL_VERSION).zip
+
+$(TARBALLS)/wix$(WIX_FULL_VERSION).zip:
+ $(call download_pkg,$(WIX_URL),wix)
+
+wix: UNZIP_PARAMS=-d wix$(WIX_FULL_VERSION)
+wix: wix$(WIX_FULL_VERSION).zip .sum-wix
+ $(UNPACK)
+ $(MOVE)
+
+.wix: wix
+ install -d "$(PREFIX)/bin"
+ for f in $</*.exe $</*.dll ; do \
+ install $$f "$(PREFIX)/bin" ; \
+ done
+ touch $@
=====================================
contrib/src/wixlzx/SHA512SUMS
=====================================
@@ -0,0 +1 @@
+26b1d2a5b582fcaa31ffaaf289711854897f91e8e5002bd8ddee2e69c95a60f53c6e3375d38fba4519ddd4a68bcf402c36eaef5a8faa6f3a4b8b2bc011e8f05a wix3.5.2519.0.zip
=====================================
contrib/src/wixlzx/rules.mak
=====================================
@@ -0,0 +1,49 @@
+WIX_LZX_VERSION=35
+WIX_LZX_FULL_VERSION=3.5.2519.0
+# 26b1d2a5b582fcaa31ffaaf289711854897f91e8e5002bd8ddee2e69c95a60f53c6e3375d38fba4519ddd4a68bcf402c36eaef5a8faa6f3a4b8b2bc011e8f05a wix3.5.2519.0.zip
+# WIX_LZX_VERSION=36
+# WIX_LZX_FULL_VERSION=3.6.3303.1
+# WIX_LZX_FULL_VERSION=3.6.2221.0
+# 0d5e44061d7d8f92dabf806893736f2c9a68db13e5b6540914f0f0a5299ae5a85abbd721d808c04052e27e82a126773b5bfcb6b929183180968a84985516ff98 wix3.6.3303.1.zip
+# WIX_LZX_VERSION=37
+# WIX_LZX_FULL_VERSION=3.7.1224.0
+# d93a01321e04e923994c57576bfb8d7fb65e3024c03a2b1062a4a03fda7a4ce9ec7baab95f802a49e934672726f6b836f6cf8ea31077178319f5e147bbd59db1 wix3.7.1224.0.zip
+# WIX_LZX_VERSION=38
+# WIX_LZX_FULL_VERSION=3.8.1128.0
+# b4170451b94fcc10486a8140d460092fddaab9b315043759b980e1ca67a84559ecb92706a552c05ee8de90711f5513926f393220a94155a70221547d72d9b72a wix3.8.1128.0.zip
+# WIX_LZX_VERSION=39
+# WIX_LZX_FULL_VERSION=3.9.1208.0
+# 057ebcf2d9310584b075951f224ca55aae9e83714f59f1aeb9abb78ac5c5db8e230d0d57e9c7170e942e3317c0bfdf5a57b0fc3d0cdde3a85fab3648f4a688d3 wix3.9.1208.0.zip
+# WIX_LZX_VERSION=310
+# WIX_LZX_FULL_VERSION=3.10.4.4718
+# fab360f98fe1a1d1a25433e90b7fa11478835ef41356647cbd6b9ef9fc1bfc3d7323b40784b9d07fa5d18566462a399753ab0939353a58fa06b6f80788413007 wix3.10.4.4718.zip
+# WIX_LZX_VERSION=311
+# WIX_LZX_FULL_VERSION=3.11.2.4516
+# 6fd961c85e1e6adafb99ef50c9659e3eb83c84ecaf49f523e556788845b206e1857aba2c39409405d4cda1df9b30a552ce5aab808be5f8368a37a447d78d1a05 wix3.11.2.4516.zip
+# WIX_LZX_VERSION=314
+# WIX_LZX_FULL_VERSION=3.14.0.6526
+# 9ff09b4e6c612ca742c763740fb89d99211bf1d0eace84e3693cb503deb6a85bd28c3754c34772a3220bb0c1e92a3013e7d99bcf106ff1b835c0fdc6aba8bbc6 wix3.14.0.6526.zip
+WIX_LZX_URL := https://wixtoolset.org/downloads/v$(WIX_LZX_FULL_VERSION)/wix$(WIX_LZX_VERSION)-binaries.zip
+
+ifdef HAVE_WIN32
+# this requires dotnet 4.0 to be installed when running wix
+PKGS += wixlzx
+endif
+
+DEPS_wixlzx := wix $(DEPS_wix)
+
+.sum-wixlzx: wix$(WIX_LZX_FULL_VERSION).zip
+
+$(TARBALLS)/wix$(WIX_LZX_FULL_VERSION).zip:
+ $(call download_pkg,$(WIX_LZX_URL),wixlzx)
+
+wixlzx: UNZIP_PARAMS=-d wix$(WIX_LZX_FULL_VERSION)
+wixlzx: wix$(WIX_LZX_FULL_VERSION).zip .sum-wixlzx
+ $(UNPACK)
+ $(MOVE)
+
+.wixlzx: wixlzx
+ install -d "$(PREFIX)/bin"
+ # Overwrite newer DLLs with the ones that supports LZX compression in Wine
+ install $</winterop.dll "$(PREFIX)/bin"
+ touch $@
=====================================
extras/package/npapi.am
=====================================
@@ -30,9 +30,9 @@ npapi-vlc/configure: stamp-npapi
$(SHELL) ./autogen.sh
touch $@
-if ENABLE_PDB
-ENABLE_PDB_OPTION = --enable-pdb
-endif
+# if ENABLE_PDB
+# ENABLE_PDB_OPTION = --enable-pdb
+# endif
npapi-vlc/Makefile: npapi-vlc/configure
cd npapi-vlc && \
=====================================
extras/package/win32/build.sh
=====================================
@@ -43,10 +43,6 @@ ARCH="x86_64"
while getopts "hra:pcli:sb:dD:xS:uwzo:" OPTION
do
case $OPTION in
- h)
- usage
- exit 1
- ;;
r)
RELEASE="yes"
INSTALLER="r"
@@ -97,6 +93,10 @@ do
o)
INSTALL_PATH=$OPTARG
;;
+ h|*)
+ usage
+ exit 1
+ ;;
esac
done
shift $(($OPTIND - 1))
@@ -164,6 +164,20 @@ if [ "$INTERACTIVE" != "yes" ] || [ ! -f ./Makefile ]; then
NEEDED="$FORCED_TOOLS" ${VLC_ROOT_PATH}/extras/tools/bootstrap
fi
make -j$JOBS
+
+# avoid installing wine on WSL
+# wine is needed to build Qt with shaders
+if test -z "$(command -v wine)"
+then
+ if test -n "$(command -v wsl.exe)"
+ then
+ echo "Using wsl.exe to replace wine"
+ echo "#!/bin/sh" > build/bin/wine
+ echo "\"\$@\"" >> build/bin/wine
+ chmod +x build/bin/wine
+ fi
+fi
+
cd ../../
CONTRIB_PREFIX=$TRIPLET
@@ -226,7 +240,7 @@ if [ ! -z "$BUILD_UCRT" ]; then
if [ -z "$NTDDI" ]; then
WINVER=0x0A00
else
- WINVER=`echo ${NTDDI} |cut -c 1-6`
+ WINVER=$(echo ${NTDDI} |cut -c 1-6)
if [ "$WINVER" != "0x0A00" ]; then
echo "Unsupported SDK/NTDDI version ${NTDDI} for Winstore"
fi
@@ -247,7 +261,7 @@ if [ ! -z "$BUILD_UCRT" ]; then
LDFLAGS="$LDFLAGS -lucrt"
if [ ! "$COMPILING_WITH_CLANG" -gt 0 ]; then
# assume gcc
- NEWSPECFILE="`pwd`/specfile-$SHORTARCH"
+ NEWSPECFILE="$(pwd)/specfile-$SHORTARCH"
# tell gcc to replace msvcrt with ucrtbase+ucrt
$CC -dumpspecs | sed -e "s/-lmsvcrt/-lucrt/" > $NEWSPECFILE
CFLAGS="$CFLAGS -specs=$NEWSPECFILE"
@@ -270,7 +284,7 @@ else
fi
if [ -n "$NTDDI" ]; then
- WINVER=`echo ${NTDDI} |cut -c 1-6`
+ WINVER=$(echo ${NTDDI} |cut -c 1-6)
CPPFLAGS="$CPPFLAGS -DNTDDI_VERSION=$NTDDI"
fi
if [ -z "$WINVER" ]; then
@@ -408,7 +422,8 @@ info "Compiling"
make -j$JOBS
if [ "$INSTALLER" = "n" ]; then
-make package-win32-debug package-win32 package-msi
+make package-win32-debug-7zip
+make -j$JOBS package-win32 package-msi
elif [ "$INSTALLER" = "r" ]; then
make package-win32
elif [ "$INSTALLER" = "u" ]; then
=====================================
extras/package/win32/msi.mak
=====================================
@@ -3,38 +3,38 @@ BUILT_SOURCES_distclean += \
extras/package/win32/msi/config.wxi
endif
-WIXPATH=`wine winepath -u 'C:\\Program Files (x86)\\Windows Installer XML v3.5\\bin'`
-HEAT=wine "$(WIXPATH)/heat.exe"
-CANDLE=wine "$(WIXPATH)/candle.exe"
-LIGHT=wine "$(WIXPATH)/light.exe"
-VLCDIR=`wine winepath -s \`wine winepath -w '$(abs_top_builddir)/vlc-$(VERSION)'\``
+HEAT=$(MSIDIR)/msi-heat.py
+CANDLE=wine "@WIXPATH@/candle.exe"
+LIGHT=wine "@WIXPATH@/light.exe"
+VLCDIR=@PACKAGE_DIR@
MSIDIR=$(abs_srcdir)/extras/package/win32/msi
-W_MSIDIR=`wine winepath -w '$(MSIDIR)'`
+W_MSIDIR=`$(WIN32_PATH_CMD) -w '$(MSIDIR)'`
MSIBUILDDIR=$(abs_top_builddir)/extras/package/win32/msi
-W_MSIBUILDDIR=`wine winepath -w '$(MSIBUILDDIR)'`
+W_MSIBUILDDIR=`$(WIN32_PATH_CMD) -w '$(MSIBUILDDIR)'`
if HAVE_WIN64
MSIOUTFILE=vlc-$(VERSION)-win64.msi
else
MSIOUTFILE=vlc-$(VERSION)-win32.msi
endif
-WINE_C=`wine winepath c:`
heat: package-win-strip
- $(HEAT) dir $(VLCDIR)/plugins -cg CompPluginsGroup -gg -scom -sreg -sfrag -dr APPLICATIONFOLDER -out $(W_MSIBUILDDIR)/Plugins.fragment.wxs
- $(HEAT) dir $(VLCDIR)/locale -cg CompLocaleGroup -gg -scom -sreg -sfrag -dr APPLICATIONFOLDER -out $(W_MSIBUILDDIR)/Locale.fragment.wxs
- $(HEAT) dir $(VLCDIR)/lua -cg CompLuaGroup -gg -scom -sreg -sfrag -dr APPLICATIONFOLDER -out $(W_MSIBUILDDIR)/Lua.fragment.wxs
- $(HEAT) dir $(VLCDIR)/skins -cg CompSkinsGroup -gg -scom -sreg -sfrag -dr APPLICATIONFOLDER -out $(W_MSIBUILDDIR)/Skins.fragment.wxs
+ $(HEAT) --dir $(VLCDIR)/plugins -cg CompPluginsGroup -gg -scom -sreg -sfrag -dr APPLICATIONFOLDER -out $(MSIBUILDDIR)/Plugins.fragment.wxs
+ $(HEAT) --dir $(VLCDIR)/locale -cg CompLocaleGroup -gg -scom -sreg -sfrag -dr APPLICATIONFOLDER -out $(MSIBUILDDIR)/Locale.fragment.wxs
+if BUILD_LUA
+ $(HEAT) --dir $(VLCDIR)/lua -cg CompLuaGroup -gg -scom -sreg -sfrag -dr APPLICATIONFOLDER -out $(MSIBUILDDIR)/Lua.fragment.wxs
+endif
+if BUILD_SKINS
+ $(HEAT) --dir $(VLCDIR)/skins -cg CompSkinsGroup -gg -scom -sreg -sfrag -dr APPLICATIONFOLDER -out $(MSIBUILDDIR)/Skins.fragment.wxs
+endif
candle: heat
- $(am__cd) $(MSIBUILDDIR) && $(CANDLE) -arch $(WINDOWS_ARCH) -ext WiXUtilExtension $(W_MSIDIR)\\product.wxs $(W_MSIDIR)\\axvlc.wxs $(W_MSIDIR)\\extensions.wxs $(W_MSIBUILDDIR)\\*.fragment.wxs
+ $(am__cd) $(MSIBUILDDIR) && $(CANDLE) -arch $(WINDOWS_ARCH) -ext WiXUtilExtension $(W_MSIDIR)/product.wxs $(W_MSIDIR)/axvlc.wxs $(W_MSIDIR)/extensions.wxs $(W_MSIBUILDDIR)/*.fragment.wxs
-light: candle
- test ! -d "$(WINE_C)/v" -o ! -f "$(WINE_C)/v"
- ln -Tsf "$(abs_top_builddir)/vlc-$(VERSION)" "$(WINE_C)"/v
- $(LIGHT) -sval -spdb -ext WixUIExtension -ext WixUtilExtension -cultures:en-us -b $(W_MSIDIR) -b C:/v/plugins -b C:/v/locale -b C:/v/lua -b C:/v/skins $(W_MSIBUILDDIR)\\product.wixobj $(W_MSIBUILDDIR)\\axvlc.wixobj $(W_MSIBUILDDIR)\\extensions.wixobj $(W_MSIBUILDDIR)\\*.fragment.wixobj -o $(MSIOUTFILE)
- chmod 644 $(MSIOUTFILE)
+$(MSIOUTFILE): candle
+ $(AM_V_GEN)cd vlc- at VERSION@ && $(LIGHT) -sval -spdb -ext WixUIExtension -ext WixUtilExtension -cultures:en-us -b $(W_MSIDIR) $(W_MSIBUILDDIR)/product.wixobj $(W_MSIBUILDDIR)/axvlc.wixobj $(W_MSIBUILDDIR)/extensions.wixobj $(W_MSIBUILDDIR)/*.fragment.wixobj -o ../$@
+ chmod 644 $@
-package-msi: light
+package-msi: $(MSIOUTFILE)
cleanmsi:
-rm -f $(MSIBUILDDIR)/*.wixobj
@@ -44,4 +44,4 @@ cleanmsi:
distcleanmsi: cleanmsi
-rm -f $(MSIOUTFILE)
-.PHONY: heat candle light cleanmsi distcleanmsi package-msi
+.PHONY: heat candle cleanmsi distcleanmsi package-msi
=====================================
extras/package/win32/msi/config.wxi.in
=====================================
@@ -14,10 +14,7 @@
<?define Version = "$(var.VerMajor).$(var.VerMinor).$(var.VerPatch)" ?>
<?define VersionLong = "$(var.Version).$(var.VerExtra)" ?>
- <?define SourceDir = "vlc- at VERSION@" ?>
- <!--<?define PluginsPath = "$(var.BinPath)\plugins" ?>
- <?define LocalePath = "$(var.BinPath)\locale" ?>
- <?define SdkPath = "$(var.BinPath)\sdk" ?>-->
+ <?define SourceDir = "." ?>
<?define Platform= "@WINDOWS_ARCH@" ?>
=====================================
extras/package/win32/msi/msi-heat.py
=====================================
@@ -0,0 +1,96 @@
+#!/usr/bin/env python3
+
+# Copyright © 2022 VideoLabs, VLC authors and VideoLAN
+#
+# Authors: Steve Lhomme <robux4 at videolabs.io>
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+
+import argparse
+import os
+import pathlib
+import hashlib
+
+# Argument parsing
+parser = argparse.ArgumentParser(description="Generate WIX compatible wxs listing")
+parser.add_argument('-d', "--dir", type=pathlib.Path, help='directory with files to list')
+parser.add_argument('-out', type=argparse.FileType('w', encoding='UTF-8'), help="output file")
+parser.add_argument('-dr', "--directory-reference", help='directory reference')
+parser.add_argument('-cg', "--component-group", help='component group')
+args, remaining = parser.parse_known_args()
+
+# print(args.out)
+# print(args.dir)
+
+def generate_id(prefix='', file=''):
+ joined = prefix + file
+ hash_object = hashlib.sha1(joined.encode('ascii'))
+ pbHash = hash_object.hexdigest()
+ return prefix + pbHash.upper()
+
+args.out.write('<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n')
+args.out.write('<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">\r\n')
+args.out.write(' <Fragment>\r\n')
+args.out.write(' <DirectoryRef Id="{}">\r\n'.format(args.directory_reference))
+
+# args.out.write(' <Directory Id="{}" Name="{}">\r\n'.format(generate_id('dir', args.dir.name), args.dir.name))
+
+fileIdList =[]
+
+def outputDir(top, parent: str, dir: str):
+ cwd = top.joinpath(parent).joinpath(dir)
+ dirName = os.path.join(parent, dir)
+ if dir=='':
+ dir = top.name
+ dirId = generate_id('dir', os.path.join(top.name, dir))
+ else:
+ dirId = generate_id('dir', os.path.join(parent, dir))
+ args.out.write(' <Directory Id="{}" Name="{}">\r\n'.format(dirId, dir))
+ if cwd.is_dir():
+ # first list files
+ for file in cwd.iterdir():
+ if not file.is_dir():
+ # args.out.write(' file <{}>\r\n'.format(file))
+ if not file.name.endswith('.pdb'):
+ outname = os.path.join(top.name, str(file.relative_to(top)))
+ fileId = generate_id('cmp', outname)
+ args.out.write(' <Component Id="{}" Guid="*">\r\n'.format(fileId))
+ fileIdList.append(fileId)
+ args.out.write(' <File Id="{}" Name="{}" KeyPath="yes" Source="{}"/>\r\n'.format(generate_id('fil', outname), file.name, outname))
+ args.out.write(' </Component>\r\n')
+ # then sub directories
+ for file in cwd.iterdir():
+ if file.is_dir():
+ # args.out.write(' dir <{}>\r\n'.format(file))
+ outputDir(top, dirName, file.name)
+
+ args.out.write(' </Directory>\r\n')
+
+print(args.dir.parent)
+print(args.dir.name)
+outputDir(args.dir, '', '')
+
+# args.out.write(' </Directory>\r\n')
+args.out.write(' </DirectoryRef>\r\n')
+args.out.write(' </Fragment>\r\n')
+
+args.out.write(' <Fragment>\r\n')
+args.out.write(' <ComponentGroup Id="{}">\r\n'.format(args.component_group))
+for name in fileIdList:
+ args.out.write(' <ComponentRef Id="{}"/>\r\n'.format(name))
+args.out.write(' </ComponentGroup>\r\n')
+args.out.write(' </Fragment>\r\n')
+
+args.out.write('</Wix>\r\n')
=====================================
extras/package/win32/msi/product.wxs
=====================================
@@ -20,7 +20,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
-->
-<?include $(sys.CURRENTDIR)\config.wxi?>
+<?include $(sys.CURRENTDIR)/config.wxi?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Product
=====================================
extras/package/win32/package.mak
=====================================
@@ -3,7 +3,7 @@ BUILT_SOURCES_distclean += \
extras/package/win32/NSIS/vlc.win32.nsi extras/package/win32/NSIS/spad.nsi
endif
-win32_destdir=$(top_builddir)/vlc-$(VERSION)
+win32_destdir=@PACKAGE_DIR@
win32_debugdir=$(abs_top_builddir)/symbols-$(VERSION)
win32_xpi_destdir=$(abs_top_builddir)/vlc-plugin-$(VERSION)
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/6dc4d484c6c4e9b29c94410cc8723fc7fbc5f4dc...f2a4147eb89e8d7f36585e4840851a81a9a7abc8
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/6dc4d484c6c4e9b29c94410cc8723fc7fbc5f4dc...f2a4147eb89e8d7f36585e4840851a81a9a7abc8
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list