2 Commits

Author SHA1 Message Date
TheTank20
6b85771db1 Static OpenSSL for macOS (#127) 2025-07-03 13:03:11 -05:00
TheTank20
8db1fe25d7 Make UMSKT (mostly) static on macOS (#126) 2025-07-03 12:11:00 -05:00
4 changed files with 26 additions and 9 deletions

View File

@@ -68,11 +68,17 @@ jobs:
- name: Configure and build UMSKT
run: |
cd build
cmake -DCMAKE_BUILD_TYPE=Release .. -DCMAKE_OSX_ARCHITECTURES=${{matrix.arch}} -DOPENSSL_ROOT_DIR=$OPENSSL_ROOT_DIR -DOPENSSL_INCLUDE_DIR=$OPENSSL_INCLUDE_DIR
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
- name: Move files to correct directory
run: |
ls -a build
mkdir -p build/actions_upload
mv build/umskt build/actions_upload/umskt
@@ -111,4 +117,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: UMSKT-macOS-universal
path: fat/umskt
path: fat

10
.pre-commit-config.yaml Normal file
View File

@@ -0,0 +1,10 @@
# 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_DIRS ${UMSKT_LINK_DIRS})
# macOS does not support static build
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
SET(UMSKT_USE_SHARED_OPENSSL ON)
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-dead_strip")
endif()
# 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")
ENDIF()
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
SET(BUILD_SHARED_LIBS ON)
MESSAGE(STATUS "[UMSKT] macOS has no static library - Shared library forced on")
endif()
##if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
## SET(BUILD_SHARED_LIBS ON)
## MESSAGE(STATUS "[UMSKT] macOS has no static library - Shared library forced on")
##endif()
# if we're compiling with MSVC, respect the DEBUG compile option
IF(MSVC)
@@ -167,6 +167,7 @@ CPMAddPackage(
GITHUB_REPOSITORY fmtlib/fmt
GIT_TAG 10.0.0
VERSION 10.0.0
#OPTIONS "FMT_INSTALL YES" "BUILD_SHARED_LIBS OFF"
)
# 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.*
#### 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)*
* After installation, you will be prompted to activate Windows.