mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-07-05 22:50:23 +00:00
MacOS build
This commit is contained in:
parent
214ad7d089
commit
5200bcb23e
|
@ -1,25 +1,38 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
OS=$1
|
||||||
|
|
||||||
com_build() {
|
com_build() {
|
||||||
cd internal/c/$1/os/lnx
|
cd internal/c/$1/os/$OS
|
||||||
echo -n "Building $2..."
|
echo -n "Building $2..."
|
||||||
./setup_build.sh
|
if [[ $OS == "osx" ]]; then
|
||||||
if [ $? -ne 0 ]; then
|
./setup_build.command
|
||||||
echo "$2 build failed."
|
else
|
||||||
exit 1
|
./setup_build.sh
|
||||||
fi
|
fi
|
||||||
echo "Done"
|
if [ $? -ne 0 ]; then
|
||||||
cd - > /dev/null
|
echo "$2 build failed."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "Done"
|
||||||
|
cd - > /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
com_build "libqb" "libQB"
|
com_build "libqb" "libQB"
|
||||||
com_build "parts/video/font/ttf" "FreeType"
|
com_build "parts/video/font/ttf" "FreeType"
|
||||||
com_build "parts/core" "FreeGLUT"
|
if [[ $OS == "lnx" ]]; then
|
||||||
|
com_build "parts/core" "FreeGLUT"
|
||||||
|
fi
|
||||||
|
|
||||||
cp -r internal/source/* internal/temp/
|
cp -r internal/source/* internal/temp/
|
||||||
cd internal/c
|
cd internal/c
|
||||||
echo -n "Bootstrapping QB64..."
|
echo -n "Bootstrapping QB64..."
|
||||||
g++ -w qbx.cpp libqb/os/lnx/libqb_setup.o parts/video/font/ttf/os/lnx/src.o parts/core/os/lnx/src.a -lGL -lGLU -lX11 -lcurses -lpthread -ldl -lrt -D FREEGLUT_STATIC -DDEPENDENCY_USER_MODS -o ../../qb64_bootstrap
|
if [[ $OS == "osx" ]]; then
|
||||||
|
g++ -w qbx.cpp libqb/os/osx/libqb_setup.o parts/video/font/ttf/os/osx/src.o -framework GLUT -framework OpenGL -framework Cocoa -lcurses -o ../../qb64_bootstrap
|
||||||
|
else
|
||||||
|
g++ -w qbx.cpp libqb/os/lnx/libqb_setup.o parts/video/font/ttf/os/lnx/src.o parts/core/os/lnx/src.a -lGL -lGLU -lX11 -lcurses -lpthread -ldl -lrt -D FREEGLUT_STATIC -DDEPENDENCY_USER_MODS -o ../../qb64_bootstrap
|
||||||
|
fi
|
||||||
|
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "QB64 bootstrap failed"
|
echo "QB64 bootstrap failed"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
33
.github/workflows/run.yml
vendored
33
.github/workflows/run.yml
vendored
|
@ -1,40 +1,15 @@
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- development
|
- githubactions
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
macos-build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: macos-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Install dependencies
|
|
||||||
run: sudo apt update && sudo apt install libglu1-mesa-dev libncurses-dev
|
|
||||||
- name: Bootstrap compiler
|
- name: Bootstrap compiler
|
||||||
run: .ci/bootstrap.sh
|
run: .ci/bootstrap.sh osx
|
||||||
- name: Compile
|
- name: Compile
|
||||||
run: .ci/compile.sh
|
run: .ci/compile.sh
|
||||||
- name: Update source
|
|
||||||
if: github.event_name == 'push'
|
|
||||||
run: .ci/update-source.sh
|
|
||||||
- name: Push to repository
|
|
||||||
if: github.event_name == 'push'
|
|
||||||
uses: ad-m/github-push-action@19caa5c351f47734055690f7d01aaaef2f9114d5
|
|
||||||
with:
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
branch: githubactions
|
|
||||||
- name: Set deployment SSH key
|
|
||||||
if: github.event_name == 'push'
|
|
||||||
uses: shimataro/ssh-key-action@v1
|
|
||||||
with:
|
|
||||||
private-key: ${{ secrets.SSH_KEY }}
|
|
||||||
public-key: ${{ secrets.SSH_KEY_PUBLIC }}
|
|
||||||
known-hosts: "qb64.org ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAtmlTks7NPQHwvQiW+P2P8voWXfwYD+EuU39ERiaVw5g/lG/6pU1SKdrRBg2AtaPToPgK/nQyaid3sO2aWO00ixiKB3JPJoVp3nRY8YFi/AtVtVot/xh6+39fjP59tMCnMCbXTKjyMWL0kkwzd+OT8wryRZ/EgjK3vk9UGYzxKSr8G/KKV3GBDrJOdpHT2gNUcDFg6HSMvM860ZOF8n6jKRwp7MM0SpptufuQDgj/LhHcqQtFOqkhW9HXNmZR7IPchb5tsUubbPdSLu043B0ir2x5sCkK9V+inZExPg7KwIZ0yRsSv5esgLaBdyf1UToU3LU4ZM1hWjcJsp2fCBRkhw=="
|
|
||||||
config: |
|
|
||||||
Host remote-server
|
|
||||||
HostName qb64.org
|
|
||||||
User m6rosupy1q2t
|
|
||||||
- name: Package and deploy
|
|
||||||
if: github.event_name == 'push'
|
|
||||||
run: .ci/deploy.sh
|
|
||||||
|
|
Loading…
Reference in a new issue