From 499e58ea93a1bf76e144ebf1c6532e89e2655e1f Mon Sep 17 00:00:00 2001 From: Alexander Kojevnikov Date: Sun, 5 Feb 2023 13:42:27 -0800 Subject: [PATCH] Update Windows bundling --- dist/win/README.md | 2 +- dist/win/bundle.bat | 6 +- dist/win/bundle.sh | 13 +++-- dist/win/mxe.diff | 127 ++++++++++++++++++++++--------------------- dist/win/spek.rc | 2 + dist/win/spek.wxs.in | 4 +- po/LINGUAS | 1 + po/id.po | 25 ++++----- 8 files changed, 94 insertions(+), 86 deletions(-) diff --git a/dist/win/README.md b/dist/win/README.md index 9db7ba6..d998cb7 100644 --- a/dist/win/README.md +++ b/dist/win/README.md @@ -10,7 +10,7 @@ For the first step you can use any Unix-y environment. Set up Apply `mxe.diff` and build Spek dependencies: - make pthreads ffmpeg wxwidgets -j8 JOBS=8 + make pthreads ffmpeg wxwidgets -j8 JOBS=8 MXE_TARGETS='x86_64-w64-mingw32.static' Build Spek, adjusting `bundle.sh` variables as necessary: diff --git a/dist/win/bundle.bat b/dist/win/bundle.bat index fbcae0c..610828b 100644 --- a/dist/win/bundle.bat +++ b/dist/win/bundle.bat @@ -1,7 +1,7 @@ -rem This script will build an MSI installer for Win32. +rem This script will build an MSI installer for Win64. rem Check README.md in this directory for instructions. -set WIX_PATH=c:\Program Files\Windows Installer XML v3.5\bin +set WIX_PATH=c:\Program Files (x86)\WiX Toolset v3.11\bin cd tests test.exe @@ -15,7 +15,7 @@ move Spek\spek.exe .\ move spek.exe Spek\ rem Make the MSI package -"%WIX_PATH%"\candle SpekInstallDirDlg.wxs SpekInstallDir.wxs spek.wxs files.wxs +"%WIX_PATH%"\candle -arch x64 SpekInstallDirDlg.wxs SpekInstallDir.wxs spek.wxs files.wxs "%WIX_PATH%"\light -b Spek SpekInstallDirDlg.wixobj SpekInstallDir.wixobj spek.wixobj files.wixobj -ext WixUIExtension.dll -o spek.msi start /wait fix-msi.js spek.msi diff --git a/dist/win/bundle.sh b/dist/win/bundle.sh index 141dc9e..61d6c28 100755 --- a/dist/win/bundle.sh +++ b/dist/win/bundle.sh @@ -1,4 +1,6 @@ -#!/bin/sh +#!/usr/bin/env bash + +set -euxo pipefail # This script will cross-compile spek.exe, make a ZIP archive and prepare files # for building an MSI installer under Windows. @@ -6,13 +8,12 @@ # Adjust these variables if necessary. MXE=$(realpath $(dirname $0)/../../../mxe/usr) -MAKE=gmake +MAKE=make ZIP=zip -HOST=i686-w64-mingw32.static +HOST=x86_64-w64-mingw32.static LANGUAGES="bs ca cs da de el eo es fi fr gl he hr hu id it ja ko lv nb nl nn pl pt_BR ru sk sr@latin sv th tr uk vi zh_CN zh_TW" PATH="$MXE"/bin:$PATH -WINDRES="$HOST"-windres WX_CONFIG="$MXE"/"$HOST"/bin/wx-config cd $(dirname $0)/../.. @@ -20,7 +21,7 @@ rm -fr dist/win/build && mkdir dist/win/build # Compile the resource file rm -f dist/win/spek.res -"$WINDRES" dist/win/spek.rc -O coff -o dist/win/spek.res +$("$WX_CONFIG" --rescomp) dist/win/spek.rc -O coff -o dist/win/spek.res mkdir -p src/dist/win && cp dist/win/spek.res src/dist/win/ mkdir -p tests/dist/win && cp dist/win/spek.res tests/dist/win/ @@ -53,7 +54,7 @@ cp ../../lic/* Spek/lic/ for lang in $LANGUAGES; do mkdir -p Spek/"$lang" cp build/share/locale/"$lang"/LC_MESSAGES/spek.mo Spek/"$lang"/ - cp "$MXE"/"$HOST"/share/locale/"$lang"/LC_MESSAGES/wxstd.mo Spek/"$lang"/ + cp "$MXE"/"$HOST"/share/locale/"$lang"/LC_MESSAGES/wxstd-3.1.mo Spek/"$lang"/ || echo "No WX translation for $lang" done rm -fr build diff --git a/dist/win/mxe.diff b/dist/win/mxe.diff index bd25df0..1250395 100644 --- a/dist/win/mxe.diff +++ b/dist/win/mxe.diff @@ -1,49 +1,55 @@ +diff --git a/src/ffmpeg-1-fixes.patch b/src/ffmpeg-1-fixes.patch +index 5381ddf6..be47f68b 100644 +--- a/src/ffmpeg-1-fixes.patch ++++ b/src/ffmpeg-1-fixes.patch +@@ -2,26 +2,6 @@ This file is part of MXE. See LICENSE.md for licensing information. + + Contains ad hoc patches for cross building. + +-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +-From: Tony Theodore +-Date: Sun, 25 Apr 2021 19:23:19 +1000 +-Subject: [PATCH 1/2] fix windres whitespace handling +- +- +-diff --git a/ffbuild/common.mak b/ffbuild/common.mak +-index 1111111..2222222 100644 +---- a/ffbuild/common.mak +-+++ b/ffbuild/common.mak +-@@ -82,7 +82,7 @@ COMPILE_NVCC = $(call COMPILE,NVCC) +- -$(if $(ASMSTRIPFLAGS), $(STRIP) $(ASMSTRIPFLAGS) $@) +- +- %.o: %.rc +-- $(WINDRES) $(IFLAGS) --preprocessor "$(DEPWINDRES) -E -xc-header -DRC_INVOKED $(CC_DEPFLAGS)" -o $@ $< +-+ $(WINDRES) $(IFLAGS) --preprocessor "$(DEPWINDRES)" $(addprefix --preprocessor-arg ,-E -xc-header -DRC_INVOKED $(CC_DEPFLAGS)) -o $@ $< +- +- %.i: %.c +- $(CC) $(CCFLAGS) $(CC_E) $< +- + From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 + From: Mark Brand + Date: Mon, 4 Apr 2022 00:33:50 +0200 diff --git a/src/ffmpeg.mk b/src/ffmpeg.mk -index 8b90d69..fab1a73 100644 +index b486d859..d1d7013d 100644 --- a/src/ffmpeg.mk +++ b/src/ffmpeg.mk -@@ -3,13 +3,13 @@ - +@@ -3,8 +3,8 @@ PKG := ffmpeg - $(PKG)_IGNORE := 2% --$(PKG)_VERSION := 1.2.3 --$(PKG)_CHECKSUM := f083c92075fe010f17416bc880dfca101535276d -+$(PKG)_VERSION := 2.0.2 -+$(PKG)_CHECKSUM := 47d3b3d172ae81f0571549e4dfaadfe5b4fe06cc + $(PKG)_WEBSITE := https://ffmpeg.org/ + $(PKG)_IGNORE := +-$(PKG)_VERSION := 4.2.3 +-$(PKG)_CHECKSUM := 217eb211c33303b37c5521a5abe1f0140854d6810c6a6ee399456cc96356795e ++$(PKG)_VERSION := 5.1.2 ++$(PKG)_CHECKSUM := 39a0bcc8d98549f16c570624678246a6ac736c066cebdb409f9502e915b22f2b $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2 - $(PKG)_URL := http://www.ffmpeg.org/releases/$($(PKG)_FILE) - $(PKG)_URL_2 := http://launchpad.net/ffmpeg/main/$($(PKG)_VERSION)/+download/$($(PKG)_FILE) --$(PKG)_DEPS := gcc bzip2 lame libass libnut libvpx opencore-amr opus sdl speex theora vo-aacenc vo-amrwbenc vorbis x264 xvidcore zlib -+$(PKG)_DEPS := gcc bzip2 opus zlib - - define $(PKG)_UPDATE - $(WGET) -q -O- 'http://www.ffmpeg.org/download.html' | \ -@@ -31,26 +31,20 @@ define $(PKG)_BUILD + $(PKG)_URL := https://ffmpeg.org/releases/$($(PKG)_FILE) +@@ -40,28 +40,26 @@ define $(PKG)_BUILD --disable-pthreads \ --enable-w32threads \ --disable-doc \ +- --enable-avresample \ + --disable-programs \ - --enable-gpl \ - --enable-version3 \ - --disable-nonfree \ -- --enable-avisynth \ -- --enable-libass \ -- --disable-libfaac \ -- --enable-libmp3lame \ -- --enable-libnut \ -- --enable-libopencore-amrnb \ -- --enable-libopencore-amrwb \ -- --enable-libopus \ -- --enable-libspeex \ -- --enable-libtheora \ -- --enable-libvo-aacenc \ -- --enable-libvo-amrwbenc \ -- --enable-libvorbis \ -- --enable-libvpx \ -- --enable-libx264 \ -- --enable-libxvid \ -- --enable-postproc + --disable-avdevice \ + --disable-swresample \ + --disable-swscale \ @@ -53,28 +59,27 @@ index 8b90d69..fab1a73 100644 + --disable-muxers \ + --disable-devices \ + --disable-filters \ -+ --enable-libopus - $(MAKE) -C '$(1)' -j '$(JOBS)' - $(MAKE) -C '$(1)' -j 1 install - endef -diff --git a/src/wxwidgets.mk b/src/wxwidgets.mk -index db37a9a..8f37ffd 100644 ---- a/src/wxwidgets.mk -+++ b/src/wxwidgets.mk -@@ -8,7 +8,7 @@ $(PKG)_CHECKSUM := 0bab57ecd6d065a3672ec5fbb09d287456727ea4 - $(PKG)_SUBDIR := wxWidgets-$($(PKG)_VERSION) - $(PKG)_FILE := wxWidgets-$($(PKG)_VERSION).tar.bz2 - $(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/wxwindows/$($(PKG)_VERSION)/$($(PKG)_FILE) --$(PKG)_DEPS := gcc libiconv libpng jpeg tiff sdl zlib expat -+$(PKG)_DEPS := gcc libiconv libpng jpeg tiff zlib expat - - define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/wxwindows/files/' | \ -@@ -39,7 +39,6 @@ define $(PKG)_CONFIGURE_OPTS - --with-regex=yes \ - --with-zlib=sys \ - --with-expat=sys \ -- --with-sdl \ - --without-gtk \ - --without-motif \ - --without-mac \ + --enable-gpl \ + --enable-version3 \ + --extra-libs='-mconsole' \ +- --enable-avisynth \ +- --enable-gnutls \ +- --enable-libass \ + --enable-libbluray \ +- --enable-libbs2b \ +- --enable-libcaca \ +- --enable-libmp3lame \ + --enable-libopencore-amrnb \ + --enable-libopencore-amrwb \ + --enable-libopus \ + --enable-libspeex \ +- --enable-libtheora \ +- --enable-libvidstab \ +- --enable-libvo-amrwbenc \ + --enable-libvorbis \ + --enable-libvpx \ +- --enable-libx264 \ +- --enable-libxvid \ + --extra-ldflags="-fstack-protector" \ + $($(PKG)_CONFIGURE_OPTS) + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' diff --git a/dist/win/spek.rc b/dist/win/spek.rc index f8c525c..5e9cb1e 100644 --- a/dist/win/spek.rc +++ b/dist/win/spek.rc @@ -1,3 +1,5 @@ +#include + aaaa ICON "spek.ico" help ICON "help.ico" open ICON "open.ico" diff --git a/dist/win/spek.wxs.in b/dist/win/spek.wxs.in index 7e8a616..a1c6fb7 100644 --- a/dist/win/spek.wxs.in +++ b/dist/win/spek.wxs.in @@ -6,7 +6,7 @@ - + @@ -54,7 +54,7 @@ - + diff --git a/po/LINGUAS b/po/LINGUAS index 1f0b974..7244763 100644 --- a/po/LINGUAS +++ b/po/LINGUAS @@ -14,6 +14,7 @@ gl he hr hu +id it ja ko diff --git a/po/id.po b/po/id.po index 77580c0..0ad7c5a 100644 --- a/po/id.po +++ b/po/id.po @@ -1,21 +1,21 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR The Spek authors # This file is distributed under the same license as the spek package. -# +# # Translators: # Tan Rico , 2016 msgid "" msgstr "" "Project-Id-Version: Spek\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-04-04 13:17-0700\n" +"POT-Creation-Date: 2023-01-09 19:59-0800\n" "PO-Revision-Date: 2011-02-23 09:25+0000\n" "Last-Translator: Tan Rico , 2016\n" "Language-Team: Indonesian (http://www.transifex.com/spek/spek/language/id/)\n" +"Language: id\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: id\n" "Plural-Forms: nplurals=1; plural=0;\n" #: data/spek.desktop.in:4 @@ -85,31 +85,30 @@ msgstr "Sampel format tidak didukung" msgid "Stream %d / %d: %s" msgstr "" -#. TRANSLATORS: first %s is the error message, second %s is stream -#. description. +#. TRANSLATORS: first %s is the error message, second %s is stream description. #: src/spek-pipeline.cc:286 #, c-format msgid "%s: %s" msgstr "%s: %s" -#: src/spek-preferences-dialog.cc:50 +#: src/spek-preferences-dialog.cc:58 msgid "Preferences" msgstr "Preferensi" -#: src/spek-preferences-dialog.cc:55 +#: src/spek-preferences-dialog.cc:63 msgid "(system default)" msgstr "(bawaan sistem)" #. TRANSLATORS: The name of a section in the Preferences dialog. -#: src/spek-preferences-dialog.cc:62 +#: src/spek-preferences-dialog.cc:70 msgid "General" msgstr "Umum" -#: src/spek-preferences-dialog.cc:71 +#: src/spek-preferences-dialog.cc:79 msgid "Language:" msgstr "Bahasa:" -#: src/spek-preferences-dialog.cc:87 +#: src/spek-preferences-dialog.cc:95 msgid "Check for &updates" msgstr "Cek &pembaharuan" @@ -189,15 +188,15 @@ msgid "Untitled" msgstr "Tidak ada judul" #. TRANSLATORS: Add your name here -#: src/spek-window.cc:309 +#: src/spek-window.cc:315 msgid "translator-credits" msgstr "translator-credits" -#: src/spek-window.cc:315 +#: src/spek-window.cc:321 msgid "Copyright (c) 2010-2013 Alexander Kojevnikov and contributors" msgstr "Hak Cipta (c) 2010-2013 Alexander Kojevnikov dan para kontributor" -#: src/spek-window.cc:318 +#: src/spek-window.cc:324 msgid "Spek Website" msgstr "Laman Website Spek"