Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .github/actions/setup-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,16 +115,6 @@ runs:
esac

echo "VCPKG_TRIPLET=$vcpkg_arch-$vcpkg_platform" >> "$GITHUB_ENV"

- name: Install Qt 5
if: ${{ inputs.msystem == '' && inputs.qt-major == '5' }}
uses: jurplel/install-qt-action@v4
with:
aqtversion: "==3.1.*"
version: ${{ inputs.qt-version }}
modules: qtnetworkauth
cache: ${{ inputs.build-type == 'Debug' }}

- name: Install Qt 6
if: ${{ inputs.msystem == '' && inputs.qt-major == '6' }}
uses: jurplel/install-qt-action@v4
Expand All @@ -137,5 +127,4 @@ runs:
- name: Setup bundled OpenSSL
uses: ./.github/actions/setup-openssl
with:
qt-major: ${{ inputs.qt-major }}
msystem: ${{ inputs.msystem }}
150 changes: 7 additions & 143 deletions .github/actions/setup-openssl/action.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,9 @@
name: Setup bundled OpenSSL

inputs:
qt-major:
description: Major version of Qt being built against
required: true
msystem:
description: MSYS2 subsystem, when building with MinGW
required: false
openssl-version:
description: >
OpenSSL release to build for Qt 5.
required: false
default: "1.1.1w"
openssl-sha256:
description: SHA-256 of the OpenSSL source tarball, checked before use
required: false
default: "cf3098950cb4d853ad95c0841f1f9c6d3dc102dccfcacd521d93925208b76ac8"

runs:
using: composite
Expand All @@ -24,10 +12,13 @@ runs:
##
# MinGW / MSYS2 -- OpenSSL comes from pacman.
#
# MSYS2 only packages OpenSSL 3 and patches its Qt 5 to match, so unlike
# the official Qt 5 builds this one wants 3.x. The files still have to be
# copied into the package: they live in the MSYS2 prefix, which does not
# exist on a user's machine.
# The only build that still needs OpenSSL bundled. Qt 6 on Windows falls
# back to Schannel, so the MSVC builds ship without it; MSYS2's Qt is
# linked against the OpenSSL in its own prefix, which does not exist on a
# user's machine, so those DLLs have to travel with the package.
#
# Everything else this action used to do existed for the Qt 5 builds
# (OpenSSL 1.1.1 from source for MSVC and Linux) and went away with them.
##
- name: Locate MSYS2 OpenSSL (MinGW)
if: ${{ inputs.msystem != '' }}
Expand All @@ -46,130 +37,3 @@ runs:
# cygpath -m: Windows path with forward slashes, which is what CMake
# wants. Backslashes would be eaten as escapes in the -D value.
echo "MESHMC_BUNDLE_OPENSSL_LIBS=$(cygpath -m "$ssl");$(cygpath -m "$crypto")" >> "$GITHUB_ENV"

##
# Windows / MSVC + Qt 5 -- build OpenSSL 1.1.1.
##
- name: Retrieve OpenSSL cache (MSVC)
if: ${{ runner.os == 'Windows' && inputs.msystem == '' && inputs.qt-major == '5' }}
id: cache-openssl-msvc
uses: actions/cache@v6.1.0
with:
path: ${{ github.workspace }}/openssl-runtime
key: openssl-${{ inputs.openssl-version }}-msvc-${{ runner.arch }}

- name: Build OpenSSL (MSVC)
if: ${{ runner.os == 'Windows' && inputs.msystem == '' && inputs.qt-major == '5' && steps.cache-openssl-msvc.outputs.cache-hit != 'true' }}
shell: pwsh
env:
OPENSSL_VERSION: ${{ inputs.openssl-version }}
OPENSSL_SHA256: ${{ inputs.openssl-sha256 }}
OPENSSL_PREFIX: ${{ github.workspace }}/openssl-runtime
run: |
$ErrorActionPreference = 'Stop'

# Only the x64 target is wired up because that is the only architecture
# the Qt 5 MSVC job builds. Guessing a target for anything else would
# silently produce libraries Qt cannot load.
if ($env:RUNNER_ARCH -ne 'X64') {
throw "No OpenSSL 1.1.1 target configured for $env:RUNNER_ARCH"
}

$tarball = "openssl-$env:OPENSSL_VERSION.tar.gz"
Invoke-WebRequest "https://www.openssl.org/source/old/1.1.1/$tarball" -OutFile $tarball

$hash = (Get-FileHash $tarball -Algorithm SHA256).Hash.ToLower()
if ($hash -ne $env:OPENSSL_SHA256.ToLower()) {
throw "$tarball sha256 mismatch: got $hash, expected $env:OPENSSL_SHA256"
}

