mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-08-05 19:57:06 -04:00
Attempt to fix macOS builds
This commit is contained in:
parent
1de9fa76f9
commit
3ca94e8a33
26
.github/workflows/build_mac32.yml
vendored
26
.github/workflows/build_mac32.yml
vendored
@ -22,38 +22,40 @@ jobs:
|
|||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Compile 32 bit macOS builds
|
- name: Compile 32 bit macOS builds
|
||||||
shell: bash
|
shell: bash
|
||||||
id: compile
|
id: compile
|
||||||
env:
|
env:
|
||||||
COMMON_FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn -fvisibility=hidden -rdynamic"
|
LIBS: "-framework Cocoa -framework OpenGL -framework IOKit -lobjc -lgcc_s.1"
|
||||||
|
SRCS: "src/*.c src/Window_cocoa.m third_party/bearssl/src/*.c"
|
||||||
|
COMMON_FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn -Ithird_party/bearssl/inc -fvisibility=hidden -rdynamic"
|
||||||
run: |
|
run: |
|
||||||
LATEST_FLAG=-DCC_COMMIT_SHA=\"${GITHUB_SHA::9}\"
|
LATEST_FLAG=-DCC_COMMIT_SHA=\"${GITHUB_SHA::9}\"
|
||||||
|
|
||||||
cd src
|
|
||||||
PATH=$PATH:/usr/local/compiler/target/bin
|
PATH=$PATH:/usr/local/compiler/target/bin
|
||||||
i386-apple-darwin8-clang *.c Window_cocoa.m ${{ env.COMMON_FLAGS }} $LATEST_FLAG -o cc-mac32-gl1 -framework Cocoa -framework OpenGL -framework IOKit -lobjc -lgcc_s.1
|
i386-apple-darwin8-clang ${{ env.SRCS }} ${{ env.COMMON_FLAGS }} $LATEST_FLAG -o cc-mac32-gl1 ${{ env.LIBS }}
|
||||||
i386-apple-darwin8-clang *.c Window_cocoa.m ${{ env.COMMON_FLAGS }} $LATEST_FLAG -DCC_GFX_BACKEND=CC_GFX_BACKEND_GL2 -o cc-mac32-gl2 -framework Cocoa -framework OpenGL -framework IOKit -lobjc -lgcc_s.1
|
i386-apple-darwin8-clang ${{ env.SRCS }} ${{ env.COMMON_FLAGS }} $LATEST_FLAG -DCC_GFX_BACKEND=CC_GFX_BACKEND_GL2 -o cc-mac32-gl2 ${{ env.LIBS }}
|
||||||
|
|
||||||
- name: Compile 32 bit macOS builds (PowerPC)
|
- name: Compile 32 bit macOS builds (PowerPC)
|
||||||
shell: bash
|
shell: bash
|
||||||
id: compile_ppc
|
id: compile_ppc
|
||||||
env:
|
env:
|
||||||
COMMON_FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn -fvisibility=hidden -static-libgcc -Wl,-no_compact_unwind -DCC_BUILD_ICON -isystem /usr/local/compiler/ppc/target/SDK/MacOSX10.5.sdk -Wl,-syslibroot /usr/local/compiler/ppc/target/SDK/MacOSX10.5.sdk"
|
LIBS: "-framework Cocoa -framework OpenGL -framework IOKit -lobjc"
|
||||||
|
SRCS: "src/*.c src/Window_cocoa.m third_party/bearssl/src/*.c"
|
||||||
|
COMMON_FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn -Ithird_party/bearssl/inc -fvisibility=hidden -static-libgcc -Wl,-no_compact_unwind -isystem /usr/local/compiler/ppc/target/SDK/MacOSX10.5.sdk -Wl,-syslibroot /usr/local/compiler/ppc/target/SDK/MacOSX10.5.sdk"
|
||||||
run: |
|
run: |
|
||||||
LATEST_FLAG=-DCC_COMMIT_SHA=\"${GITHUB_SHA::9}\"
|
LATEST_FLAG=-DCC_COMMIT_SHA=\"${GITHUB_SHA::9}\"
|
||||||
|
|
||||||
mkdir -p /home/minty/repos/osxcross-ppc-test/target/bin
|
mkdir -p /home/minty/repos/osxcross-ppc-test/target/bin
|
||||||
ln -s /usr/local/compiler/ppc/target/bin/powerpc64-apple-darwin9-as /home/minty/repos/osxcross-ppc-test/target/bin/powerpc64-apple-darwin9-as
|
ln -s /usr/local/compiler/ppc/target/bin/powerpc64-apple-darwin9-as /home/minty/repos/osxcross-ppc-test/target/bin/powerpc64-apple-darwin9-as
|
||||||
cd src
|
|
||||||
PATH=$PATH:/usr/local/compiler/ppc/target/bin
|
PATH=$PATH:/usr/local/compiler/ppc/target/bin
|
||||||
powerpc-apple-darwin9-base-gcc *.c Window_cocoa.m ${{ env.COMMON_FLAGS }} $LATEST_FLAG -o cc-mac32-ppc -mmacosx-version-min=10.2.0 -m32 -framework Cocoa -framework OpenGL -framework IOKit -lobjc
|
powerpc-apple-darwin9-base-gcc *${{ env.SRCS }} ${{ env.COMMON_FLAGS }} $LATEST_FLAG -o cc-mac32-ppc -mmacosx-version-min=10.2.0 -m32 ${{ env.LIBS }}
|
||||||
|
|
||||||
- name: Generate combined Intel + PowerPC build
|
- name: Generate combined Intel + PowerPC build
|
||||||
shell: bash
|
shell: bash
|
||||||
id: gen_universal
|
id: gen_universal
|
||||||
run: |
|
run: |
|
||||||
cd src
|
|
||||||
PATH=$PATH:/usr/local/compiler/target/bin
|
PATH=$PATH:/usr/local/compiler/target/bin
|
||||||
i386-apple-darwin8-lipo -create -output cc-mac32-universal cc-mac32-gl1 cc-mac32-ppc
|
i386-apple-darwin8-lipo -create -output cc-mac32-universal cc-mac32-gl1 cc-mac32-ppc
|
||||||
|
|
||||||
@ -67,25 +69,25 @@ jobs:
|
|||||||
- uses: ./.github/actions/upload_build
|
- uses: ./.github/actions/upload_build
|
||||||
if: ${{ always() && steps.compile.outcome == 'success' }}
|
if: ${{ always() && steps.compile.outcome == 'success' }}
|
||||||
with:
|
with:
|
||||||
SOURCE_FILE: 'src/cc-mac32-gl1'
|
SOURCE_FILE: 'cc-mac32-gl1'
|
||||||
DEST_NAME: 'ClassiCube-mac32-OpenGL'
|
DEST_NAME: 'ClassiCube-mac32-OpenGL'
|
||||||
|
|
||||||
- uses: ./.github/actions/upload_build
|
- uses: ./.github/actions/upload_build
|
||||||
if: ${{ always() && steps.compile.outcome == 'success' }}
|
if: ${{ always() && steps.compile.outcome == 'success' }}
|
||||||
with:
|
with:
|
||||||
SOURCE_FILE: 'src/cc-mac32-gl2'
|
SOURCE_FILE: 'cc-mac32-gl2'
|
||||||
DEST_NAME: 'ClassiCube-mac32-ModernGL'
|
DEST_NAME: 'ClassiCube-mac32-ModernGL'
|
||||||
|
|
||||||
- uses: ./.github/actions/upload_build
|
- uses: ./.github/actions/upload_build
|
||||||
if: ${{ always() && steps.compile_ppc.outcome == 'success' }}
|
if: ${{ always() && steps.compile_ppc.outcome == 'success' }}
|
||||||
with:
|
with:
|
||||||
SOURCE_FILE: 'src/cc-mac32-ppc'
|
SOURCE_FILE: 'cc-mac32-ppc'
|
||||||
DEST_NAME: 'ClassiCube-mac32-PPC'
|
DEST_NAME: 'ClassiCube-mac32-PPC'
|
||||||
|
|
||||||
- uses: ./.github/actions/upload_build
|
- uses: ./.github/actions/upload_build
|
||||||
if: ${{ always() && steps.gen_universal.outcome == 'success' }}
|
if: ${{ always() && steps.gen_universal.outcome == 'success' }}
|
||||||
with:
|
with:
|
||||||
SOURCE_FILE: 'src/cc-mac32-universal'
|
SOURCE_FILE: 'cc-mac32-universal'
|
||||||
DEST_NAME: 'ClassiCube-mac32'
|
DEST_NAME: 'ClassiCube-mac32'
|
||||||
|
|
||||||
|
|
||||||
|
21
.github/workflows/build_mac64.yml
vendored
21
.github/workflows/build_mac64.yml
vendored
@ -23,17 +23,18 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
id: compile
|
id: compile
|
||||||
env:
|
env:
|
||||||
COMMON_FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn"
|
LIBS: "-framework Cocoa -framework OpenGL -framework IOKit -lobjc"
|
||||||
MAC_ARM64_FLAGS: "-fvisibility=hidden -rdynamic -DCC_GFX_BACKEND=CC_GFX_BACKEND_GL2 -arch arm64"
|
SRCS: "src/*.c src/Window_cocoa.m third_party/bearssl/src/*.c"
|
||||||
MAC_INTEL64_FLAGS: "-fvisibility=hidden -rdynamic -arch x86_64"
|
COMMON_FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn -Ithird_party/bearssl/inc"
|
||||||
|
ARM64_FLAGS: "-fvisibility=hidden -rdynamic -DCC_GFX_BACKEND=CC_GFX_BACKEND_GL2 -arch arm64"
|
||||||
|
INTEL64_FLAGS: "-fvisibility=hidden -rdynamic -arch x86_64"
|
||||||
run: |
|
run: |
|
||||||
LATEST_FLAG=-DCC_COMMIT_SHA=\"$(git rev-parse --short "$GITHUB_SHA")\"
|
LATEST_FLAG=-DCC_COMMIT_SHA=\"$(git rev-parse --short "$GITHUB_SHA")\"
|
||||||
cd src
|
|
||||||
|
|
||||||
MACOSX_DEPLOYMENT_TARGET=10.5 clang *.c Window_cocoa.m ${{ env.COMMON_FLAGS }} ${{ env.MAC_INTEL64_FLAGS }} $LATEST_FLAG -o cc-mac64-gl1 -framework Cocoa -framework OpenGL -framework IOKit -lobjc
|
MACOSX_DEPLOYMENT_TARGET=10.5 clang ${{ env.SRCS }} ${{ env.COMMON_FLAGS }} ${{ env.INTEL64_FLAGS }} $LATEST_FLAG -o cc-mac64-gl1 ${{ env.LIBS }}
|
||||||
MACOSX_DEPLOYMENT_TARGET=10.5 clang *.c Window_cocoa.m ${{ env.COMMON_FLAGS }} ${{ env.MAC_INTEL64_FLAGS }} $LATEST_FLAG -DCC_GFX_BACKEND=CC_GFX_BACKEND_GL2 -o cc-mac64-gl2 -framework Cocoa -framework OpenGL -framework IOKit -lobjc
|
MACOSX_DEPLOYMENT_TARGET=10.5 clang ${{ env.SRCS }} ${{ env.COMMON_FLAGS }} ${{ env.INTEL64_FLAGS }} $LATEST_FLAG -DCC_GFX_BACKEND=CC_GFX_BACKEND_GL2 -o cc-mac64-gl2 ${{ env.LIBS }}
|
||||||
|
|
||||||
clang *.c Window_cocoa.m ${{ env.COMMON_FLAGS }} ${{ env.MAC_ARM64_FLAGS }} $LATEST_FLAG -o cc-mac-arm64 -framework Cocoa -framework OpenGL -framework IOKit -lobjc
|
clang ${{ env.SRCS }} ${{ env.COMMON_FLAGS }} ${{ env.ARM64_FLAGS }} $LATEST_FLAG -o cc-mac-arm64 ${{ env.LIBS }}
|
||||||
# https://wiki.freepascal.org/Code_Signing_for_macOS#Ad_hoc_signing
|
# https://wiki.freepascal.org/Code_Signing_for_macOS#Ad_hoc_signing
|
||||||
|
|
||||||
- uses: ./.github/actions/notify_failure
|
- uses: ./.github/actions/notify_failure
|
||||||
@ -46,19 +47,19 @@ jobs:
|
|||||||
- uses: ./.github/actions/upload_build
|
- uses: ./.github/actions/upload_build
|
||||||
if: ${{ always() && steps.compile.outcome == 'success' }}
|
if: ${{ always() && steps.compile.outcome == 'success' }}
|
||||||
with:
|
with:
|
||||||
SOURCE_FILE: 'src/cc-mac64-gl1'
|
SOURCE_FILE: 'cc-mac64-gl1'
|
||||||
DEST_NAME: 'ClassiCube-mac64-OpenGL'
|
DEST_NAME: 'ClassiCube-mac64-OpenGL'
|
||||||
|
|
||||||
- uses: ./.github/actions/upload_build
|
- uses: ./.github/actions/upload_build
|
||||||
if: ${{ always() && steps.compile.outcome == 'success' }}
|
if: ${{ always() && steps.compile.outcome == 'success' }}
|
||||||
with:
|
with:
|
||||||
SOURCE_FILE: 'src/cc-mac64-gl2'
|
SOURCE_FILE: 'cc-mac64-gl2'
|
||||||
DEST_NAME: 'ClassiCube-mac64-ModernGL'
|
DEST_NAME: 'ClassiCube-mac64-ModernGL'
|
||||||
|
|
||||||
- uses: ./.github/actions/upload_build
|
- uses: ./.github/actions/upload_build
|
||||||
if: ${{ always() && steps.compile.outcome == 'success' }}
|
if: ${{ always() && steps.compile.outcome == 'success' }}
|
||||||
with:
|
with:
|
||||||
SOURCE_FILE: 'src/cc-mac-arm64'
|
SOURCE_FILE: 'cc-mac-arm64'
|
||||||
DEST_NAME: 'ClassiCube-mac-ARM64'
|
DEST_NAME: 'ClassiCube-mac-ARM64'
|
||||||
|
|
||||||
|
|
||||||
|
4
.github/workflows/build_rpi.yml
vendored
4
.github/workflows/build_rpi.yml
vendored
@ -53,7 +53,7 @@ jobs:
|
|||||||
- uses: ./.github/actions/upload_build
|
- uses: ./.github/actions/upload_build
|
||||||
if: ${{ always() && steps.compile.outcome == 'success' }}
|
if: ${{ always() && steps.compile.outcome == 'success' }}
|
||||||
with:
|
with:
|
||||||
SOURCE_FILE: 'src/cc-rpi32'
|
SOURCE_FILE: 'cc-rpi32'
|
||||||
DEST_NAME: 'cc-rpi32'
|
DEST_NAME: 'cc-rpi32'
|
||||||
|
|
||||||
|
|
||||||
@ -105,7 +105,7 @@ jobs:
|
|||||||
- uses: ./.github/actions/upload_build
|
- uses: ./.github/actions/upload_build
|
||||||
if: ${{ always() && steps.compile.outcome == 'success' }}
|
if: ${{ always() && steps.compile.outcome == 'success' }}
|
||||||
with:
|
with:
|
||||||
SOURCE_FILE: 'src/cc-rpi64'
|
SOURCE_FILE: 'cc-rpi64'
|
||||||
DEST_NAME: 'cc-rpi64'
|
DEST_NAME: 'cc-rpi64'
|
||||||
|
|
||||||
|
|
||||||
|
1
Makefile
1
Makefile
@ -96,6 +96,7 @@ ifeq ($(PLAT),darwin)
|
|||||||
LDFLAGS = -rdynamic -framework Cocoa -framework OpenGL -framework IOKit -lobjc
|
LDFLAGS = -rdynamic -framework Cocoa -framework OpenGL -framework IOKit -lobjc
|
||||||
BUILD_DIR = build/macos
|
BUILD_DIR = build/macos
|
||||||
TARGET = $(ENAME).app
|
TARGET = $(ENAME).app
|
||||||
|
BEARSSL = 1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(PLAT),freebsd)
|
ifeq ($(PLAT),freebsd)
|
||||||
|
@ -82,7 +82,6 @@ HTTP, HTTPS, and setting request/getting response headers
|
|||||||
|
|
||||||
Define:
|
Define:
|
||||||
- ```DEFAULT_NET_BACKEND CC_NET_BACKEND_BUILTIN``` - use built in simple HTTP backend
|
- ```DEFAULT_NET_BACKEND CC_NET_BACKEND_BUILTIN``` - use built in simple HTTP backend
|
||||||
- ```DEFAULT_NET_BACKEND CC_NET_BACKEND_LIBCURL``` - use libcurl for HTTP
|
|
||||||
|
|
||||||
Supporting connection reuse is highly recommended. (but not required)
|
Supporting connection reuse is highly recommended. (but not required)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user