mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-16 02:56:09 -04:00
Try building SDL2 for Linux too
This commit is contained in:
parent
30d3fe47a8
commit
1732750da9
18
.github/workflows/build_linux.yml
vendored
18
.github/workflows/build_linux.yml
vendored
@ -25,7 +25,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
sudo dpkg --add-architecture i386
|
sudo dpkg --add-architecture i386
|
||||||
sudo apt-get -y update
|
sudo apt-get -y update
|
||||||
sudo apt-get -y install gcc-multilib libx11-dev:i386 libxi-dev:i386 libgl1-mesa-dev:i386
|
sudo apt-get -y install gcc-multilib libx11-dev:i386 libxi-dev:i386 libgl1-mesa-dev:i386 libsdl2-dev:i386
|
||||||
- name: Compile 32 bit Linux builds
|
- name: Compile 32 bit Linux builds
|
||||||
shell: bash
|
shell: bash
|
||||||
id: compile
|
id: compile
|
||||||
@ -38,6 +38,7 @@ jobs:
|
|||||||
cd src
|
cd src
|
||||||
gcc *.c ${{ env.COMMON_FLAGS }} ${{ env.NIX32_FLAGS }} $LATEST_FLAG -o cc-nix32-gl1 -lX11 -lXi -lpthread -lGL -lm -ldl
|
gcc *.c ${{ env.COMMON_FLAGS }} ${{ env.NIX32_FLAGS }} $LATEST_FLAG -o cc-nix32-gl1 -lX11 -lXi -lpthread -lGL -lm -ldl
|
||||||
gcc *.c ${{ env.COMMON_FLAGS }} ${{ env.NIX32_FLAGS }} $LATEST_FLAG -DCC_BUILD_GLMODERN -o cc-nix32-gl2 -lX11 -lXi -lpthread -lGL -lm -ldl
|
gcc *.c ${{ env.COMMON_FLAGS }} ${{ env.NIX32_FLAGS }} $LATEST_FLAG -DCC_BUILD_GLMODERN -o cc-nix32-gl2 -lX11 -lXi -lpthread -lGL -lm -ldl
|
||||||
|
gcc *.c ${{ env.COMMON_FLAGS }} ${{ env.NIX32_FLAGS }} $LATEST_FLAG -DCC_BUILD_GLMODERN -DCC_WIN_BACKEND=CC_WIN_BACKEND_SDL2 -o cc-sdl32-gl2 -lSDL2 -lpthread -lGL -lm -ldl
|
||||||
|
|
||||||
|
|
||||||
- uses: ./.github/actions/notify_failure
|
- uses: ./.github/actions/notify_failure
|
||||||
@ -59,6 +60,12 @@ jobs:
|
|||||||
SOURCE_FILE: 'src/cc-nix32-gl2'
|
SOURCE_FILE: 'src/cc-nix32-gl2'
|
||||||
DEST_NAME: 'ClassiCube-Linux32-ModernGL'
|
DEST_NAME: 'ClassiCube-Linux32-ModernGL'
|
||||||
|
|
||||||
|
- uses: ./.github/actions/upload_build
|
||||||
|
if: ${{ always() && steps.compile.outcome == 'success' }}
|
||||||
|
with:
|
||||||
|
SOURCE_FILE: 'src/cc-sdl32-gl2'
|
||||||
|
DEST_NAME: 'ClassiCube-Linux32-SDL2'
|
||||||
|
|
||||||
|
|
||||||
- uses: ./.github/actions/notify_success
|
- uses: ./.github/actions/notify_success
|
||||||
if: ${{ always() && steps.compile.outcome == 'success' }}
|
if: ${{ always() && steps.compile.outcome == 'success' }}
|
||||||
@ -80,12 +87,13 @@ jobs:
|
|||||||
COMMON_FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn"
|
COMMON_FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn"
|
||||||
NIX64_FLAGS: "-no-pie -fno-pie -m64 -fvisibility=hidden -fcf-protection=none -rdynamic -DCC_BUILD_ICON"
|
NIX64_FLAGS: "-no-pie -fno-pie -m64 -fvisibility=hidden -fcf-protection=none -rdynamic -DCC_BUILD_ICON"
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get -y install libx11-dev libxi-dev libgl1-mesa-dev
|
sudo apt-get -y install libx11-dev libxi-dev libgl1-mesa-dev libsdl2-dev
|
||||||
LATEST_FLAG=-DCC_COMMIT_SHA=\"$(git rev-parse --short "$GITHUB_SHA")\"
|
LATEST_FLAG=-DCC_COMMIT_SHA=\"$(git rev-parse --short "$GITHUB_SHA")\"
|
||||||
|
|
||||||
cd src
|
cd src
|
||||||
gcc *.c ${{ env.COMMON_FLAGS }} ${{ env.NIX64_FLAGS }} $LATEST_FLAG -o cc-nix64-gl1 -lX11 -lXi -lpthread -lGL -lm -ldl
|
gcc *.c ${{ env.COMMON_FLAGS }} ${{ env.NIX64_FLAGS }} $LATEST_FLAG -o cc-nix64-gl1 -lX11 -lXi -lpthread -lGL -lm -ldl
|
||||||
gcc *.c ${{ env.COMMON_FLAGS }} ${{ env.NIX64_FLAGS }} $LATEST_FLAG -DCC_BUILD_GLMODERN -o cc-nix64-gl2 -lX11 -lXi -lpthread -lGL -lm -ldl
|
gcc *.c ${{ env.COMMON_FLAGS }} ${{ env.NIX64_FLAGS }} $LATEST_FLAG -DCC_BUILD_GLMODERN -o cc-nix64-gl2 -lX11 -lXi -lpthread -lGL -lm -ldl
|
||||||
|
gcc *.c ${{ env.COMMON_FLAGS }} ${{ env.NIX64_FLAGS }} $LATEST_FLAG -DCC_BUILD_GLMODERN -DCC_WIN_BACKEND=CC_WIN_BACKEND_SDL2 -o cc-sdl64-gl2 -lSDL2 -lpthread -lGL -lm -ldl
|
||||||
|
|
||||||
|
|
||||||
- uses: ./.github/actions/notify_failure
|
- uses: ./.github/actions/notify_failure
|
||||||
@ -107,6 +115,12 @@ jobs:
|
|||||||
SOURCE_FILE: 'src/cc-nix64-gl2'
|
SOURCE_FILE: 'src/cc-nix64-gl2'
|
||||||
DEST_NAME: 'ClassiCube-Linux64-ModernGL'
|
DEST_NAME: 'ClassiCube-Linux64-ModernGL'
|
||||||
|
|
||||||
|
- uses: ./.github/actions/upload_build
|
||||||
|
if: ${{ always() && steps.compile.outcome == 'success' }}
|
||||||
|
with:
|
||||||
|
SOURCE_FILE: 'src/cc-sdl64-gl2'
|
||||||
|
DEST_NAME: 'ClassiCube-Linux64-SDL2'
|
||||||
|
|
||||||
|
|
||||||
- uses: ./.github/actions/notify_success
|
- uses: ./.github/actions/notify_success
|
||||||
if: ${{ always() && steps.compile.outcome == 'success' }}
|
if: ${{ always() && steps.compile.outcome == 'success' }}
|
||||||
|
@ -417,6 +417,9 @@ typedef cc_uint8 cc_bool;
|
|||||||
#if defined DEFAULT_WIN_BACKEND && !defined CC_WIN_BACKEND
|
#if defined DEFAULT_WIN_BACKEND && !defined CC_WIN_BACKEND
|
||||||
#define CC_WIN_BACKEND DEFAULT_WIN_BACKEND
|
#define CC_WIN_BACKEND DEFAULT_WIN_BACKEND
|
||||||
#endif
|
#endif
|
||||||
|
#if defined DEFAULT_GFX_BACKEND && !defined CC_GFX_BACKEND
|
||||||
|
#define CC_GFX_BACKEND DEFAULT_GFX_BACKEND
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CC_BUILD_CONSOLE
|
#ifdef CC_BUILD_CONSOLE
|
||||||
#undef CC_BUILD_FREETYPE
|
#undef CC_BUILD_FREETYPE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user