Jenkins: Add x86_64h slice and patch in Qt Vulkan for it and arm64
This commit is contained in:
13
.ci/Jenkinsfile
vendored
13
.ci/Jenkinsfile
vendored
@@ -25,7 +25,7 @@ def buildBranch = env.JOB_BASE_NAME.contains('-') ? 1 : 0
|
||||
def osArchs = [
|
||||
'Windows': ['32', '64'],
|
||||
'Linux': ['x86', 'x86_64', 'arm32', 'arm64'],
|
||||
'macOS': ['x86_64+arm64']
|
||||
'macOS': ['x86_64+x86_64h+arm64']
|
||||
]
|
||||
|
||||
def osFlags = [
|
||||
@@ -261,12 +261,13 @@ pipeline {
|
||||
osArchs.each { os, thisOsArchs ->
|
||||
def combinations = [:]
|
||||
thisOsArchs.each { arch ->
|
||||
def thisArchDynarecs = dynarecArchs[arch.toLowerCase()]
|
||||
def archSlug = arch.replace('+x86_64h', '') /* all instances of arch except the one passed to -b */
|
||||
def thisArchDynarecs = dynarecArchs[archSlug.toLowerCase()]
|
||||
if (!thisArchDynarecs)
|
||||
thisArchDynarecs = ['NoDR']
|
||||
thisArchDynarecs.each { dynarec ->
|
||||
presets.each { preset ->
|
||||
def combination = "$os $arch $dynarec $preset"
|
||||
def combination = "$os $archSlug $dynarec $preset"
|
||||
combinations[combination] = {
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'SUCCESS') {
|
||||
retry(10) {
|
||||
@@ -278,11 +279,11 @@ pipeline {
|
||||
/* Switch to output directory. */
|
||||
dir("${env.WORKSPACE_TMP}/output") {
|
||||
/* Run build process. */
|
||||
def packageName = "${env.JOB_BASE_NAME}${dynarecSlugs[dynarec]}${presetSlugs[preset]}-$os-$arch$buildSuffix"
|
||||
def packageName = "${env.JOB_BASE_NAME}${dynarecSlugs[dynarec]}${presetSlugs[preset]}-$os-$archSlug$buildSuffix"
|
||||
def ret = -1
|
||||
def archName = archNames[arch]
|
||||
def archName = archNames[archSlug]
|
||||
if (os == 'macOS')
|
||||
archName = archNamesMac[arch]
|
||||
archName = archNamesMac[archSlug]
|
||||
dir("${dynarecNames[dynarec]}/$os - $archName") {
|
||||
ret = runBuild("-b \"$packageName\" \"$arch\" ${presetFlags[preset]} ${dynarecFlags[dynarec]} ${osFlags[os]} $buildFlags")
|
||||
}
|
||||
|
61
.ci/build.sh
61
.ci/build.sh
@@ -37,10 +37,17 @@
|
||||
# build_arch x86_64 (or arm64)
|
||||
# universal_archs (blank)
|
||||
# ui_interactive no
|
||||
# macosx_deployment_target 10.13 (for x86_64, or 11.0 for arm64)
|
||||
# macosx_deployment_target 10.13 (for x86_64, 10.14 for Qt Vulkan, or 11.0 for arm64)
|
||||
# - For universal building on Apple Silicon hardware, install native MacPorts on the default
|
||||
# /opt/local and Intel MacPorts on /opt/intel, then tell build.sh to build for "x86_64+arm64"
|
||||
# - port is called through sudo to manage dependencies; make sure it is configured
|
||||
# - Qt Vulkan support through MoltenVK requires 10.14 while we target 10.13. We deal with that
|
||||
# (at least for now) by abusing the x86_64h universal slice to branch Haswell and newer Macs
|
||||
# into a Vulkan-enabled but 10.14+ binary, with older ones opting for a 10.13-compatible,
|
||||
# non-Vulkan binary. With this approach, the only machines that miss out on Vulkan despite
|
||||
# supporting Metal are Ivy Bridge ones as well as GPU-upgraded Mac Pros. For building that
|
||||
# Vulkan binary, install another Intel MacPorts on /opt/x86_64h, then use the "x86_64h"
|
||||
# architecture when invoking build.sh (either standalone or as part of an universal build)
|
||||
# - port and sed are called through sudo to manage dependencies; make sure those are configured
|
||||
# as NOPASSWD in /etc/sudoers if you're doing unattended builds
|
||||
#
|
||||
|
||||
@@ -401,10 +408,10 @@ then
|
||||
args=
|
||||
[ $strip -ne 0 ] && args="-t $args"
|
||||
case $arch_universal in # workaround: force new dynarec on for ARM
|
||||
arm32 | arm64) cmake_flags_extra="-D NEW_DYNAREC=ON";;
|
||||
*) cmake_flags_extra=;;
|
||||
arm*) cmake_flags_extra="-D NEW_DYNAREC=ON";;
|
||||
*) cmake_flags_extra=;;
|
||||
esac
|
||||
zsh -lc 'exec "'"$0"'" -n -b "universal part" "'"$arch_universal"'" '"$args""$cmake_flags"' '"$cmake_flags_extra"
|
||||
zsh -lc 'exec "'"$0"'" -n -b "universal slice" "'"$arch_universal"'" '"$args""$cmake_flags"' '"$cmake_flags_extra"
|
||||
status=$?
|
||||
|
||||
if [ $status -eq 0 ]
|
||||
@@ -538,8 +545,8 @@ then
|
||||
|
||||
# Switch into the correct architecture if required.
|
||||
case $arch in
|
||||
x86_64) arch_mac="i386";;
|
||||
*) arch_mac="$arch";;
|
||||
x86_64*) arch_mac="i386";;
|
||||
*) arch_mac="$arch";;
|
||||
esac
|
||||
if [ "$(arch)" != "$arch" -a "$(arch)" != "$arch_mac" ]
|
||||
then
|
||||
@@ -560,17 +567,33 @@ then
|
||||
[ "$arch" = "x86_64" -a -e "/opt/intel/bin/port" ] && macports="/opt/intel"
|
||||
export PATH="$macports/bin:$macports/sbin:$macports/libexec/qt5/bin:$PATH"
|
||||
|
||||
# Install dependencies only if we're in a new build and/or architecture.
|
||||
if check_buildtag "$(arch)"
|
||||
# Enable MoltenVK on x86_64h and arm64, but not on x86_64.
|
||||
# The rationale behind that is explained on the big comment up top.
|
||||
moltenvk=0
|
||||
if [ "$arch" != "x86_64" ]
|
||||
then
|
||||
moltenvk=1
|
||||
cmake_flags_extra="$cmake_flags_extra -D MOLTENVK=ON -D \"MOLTENVK_INCLUDE_DIR=$macports\""
|
||||
fi
|
||||
|
||||
# Install dependencies only if we're in a new build and/or MacPorts prefix.
|
||||
if check_buildtag "$(basename "$macports")"
|
||||
then
|
||||
# Install dependencies.
|
||||
echo [-] Installing dependencies through MacPorts
|
||||
sudo "$macports/bin/port" selfupdate
|
||||
if [ $moltenvk -ne 0 ]
|
||||
then
|
||||
# Patch Qt to enable Vulkan support where supported.
|
||||
qt5_portfile="$macports/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/aqua/qt5/Portfile"
|
||||
sudo sed -i -e 's/-no-feature-vulkan/-feature-vulkan/g' "$qt5_portfile"
|
||||
sudo sed -i -e 's/configure.env-append MAKE=/configure.env-append VULKAN_SDK=${prefix} MAKE=/g' "$qt5_portfile"
|
||||
fi
|
||||
sudo "$macports/bin/port" install $(cat .ci/dependencies_macports.txt)
|
||||
|
||||
# Save build tag to skip this later. Doing it here (once everything is
|
||||
# in place) is important to avoid potential issues with retried builds.
|
||||
save_buildtag "$(arch)"
|
||||
save_buildtag "$(basename "$macports")"
|
||||
else
|
||||
echo [-] Not installing dependencies again
|
||||
|
||||
@@ -697,7 +720,7 @@ rm -rf build
|
||||
# Add ARCH to skip the arch_detect process.
|
||||
case $arch in
|
||||
32 | x86) cmake_flags_extra="$cmake_flags_extra -D ARCH=i386";;
|
||||
64 | x86_64) cmake_flags_extra="$cmake_flags_extra -D ARCH=x86_64";;
|
||||
64 | x86_64*) cmake_flags_extra="$cmake_flags_extra -D ARCH=x86_64";;
|
||||
ARM32 | arm32) cmake_flags_extra="$cmake_flags_extra -D ARCH=arm";;
|
||||
ARM64 | arm64) cmake_flags_extra="$cmake_flags_extra -D ARCH=arm64";;
|
||||
*) cmake_flags_extra="$cmake_flags_extra -D \"ARCH=$arch\"";;
|
||||
@@ -778,7 +801,7 @@ fi
|
||||
# Determine Discord Game SDK architecture.
|
||||
case $arch in
|
||||
32) arch_discord="x86";;
|
||||
64) arch_discord="x86_64";;
|
||||
64 | x86_64*) arch_discord="x86_64";;
|
||||
arm64 | ARM64) arch_discord="aarch64";;
|
||||
*) arch_discord="$arch";;
|
||||
esac
|
||||
@@ -844,6 +867,20 @@ then
|
||||
unzip -j "$discord_zip" "lib/$arch_discord/discord_game_sdk.dylib" -d "archive_tmp/"*".app/Contents/Frameworks"
|
||||
[ ! -e "archive_tmp/"*".app/Contents/Frameworks/discord_game_sdk.dylib" ] && echo [!] No Discord Game SDK for architecture [$arch_discord]
|
||||
|
||||
# Hack to convert x86_64 binaries to x86_64h when building that architecture.
|
||||
if [ "$arch" = "x86_64h" ]
|
||||
then
|
||||
find archive_tmp -type f | while IFS= read line
|
||||
do
|
||||
# Act only on 64-bit Mach-Os (0xFEEDFACF) for CPU type x86_64 (0x01000007).
|
||||
if [ "$(dd if="$line" bs=1 count=8 status=none)" = "$(printf '\xCF\xFA\xED\xFE\x07\x00\x00\x01')" ]
|
||||
then
|
||||
# Change CPU subtype from ALL (0x00000003) to H (0x00000008).
|
||||
printf '\x08\x00\x00\x00' | dd of="$line" bs=1 seek=8 count=4 conv=notrunc status=none
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# Sign app bundle, unless we're in an universal build.
|
||||
[ $skip_archive -eq 0 ] && codesign --force --deep -s - "archive_tmp/"*".app"
|
||||
elif [ "$BUILD_TAG" = "precondition" ]
|
||||
|
@@ -4,7 +4,10 @@ ninja
|
||||
freetype
|
||||
libsdl2
|
||||
libpng
|
||||
openal-soft
|
||||
FAudio
|
||||
rtmidi
|
||||
vulkan-headers
|
||||
MoltenVK
|
||||
qt5
|
||||
wget
|
||||
|
@@ -40,7 +40,7 @@ if(MUNT_EXTERNAL)
|
||||
endif()
|
||||
|
||||
project(86Box
|
||||
VERSION 3.7.1
|
||||
VERSION 3.8
|
||||
DESCRIPTION "Emulator of x86-based systems"
|
||||
HOMEPAGE_URL "https://86box.net"
|
||||
LANGUAGES C CXX)
|
||||
|
@@ -20,12 +20,12 @@
|
||||
#define EMU_NAME "86Box"
|
||||
#define EMU_NAME_W LSTR(EMU_NAME)
|
||||
|
||||
#define EMU_VERSION "3.7.1"
|
||||
#define EMU_VERSION "3.8"
|
||||
#define EMU_VERSION_W LSTR(EMU_VERSION)
|
||||
#define EMU_VERSION_EX "3.50" /* frozen due to IDE re-detection behavior on Windows */
|
||||
#define EMU_VERSION_MAJ 3
|
||||
#define EMU_VERSION_MIN 7
|
||||
#define EMU_VERSION_PATCH 1
|
||||
#define EMU_VERSION_MIN 8
|
||||
#define EMU_VERSION_PATCH 0
|
||||
|
||||
#define EMU_BUILD_NUM 0
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
#define EMU_ROMS_URL "https://github.com/86Box/roms/releases/latest"
|
||||
#define EMU_ROMS_URL_W LSTR(EMU_ROMS_URL)
|
||||
#ifdef RELEASE_BUILD
|
||||
# define EMU_DOCS_URL "https://86box.readthedocs.io/en/v3.7/"
|
||||
# define EMU_DOCS_URL "https://86box.readthedocs.io/en/v3.8/"
|
||||
#else
|
||||
# define EMU_DOCS_URL "https://86box.readthedocs.io"
|
||||
#endif
|
||||
|
@@ -15,7 +15,7 @@
|
||||
%global romver v3.7
|
||||
|
||||
Name: 86Box
|
||||
Version: 3.7.1
|
||||
Version: 3.8
|
||||
Release: 1%{?dist}
|
||||
Summary: Classic PC emulator
|
||||
License: GPLv2+
|
||||
@@ -117,5 +117,5 @@ popd
|
||||
%{_datadir}/%{name}/roms
|
||||
|
||||
%changelog
|
||||
* Tue Aug 02 2022 Robert de Rooy <robert.de.rooy[AT]gmail.com> 3.7.1-1
|
||||
* Tue Aug 30 2022 Robert de Rooy <robert.de.rooy[AT]gmail.com> 3.8-1
|
||||
- Bump release
|
||||
|
@@ -10,7 +10,7 @@
|
||||
</categories>
|
||||
<launchable type="desktop-id">net.86box.86Box.desktop</launchable>
|
||||
<releases>
|
||||
<release version="3.7.1" date="2022-08-02"/>
|
||||
<release version="3.8" date="2022-08-30"/>
|
||||
</releases>
|
||||
<content_rating type="oars-1.1" />
|
||||
<description>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "86box",
|
||||
"version-string": "3.7.1",
|
||||
"version-string": "3.8",
|
||||
"homepage": "https://86box.net/",
|
||||
"documentation": "http://86box.readthedocs.io/",
|
||||
"license": "GPL-2.0-or-later",
|
||||
|
Reference in New Issue
Block a user