mirror of https://github.com/WerWolv/ImHex
git: Added NoGPU dmg for MacOS (#708)
This commit is contained in:
parent
6689b8ebfa
commit
0569770239
|
|
@ -118,20 +118,33 @@ jobs:
|
||||||
# MacOS build
|
# MacOS build
|
||||||
macos:
|
macos:
|
||||||
runs-on: macos-11
|
runs-on: macos-11
|
||||||
name: 🍎 macOS 11.0
|
|
||||||
steps:
|
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- suffix: "-NoGPU"
|
||||||
|
custom_glfw: true
|
||||||
|
- suffix: ""
|
||||||
|
custom_glfw: false
|
||||||
|
|
||||||
|
name: 🍎 macOS 11.0${{matrix.suffix}}
|
||||||
|
|
||||||
|
steps:
|
||||||
- name: 🧰 Checkout
|
- name: 🧰 Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: 📜 Set version variable
|
||||||
|
run: |
|
||||||
|
echo "IMHEX_VERSION=`cat VERSION`" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: 📜 Restore ccache
|
- name: 📜 Restore ccache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/Library/Caches/ccache
|
~/Library/Caches/ccache
|
||||||
key: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-${{ github.run_id }}
|
key: ${{ runner.os }}-${{ matrix.suffix }}-${{ secrets.CACHE_VERSION }}-build-${{ github.run_id }}
|
||||||
restore-keys: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build
|
restore-keys: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -140,12 +153,43 @@ jobs:
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
build/CMakeCache.txt
|
build/CMakeCache.txt
|
||||||
key: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-${{ hashFiles('**/CMakeLists.txt') }}
|
key: ${{ runner.os }}-${{ matrix.suffix }}-${{ secrets.CACHE_VERSION }}-build-${{ hashFiles('**/CMakeLists.txt') }}
|
||||||
|
|
||||||
- name: ⬇️ Install dependencies
|
- name: ⬇️ Install dependencies
|
||||||
run: |
|
run: |
|
||||||
brew bundle --no-lock --file dist/Brewfile
|
brew bundle --no-lock --file dist/Brewfile
|
||||||
|
|
||||||
|
- name: ⬇️ Install classic glfw
|
||||||
|
if: ${{! matrix.custom_glfw}}
|
||||||
|
run: |
|
||||||
|
brew install glfw
|
||||||
|
|
||||||
|
|
||||||
|
- name: 🧰 Checkout glfw
|
||||||
|
if: ${{matrix.custom_glfw}}
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
repository: glfw/glfw
|
||||||
|
path: glfw
|
||||||
|
|
||||||
|
- name: ⬇️ Patch and install custom glfw
|
||||||
|
if: ${{matrix.custom_glfw}}
|
||||||
|
run: |
|
||||||
|
cd glfw
|
||||||
|
git apply ../dist/macOS/0001-glfw-SW.patch
|
||||||
|
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
|
||||||
|
cmake \
|
||||||
|
-DBUILD_SHARED_LIBS=ON \
|
||||||
|
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||||
|
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||||
|
-DCMAKE_OBJC_COMPILER_LAUNCHER=ccache \
|
||||||
|
-DCMAKE_OBJCXX_COMPILER_LAUNCHER=ccache \
|
||||||
|
..
|
||||||
|
make -j 4 install
|
||||||
|
|
||||||
# MacOS cmake build
|
# MacOS cmake build
|
||||||
- name: 🛠️ Build
|
- name: 🛠️ Build
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -167,13 +211,14 @@ jobs:
|
||||||
-DCMAKE_OBJCXX_COMPILER_LAUNCHER=ccache \
|
-DCMAKE_OBJCXX_COMPILER_LAUNCHER=ccache \
|
||||||
-DIMHEX_PATTERNS_PULL_MASTER=ON \
|
-DIMHEX_PATTERNS_PULL_MASTER=ON \
|
||||||
-DCMAKE_OSX_DEPLOYMENT_TARGET="10.10" \
|
-DCMAKE_OSX_DEPLOYMENT_TARGET="10.10" \
|
||||||
|
-DCPACK_PACKAGE_FILE_NAME="imhex-${{env.IMHEX_VERSION}}-macOS${{matrix.suffix}}" \
|
||||||
..
|
..
|
||||||
make -j4 package
|
make -j4 package
|
||||||
|
|
||||||
- name: ⬆️ Upload DMG
|
- name: ⬆️ Upload DMG
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: macOS DMG
|
name: macOS DMG${{matrix.suffix}}
|
||||||
path: build/*.dmg
|
path: build/*.dmg
|
||||||
|
|
||||||
# Ubuntu build
|
# Ubuntu build
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
brew "glfw"
|
|
||||||
brew "mbedtls"
|
brew "mbedtls"
|
||||||
brew "nlohmann-json"
|
brew "nlohmann-json"
|
||||||
brew "cmake"
|
brew "cmake"
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
From 9c8665af4c2e2ce66555c15c05c72027bfdf0cb6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: iTrooz <itrooz@protonmail.com>
|
||||||
|
Date: Mon, 29 Aug 2022 17:29:38 +0200
|
||||||
|
Subject: [PATCH] Use software rendering on MacOS
|
||||||
|
|
||||||
|
---
|
||||||
|
src/nsgl_context.m | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/nsgl_context.m b/src/nsgl_context.m
|
||||||
|
index fc1f7521..e5906575 100644
|
||||||
|
--- a/src/nsgl_context.m
|
||||||
|
+++ b/src/nsgl_context.m
|
||||||
|
@@ -198,7 +198,7 @@ GLFWbool _glfwCreateContextNSGL(_GLFWwindow* window,
|
||||||
|
NSOpenGLPixelFormatAttribute attribs[40];
|
||||||
|
int index = 0;
|
||||||
|
|
||||||
|
- ADD_ATTRIB(NSOpenGLPFAAccelerated);
|
||||||
|
+ ADD_ATTRIB(NSOpenGLPFARendererID);ADD_ATTRIB(kCGLRendererGenericFloatID);
|
||||||
|
ADD_ATTRIB(NSOpenGLPFAClosestPolicy);
|
||||||
|
|
||||||
|
if (ctxconfig->nsgl.offline)
|
||||||
|
--
|
||||||
|
2.37.2
|
||||||
|
|
||||||
Loading…
Reference in New Issue