[vlc-commits] [Git][videolan/vlc][master] 4 commits: contrib: allow passing parameters to the unzip call

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Sun Nov 27 11:41:48 UTC 2022



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
c93ee73d by Steve Lhomme at 2022-11-27T11:02:03+00:00
contrib: allow passing parameters to the unzip call

.zip files usually don't have a top directory with a version number.

- - - - -
777b1104 by Steve Lhomme at 2022-11-27T11:02:03+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.

- - - - -
eceab36d by Steve Lhomme at 2022-11-27T11:02:03+00:00
win32: package: use WIX from contribs if it's not provided

- - - - -
1a8e6eb1 by Steve Lhomme at 2022-11-27T11:02:03+00:00
Revert "CI: set the path to the WIX install in Docker images"

This reverts commit 8e167abc3c51f3ce533b66f5d8085b2411bc9516.

We don't need it anymore now that WIX comes from the contribs.

- - - - -


5 changed files:

- contrib/src/main.mak
- + contrib/src/wix/SHA512SUMS
- + contrib/src/wix/rules.mak
- extras/ci/gitlab-ci.yml
- extras/package/win32/build.sh


Changes:

=====================================
contrib/src/main.mak
=====================================
@@ -419,7 +419,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 @@
+26b1d2a5b582fcaa31ffaaf289711854897f91e8e5002bd8ddee2e69c95a60f53c6e3375d38fba4519ddd4a68bcf402c36eaef5a8faa6f3a4b8b2bc011e8f05a  wix3.5.2519.0.zip


=====================================
contrib/src/wix/rules.mak
=====================================
@@ -0,0 +1,27 @@
+WIX_VERSION=35
+WIX_FULL_VERSION=3.5.2519.0
+WIX_URL := https://wixtoolset.org/downloads/v$(WIX_FULL_VERSION)/wix$(WIX_VERSION)-binaries.zip
+
+ifdef HAVE_WIN32
+# this requires dotnet 4.0 to be installed when running wix
+PKGS += wix
+# need to be installed when using prebuilt
+PKGS_TOOLS += 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 $</*.exe.config $</*.dll $</*.targets $</*.cub $</*.wixlib ; do \
+	  install $$f "$(PREFIX)/bin" ; \
+	done
+	touch $@


=====================================
extras/ci/gitlab-ci.yml
=====================================
@@ -46,21 +46,18 @@ variables:
         VLCARCH: win32
         HOST_ARCH: i686
         TRIPLET: $HOST_ARCH-w64-mingw32
-        WIX_PATH: '-W/home/videolan/.wine/dosdevices/c:/Program Files (x86)/Windows Installer XML v3.5/bin'
 
 .variables-win64: &variables-win64
         SHORTARCH: win64
         VLCARCH: win64
         HOST_ARCH: x86_64
         TRIPLET: $HOST_ARCH-w64-mingw32
-        WIX_PATH: '-W/home/videolan/.wine/dosdevices/c:/Program Files (x86)/Windows Installer XML v3.5/bin'
 
 .variables-win64-arm: &variables-win64-arm
         SHORTARCH: arm64
         VLCARCH: winarm64
         HOST_ARCH: aarch64
         TRIPLET: $HOST_ARCH-w64-mingw32
-        WIX_PATH: '-W/home/videolan/.wine/dosdevices/c:/Program Files (x86)/Windows Installer XML v3.5/bin'
 
 .variables-macos-x86_64: &variables-macos-x86_64
         VLC_PATH: /Users/videolanci/sandbox/bin
@@ -147,7 +144,7 @@ variables:
         if [ "${CI_COMMIT_BRANCH}" = "${CI_DEFAULT_BRANCH}" ]; then
             EXTRA_BUILD_FLAGS="${EXTRA_BUILD_FLAGS} -c"
         fi
-        extras/package/win32/build.sh -a $HOST_ARCH $EXTRA_BUILD_FLAGS $LIBVLC_EXTRA_BUILD_FLAGS $UWP_EXTRA_BUILD_FLAGS "${WIX_PATH}"
+        extras/package/win32/build.sh -a $HOST_ARCH $EXTRA_BUILD_FLAGS $LIBVLC_EXTRA_BUILD_FLAGS $UWP_EXTRA_BUILD_FLAGS
         if [ "${CI_JOB_NAME}" = "win64" ]; then
           cmake -DLIBVLC_SDK_INC:STRING=${CI_PROJECT_DIR}/include -DLIBVLC_SDK_LIB:STRING=${CI_PROJECT_DIR}/${VLCARCH}/lib/.libs -H${CI_PROJECT_DIR}/doc/libvlc -B${CI_PROJECT_DIR}/doc/libvlc/build \
                 -G Ninja -DCMAKE_C_COMPILER=${TRIPLET}-gcc -DCMAKE_CXX_COMPILER=${TRIPLET}-g++ -DCMAKE_SYSTEM_NAME=Windows


=====================================
extras/package/win32/build.sh
=====================================
@@ -209,6 +209,11 @@ if [ ! -z "$BUILD_UCRT" ]; then
     fi
 fi
 
+if [ ! -z "$WIXPATH" ]; then
+    # the CI didn't provide its own WIX, make sure we use our own
+    CONTRIBFLAGS="$CONTRIBFLAGS --enable-wix"
+fi
+
 export PATH="$PWD/contrib/$CONTRIB_PREFIX/bin":"$PATH"
 
 if [ "$INTERACTIVE" = "yes" ]; then



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/76bb0f1316f3ce6bffd0449b8e37ae5e591af13f...1a8e6eb1abaeeeb893f96ce33ec348babae4c649

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/76bb0f1316f3ce6bffd0449b8e37ae5e591af13f...1a8e6eb1abaeeeb893f96ce33ec348babae4c649
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