Update Windows bundling

This commit is contained in:
Alexander Kojevnikov 2023-02-05 13:42:27 -08:00
parent 02cbdc9b40
commit 499e58ea93
8 changed files with 94 additions and 86 deletions

2
dist/win/README.md vendored
View File

@ -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:

6
dist/win/bundle.bat vendored
View File

@ -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

13
dist/win/bundle.sh vendored
View File

@ -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

127
dist/win/mxe.diff vendored
View File

@ -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 <tonyt@logyst.com>
-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 <mabrand@mabrand.nl>
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)'

2
dist/win/spek.rc vendored
View File

@ -1,3 +1,5 @@
#include <wx/msw/wx.rc>
aaaa ICON "spek.ico"
help ICON "help.ico"
open ICON "open.ico"

View File

@ -6,7 +6,7 @@
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="$(var.ProductName)" Language="0"
Version="$(var.ProductVersion)" Manufacturer="$(var.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
<Package InstallerVersion="301" Compressed="yes" Platform="x86" InstallScope="perMachine"/>
<Package InstallerVersion="301" Compressed="yes" Platform="x64" InstallScope="perMachine"/>
<Media Id="1" Cabinet="spek.cab" EmbedCab="yes" CompressionLevel="high" />
<Property Id="ARPPRODUCTICON" Value="ProgramIcon" />
<Property Id="ARPHELPLINK" Value="https://www.spek.cc/" />
@ -54,7 +54,7 @@
<Directory Id="ProgramMenuSubfolder" Name="$(var.ProductName)"/>
</Directory>
<Directory Id="DesktopFolder" />
<Directory Id="ProgramFilesFolder">
<Directory Id="ProgramFiles64Folder">
<Directory Id="INSTALLLOCATION" Name="$(var.ProductName)">
<Component Id="Main" Guid="CD5121AD-F799-4796-9DB8-0C24CA0A4C8E">
<File Id="spek.ico" Name="spek.ico" Source="spek.ico" />

View File

@ -14,6 +14,7 @@ gl
he
hr
hu
id
it
ja
ko

View File

@ -8,14 +8,14 @@ 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 <riecotan@gmail.com>, 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"