tar -xzf $tarball
Push-Location "openssl-$env:OPENSSL_VERSION"

# no-asm keeps NASM out of the dependency list; this library only has
# to terminate TLS for a launcher, not win benchmarks.
perl Configure VC-WIN64A no-asm no-tests `
--prefix="$env:OPENSSL_PREFIX" --openssldir="$env:OPENSSL_PREFIX/ssl"
if ($LASTEXITCODE -ne 0) { throw "OpenSSL Configure failed" }

nmake
if ($LASTEXITCODE -ne 0) { throw "OpenSSL build failed" }

nmake install_sw
if ($LASTEXITCODE -ne 0) { throw "OpenSSL install failed" }

Pop-Location

- name: Export OpenSSL paths (MSVC)
if: ${{ runner.os == 'Windows' && inputs.msystem == '' && inputs.qt-major == '5' }}
shell: pwsh
env:
OPENSSL_PREFIX: ${{ github.workspace }}/openssl-runtime
run: |
$ErrorActionPreference = 'Stop'

# These exact names are what Qt 5 looks for on 64-bit Windows; a
# differently named copy of the same library will not be picked up.
$libs = @('libssl-1_1-x64.dll', 'libcrypto-1_1-x64.dll') | ForEach-Object {
$path = Join-Path "$env:OPENSSL_PREFIX/bin" $_
if (-not (Test-Path -LiteralPath $path)) { throw "OpenSSL runtime is missing $path" }
$path.Replace('\', '/')
}

"MESHMC_BUNDLE_OPENSSL_LIBS=$($libs -join ';')" >> $env:GITHUB_ENV

##
# Linux + Qt 5 -- build OpenSSL 1.1.1 for the AppImage and the portable
# tarball. Both bundle Qt itself, so they cannot lean on the host the way
# a distro package would.
##
- name: Retrieve OpenSSL cache (Linux)
if: ${{ runner.os == 'Linux' && inputs.qt-major == '5' }}
id: cache-openssl-linux
uses: actions/cache@v6.1.0
with:
path: ${{ github.workspace }}/openssl-runtime
key: openssl-${{ inputs.openssl-version }}-linux-${{ runner.arch }}

- name: Build OpenSSL (Linux)
if: ${{ runner.os == 'Linux' && inputs.qt-major == '5' && steps.cache-openssl-linux.outputs.cache-hit != 'true' }}
shell: bash
env:
OPENSSL_VERSION: ${{ inputs.openssl-version }}
OPENSSL_SHA256: ${{ inputs.openssl-sha256 }}
OPENSSL_PREFIX: ${{ github.workspace }}/openssl-runtime
run: |
set -euo pipefail

tarball="openssl-${OPENSSL_VERSION}.tar.gz"
curl -fsSLO "https://www.openssl.org/source/old/1.1.1/${tarball}"
echo "${OPENSSL_SHA256} ${tarball}" | sha256sum -c -

tar -xzf "${tarball}"
cd "openssl-${OPENSSL_VERSION}"

./config shared no-tests \
--prefix="${OPENSSL_PREFIX}" --openssldir="${OPENSSL_PREFIX}/ssl"
make -j"$(nproc)"
make install_sw

- name: Export OpenSSL paths (Linux)
if: ${{ runner.os == 'Linux' && inputs.qt-major == '5' }}
shell: bash
env:
OPENSSL_PREFIX: ${{ github.workspace }}/openssl-runtime
run: |
set -euo pipefail

# install_sw picks lib/ or lib64/ depending on the platform, so find
# the sonames rather than assuming one of them.
lib_dir="$(dirname "$(find "${OPENSSL_PREFIX}" -name 'libssl.so.1.1' -print -quit)")"

for soname in libssl.so.1.1 libcrypto.so.1.1; do
if [[ ! -f "${lib_dir}/${soname}" ]]; then
echo "# 🚨 OpenSSL runtime is missing ${soname}" >> "$GITHUB_STEP_SUMMARY"
exit 1
fi
done

echo "MESHMC_OPENSSL_LIB_DIR=${lib_dir}" >> "$GITHUB_ENV"
37 changes: 5 additions & 32 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,38 +100,6 @@ jobs:
qt-major: 6
build-name: macOS aarch64 Qt6

- os: ubuntu-24.04
artifact-name: Linux
cmake-preset: linux
qt-version: 5.15.2
qt-major: 5
build-name: Linux x86_64 Qt5

- os: windows-2025
artifact-name: Windows-MinGW-w64
cmake-preset: windows_mingw
msystem: CLANG64
vcvars-arch: amd64_x86
qt-major: 5
build-name: Windows MinGW x86_64 Qt5

- os: windows-2022
artifact-name: Windows-MSVC
cmake-preset: windows_msvc
# TODO(@YongDo-Hyun): This is the default in setup-dependencies/windows. Why isn't it working?!?!
vcvars-arch: amd64
qt-version: 5.15.2
qt-major: 5
build-name: Windows MSVC x86_64 Qt5

- os: macos-26-intel
artifact-name: macOS-Intel
cmake-preset: macos
macosx-deployment-target: 12.0
qt-version: 5.15.2
qt-major: 5
build-name: macOS x86_64 Qt5

runs-on: ${{ matrix.os }}

defaults:
Expand Down Expand Up @@ -185,6 +153,11 @@ jobs:
run: |
ctest --preset "$CMAKE_PRESET" --build-config "$BUILD_TYPE" --output-on-failure

- name: Check plugin independence
shell: bash
run: |
./launcher/scripts/check-plugin-independence.sh

##
# PACKAGE
##
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:
with:
identifier: ProjectTick.MeshMC
version: ${{ github.event.release.tag_name }}
# Qt6 only, and deliberately: winget takes one installer per
# architecture for a package version, so matching the Qt5 build as
# well would offer two x64 installers for the same version.
# winget takes one installer per architecture for a package
# version. Qt 5 builds are gone, so there is only one x64 installer
# to match now -- but the pattern stays explicit anyway.
#
# The Qt part is not optional either. It used to be absent from the
# release names, so a pattern anchored straight after "MSVC" matched
Expand Down
42 changes: 0 additions & 42 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,39 +42,19 @@ jobs:
- name: Package artifacts properly
run: |
mv ${{ github.workspace }}/MeshMC-source MeshMC-${{ env.VERSION }}
mv MeshMC-Linux-Qt5-Portable*/MeshMC-portable.tar.gz MeshMC-Linux-Qt5-Portable-${{ env.VERSION }}.tar.gz
mv MeshMC-Linux-Qt6-Portable*/MeshMC-portable.tar.gz MeshMC-Linux-Qt6-Portable-${{ env.VERSION }}.tar.gz
mv MeshMC-Linux-aarch64-Qt6-Portable*/MeshMC-portable.tar.gz MeshMC-Linux-aarch64-Qt6-Portable-${{ env.VERSION }}.tar.gz
mv MeshMC-Linux-Qt5*.AppImage/MeshMC-*-x86_64.AppImage MeshMC-Linux-Qt5-x86_64.AppImage
mv MeshMC-Linux-Qt5*.AppImage.zsync/MeshMC-*-x86_64.AppImage.zsync MeshMC-Linux-Qt5-x86_64.AppImage.zsync
mv MeshMC-Linux-Qt6*.AppImage/MeshMC-*-x86_64.AppImage MeshMC-Linux-Qt6-x86_64.AppImage
mv MeshMC-Linux-Qt6*.AppImage.zsync/MeshMC-*-x86_64.AppImage.zsync MeshMC-Linux-Qt6-x86_64.AppImage.zsync
mv MeshMC-Linux-Qt6*.AppImage/MeshMC-*-aarch64.AppImage MeshMC-Linux-Qt6-aarch64.AppImage
mv MeshMC-Linux-Qt6*.AppImage.zsync/MeshMC-*-aarch64.AppImage.zsync MeshMC-Linux-Qt6-aarch64.AppImage.zsync
mv MeshMC-macOS-Intel-Qt5*/MeshMC.zip MeshMC-macOS-Intel-Qt5-${{ env.VERSION }}.zip
mv MeshMC-macOS-Intel-Qt5*/MeshMC.dmg MeshMC-macOS-Intel-Qt5-${{ env.VERSION }}.dmg
mv MeshMC-macOS-Intel-Qt6*/MeshMC.zip MeshMC-macOS-Intel-Qt6-${{ env.VERSION }}.zip
mv MeshMC-macOS-Intel-Qt6*/MeshMC.dmg MeshMC-macOS-Intel-Qt6-${{ env.VERSION }}.dmg
mv MeshMC-macOS-ARM-Qt6*/MeshMC.zip MeshMC-macOS-ARM-Qt6-${{ env.VERSION }}.zip
mv MeshMC-macOS-ARM-Qt6*/MeshMC.dmg MeshMC-macOS-ARM-Qt6-${{ env.VERSION }}.dmg

tar --exclude='.git' -czf MeshMC-${{ env.VERSION }}.tar.gz MeshMC-${{ env.VERSION }}

for d in MeshMC-Windows-MSVC-Qt5*; do
cd "${d}" || continue
LEGACY="$(echo -n ${d} | grep -o Legacy || true)"
ARM64="$(echo -n ${d} | grep -o arm64 || true)"
INST="$(echo -n ${d} | grep -o Setup || true)"
PORT="$(echo -n ${d} | grep -o Portable || true)"
NAME="MeshMC-Windows-MSVC-Qt5"
test -z "${LEGACY}" || NAME="${NAME}-Legacy"
test -z "${ARM64}" || NAME="${NAME}-arm64"
test -z "${PORT}" || NAME="${NAME}-Portable"
test -z "${INST}" || mv MeshMC-*.exe ../${NAME}-Setup-${{ env.VERSION }}.exe
test -n "${INST}" || zip -r -9 "../${NAME}-${{ env.VERSION }}.zip" *
cd ..
done

for d in MeshMC-Windows-MSVC-Qt6*; do
cd "${d}" || continue
LEGACY="$(echo -n ${d} | grep -o Legacy || true)"
Expand All @@ -90,17 +70,6 @@ jobs:
cd ..
done

for d in MeshMC-Windows-MinGW-Qt5-w64*; do
cd "${d}" || continue
INST="$(echo -n ${d} | grep -o Setup || true)"
PORT="$(echo -n ${d} | grep -o Portable || true)"
NAME="MeshMC-Windows-MinGW-Qt5-w64"
test -z "${PORT}" || NAME="${NAME}-Portable"
test -z "${INST}" || mv MeshMC-*.exe ../${NAME}-Setup-${{ env.VERSION }}.exe
test -n "${INST}" || zip -r -9 "../${NAME}-${{ env.VERSION }}.zip" *
cd ..
done

for d in MeshMC-Windows-MinGW-Qt6-w64*; do
cd "${d}" || continue
INST="$(echo -n ${d} | grep -o Setup || true)"
Expand All @@ -123,32 +92,21 @@ jobs:
prerelease: false
fail_on_unmatched_files: true
files: |
MeshMC-Linux-Qt5-x86_64.AppImage
MeshMC-Linux-Qt5-x86_64.AppImage.zsync
MeshMC-Linux-Qt6-x86_64.AppImage
MeshMC-Linux-Qt6-x86_64.AppImage.zsync
MeshMC-Linux-Qt6-aarch64.AppImage
MeshMC-Linux-Qt6-aarch64.AppImage.zsync
MeshMC-Linux-Qt5-Portable-${{ env.VERSION }}.tar.gz
MeshMC-Linux-Qt6-Portable-${{ env.VERSION }}.tar.gz
MeshMC-Linux-aarch64-Qt6-Portable-${{ env.VERSION }}.tar.gz
MeshMC-Windows-MinGW-Qt5-w64-${{ env.VERSION }}.zip
MeshMC-Windows-MinGW-Qt5-w64-Portable-${{ env.VERSION }}.zip
MeshMC-Windows-MinGW-Qt5-w64-Setup-${{ env.VERSION }}.exe
MeshMC-Windows-MinGW-Qt6-w64-${{ env.VERSION }}.zip
MeshMC-Windows-MinGW-Qt6-w64-Portable-${{ env.VERSION }}.zip
MeshMC-Windows-MinGW-Qt6-w64-Setup-${{ env.VERSION }}.exe
MeshMC-Windows-MSVC-Qt6-arm64-${{ env.VERSION }}.zip
MeshMC-Windows-MSVC-Qt6-arm64-Portable-${{ env.VERSION }}.zip
MeshMC-Windows-MSVC-Qt6-arm64-Setup-${{ env.VERSION }}.exe
MeshMC-Windows-MSVC-Qt5-${{ env.VERSION }}.zip
MeshMC-Windows-MSVC-Qt5-Portable-${{ env.VERSION }}.zip
MeshMC-Windows-MSVC-Qt5-Setup-${{ env.VERSION }}.exe
MeshMC-Windows-MSVC-Qt6-${{ env.VERSION }}.zip
MeshMC-Windows-MSVC-Qt6-Portable-${{ env.VERSION }}.zip
MeshMC-Windows-MSVC-Qt6-Setup-${{ env.VERSION }}.exe
MeshMC-macOS-Intel-Qt5-${{ env.VERSION }}.zip
MeshMC-macOS-Intel-Qt5-${{ env.VERSION }}.dmg
MeshMC-macOS-Intel-Qt6-${{ env.VERSION }}.zip
MeshMC-macOS-Intel-Qt6-${{ env.VERSION }}.dmg
MeshMC-macOS-ARM-Qt6-${{ env.VERSION }}.zip
Expand Down
Loading
Loading