1 Commits

Author SHA1 Message Date
2ee35c89c1 Native arm64 compilation for Linux 2025-07-03 10:26:16 -05:00
5 changed files with 14 additions and 82 deletions

View File

@ -28,13 +28,16 @@ on:
jobs: jobs:
build: build:
runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
include: include:
- arch: x86 - arch: x86
runner: ubuntu-latest
- arch: x86_64 - arch: x86_64
runner: ubuntu-latest
- arch: aarch64 - arch: aarch64
runner: ubuntu-24.04-arm
runs-on: ${{matrix.runner}}
steps: steps:
- name: Checkout Source Tree - name: Checkout Source Tree
uses: actions/checkout@v4 uses: actions/checkout@v4

View File

@ -27,58 +27,24 @@ on:
workflow_dispatch: workflow_dispatch:
jobs: jobs:
build: build-x86:
runs-on: macos-latest runs-on: macos-latest
strategy: strategy:
matrix: matrix:
include: include:
- arch: x86_64 - arch: x86_64
- arch: arm64
steps: steps:
- name: Checkout Source Tree - name: Checkout Source Tree
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Install Rosetta
if: matrix.arch == 'x86_64'
run: |
sudo softwareupdate --install-rosetta --agree-to-license || true
- name: Install Homebrew for x86_64
if: matrix.arch == 'x86_64'
env: { NONINTERACTIVE: 1 }
run: |
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- name: Install x86_64 OpenSSL
if: matrix.arch == 'x86_64'
run: |
arch -x86_64 /usr/local/bin/brew install openssl@3
echo "OPENSSL_ROOT_DIR=/usr/local/opt/openssl@3" >> $GITHUB_ENV
echo "OPENSSL_INCLUDE_DIR=/usr/local/opt/openssl@3/include" >> $GITHUB_ENV
echo "PKG_CONFIG_PATH=/usr/local/opt/openssl@3/lib/pkgconfig" >> $GITHUB_ENV
- name: Install arm64 OpenSSL
if: matrix.arch == 'arm64'
run: |
brew install openssl@3
echo "OPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl@3" >> $GITHUB_ENV
echo "OPENSSL_INCLUDE_DIR=/opt/homebrew/opt/openssl@3/include" >> $GITHUB_ENV
echo "PKG_CONFIG_PATH=/opt/homebrew/opt/openssl@3/lib/pkgconfig" >> $GITHUB_ENV
- name: Configure and build UMSKT - name: Configure and build UMSKT
run: | run: |
cd build cd build
cmake -DCMAKE_BUILD_TYPE=Release .. \ cmake -DCMAKE_BUILD_TYPE=Release ..
-DCMAKE_OSX_ARCHITECTURES=${{matrix.arch}} \
-DOPENSSL_ROOT_DIR=$OPENSSL_ROOT_DIR \
-DOPENSSL_INCLUDE_DIR=$OPENSSL_INCLUDE_DIR \
-DOPENSSL_USE_STATIC_LIBS=TRUE \
-DBUILD_SHARED_LIBS=OFF
make make
- name: Move files to correct directory - name: Move files to correct directory
run: | run: |
ls -a build
mkdir -p build/actions_upload mkdir -p build/actions_upload
mv build/umskt build/actions_upload/umskt mv build/umskt build/actions_upload/umskt
@ -87,34 +53,8 @@ jobs:
cd build/actions_upload cd build/actions_upload
./umskt ./umskt
- name: Upload platform-specific build - name: Upload build artifact
uses: actions/upload-artifact@v4.6.2 uses: actions/upload-artifact@v4.6.2
with: with:
name: UMSKT-macOS-${{ matrix.arch }} name: UMSKT-macOS-${{ matrix.arch }}
path: build/actions_upload path: build/actions_upload
universal:
needs: build
runs-on: macos-latest
steps:
- name: Download x86_64 slice
uses: actions/download-artifact@v4
with:
name: UMSKT-macOS-x86_64
path: x86
- name: Download arm64 slice
uses: actions/download-artifact@v4
with:
name: UMSKT-macOS-arm64
path: arm
- name: Create universal binary
shell: bash
run: |
mkdir fat
lipo -create x86/umskt arm/umskt -output fat/umskt
lipo -info fat/umskt
- name: Upload universal build
uses: actions/upload-artifact@v4
with:
name: UMSKT-macOS-universal
path: fat

View File

@ -1,10 +0,0 @@
# Stub so pre-commit can shut up until the refactor
repos:
- repo: local
hooks:
- id: no-op
name: Noop hook (always passes)
entry: "true" # `/usr/bin/true` returns 0 and does nothing
language: system
pass_filenames: false # dont bother passing any file paths

View File

@ -40,9 +40,9 @@ OPTION(MSVC_MSDOS_STUB "Specify a custom MS-DOS stub for a 32-bit MSVC compilati
SET(UMSKT_LINK_LIBS ${UMSKT_LINK_LIBS}) SET(UMSKT_LINK_LIBS ${UMSKT_LINK_LIBS})
SET(UMSKT_LINK_DIRS ${UMSKT_LINK_DIRS}) SET(UMSKT_LINK_DIRS ${UMSKT_LINK_DIRS})
# macOS does not support static build
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a") SET(UMSKT_USE_SHARED_OPENSSL ON)
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-dead_strip")
endif() endif()
# neither does dos idk i'm trying random stuff # neither does dos idk i'm trying random stuff
@ -77,10 +77,10 @@ IF(DJGPP_WATT32)
MESSAGE(STATUS "[UMSKT] Using i386 target for DOS DGJPP") MESSAGE(STATUS "[UMSKT] Using i386 target for DOS DGJPP")
ENDIF() ENDIF()
##if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
## SET(BUILD_SHARED_LIBS ON) SET(BUILD_SHARED_LIBS ON)
## MESSAGE(STATUS "[UMSKT] macOS has no static library - Shared library forced on") MESSAGE(STATUS "[UMSKT] macOS has no static library - Shared library forced on")
##endif() endif()
# if we're compiling with MSVC, respect the DEBUG compile option # if we're compiling with MSVC, respect the DEBUG compile option
IF(MSVC) IF(MSVC)
@ -167,7 +167,6 @@ CPMAddPackage(
GITHUB_REPOSITORY fmtlib/fmt GITHUB_REPOSITORY fmtlib/fmt
GIT_TAG 10.0.0 GIT_TAG 10.0.0
VERSION 10.0.0 VERSION 10.0.0
#OPTIONS "FMT_INSTALL YES" "BUILD_SHARED_LIBS OFF"
) )
# Include cmrc resource compiler # Include cmrc resource compiler

View File

@ -61,7 +61,7 @@ For Windows, click [here](https://slproweb.com/products/Win32OpenSSL.html) and c
*Note: This only applies if the build you download has OpenSSL embedded (static library) or not. You can usually tell if the download size is measured in KB or MB. If it's MB, you don't need this.* *Note: This only applies if the build you download has OpenSSL embedded (static library) or not. You can usually tell if the download size is measured in KB or MB. If it's MB, you don't need this.*
#### 3. Run `umskt` to generate a key, or add `--help` or `-h` to see more options. #### 3. Run `umskt` to generate a key, or add `--help` or `-h` to see more options.
*Note: on macOS, like all unsigned executables, you'll need to hold Ctrl while right clicking and selecting Open to actually open it.*
#### 4. *(Activation step for `Retail` and `OEM` only)* #### 4. *(Activation step for `Retail` and `OEM` only)*
* After installation, you will be prompted to activate Windows. * After installation, you will be prompted to activate Windows.