Skip to content

Commit

Permalink
Statically link SDL2
Browse files Browse the repository at this point in the history
  • Loading branch information
nick f authored and nick f committed Dec 11, 2023
1 parent fc3a82c commit 61a60cb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,16 @@ jobs:
if: matrix.name == 'Mac'
run: |
brew install --cask lazarus
brew install sdl2 rgbds
brew install rgbds
curl -Lo 'sdl2.tgz' https://github.com/libsdl-org/SDL/archive/refs/tags/release-2.28.5.tar.gz
tar xzf sdl2.tgz
pushd SDL-release-2.28.5
./configure --disable-video --disable-render --disable-haptic --disable-joystick --disable-power --disable-hidapi --disable-sensor --disable-filesystem --disable-timers
make
cp build/.libs/libSDL2.a /usr/local/lib
popd
mkdir rgbds
for f in asm link fix; do ln -s `which rgb$f` rgbds/rgb$f; done
Expand All @@ -51,7 +60,7 @@ jobs:
shell: bash
run: |
choco install lazarus
curl -Lo 'sdl2.zip' 'https://github.com/libsdl-org/SDL/releases/download/release-2.26.2/SDL2-2.26.2-win32-x64.zip'
curl -Lo 'sdl2.zip' 'https://github.com/libsdl-org/SDL/releases/download/release-2.28.5/SDL2-2.28.5-win32-x64.zip'
curl -Lo 'rgbds.zip' 'https://github.com/gbdev/rgbds/releases/download/v0.6.1/rgbds-0.6.1-win64.zip'
unzip -d rgbds rgbds.zip rgb{asm,link,fix}.exe
Expand Down
4 changes: 3 additions & 1 deletion src/hUGETracker.lpr
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
{$MODE Delphi}

{$ifdef DARWIN}
{$linklib SDL2}
{$link /usr/local/lib/libSDL2.a}
{$linkframework CoreAudio}
{$linkframework AudioToolbox}
{$endif}

uses
Expand Down

0 comments on commit 61a60cb

Please sign in to comment.