Skip to content

Commit 60cda02

Browse files
committed
fix ubuntu build
1 parent 10d5881 commit 60cda02

2 files changed

Lines changed: 41 additions & 8 deletions

File tree

.github/workflows/build-ubuntu.yml

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,42 @@ on:
88

99
jobs:
1010
ubuntu:
11-
runs-on: ubuntu-24.04
11+
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v4
1414
with:
1515
submodules: recursive
1616

17-
- name: Install dependencies
17+
- name: Install build tools
18+
run: >-
19+
sudo apt-get update --allow-releaseinfo-change &&
20+
sudo apt-get install -y
21+
cmake ninja-build build-essential git pkg-config
22+
qt6-base-dev
23+
libasound2-dev libpulse-dev libudev-dev libx11-dev libxext-dev
24+
libxrandr-dev libxcursor-dev libxi-dev libxss-dev libxtst-dev
25+
libwayland-dev libxkbcommon-dev libdrm-dev libgbm-dev
26+
libegl1-mesa-dev libgl1-mesa-dev
27+
libflac-dev libogg-dev libvorbis-dev libmpg123-dev libopusfile-dev
28+
libxmp-dev
29+
30+
- name: Build SDL3
31+
run: |
32+
mkdir -p /tmp/sdl3
33+
cd /tmp/sdl3
34+
git clone --depth 1 --branch release-3.4.0 https://github.com/libsdl-org/SDL.git
35+
cmake -S SDL -B SDL/build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local
36+
cmake --build SDL/build
37+
sudo cmake --install SDL/build
38+
39+
- name: Build SDL3_mixer
1840
run: |
19-
sudo apt-get update
20-
sudo apt-get install -y cmake ninja-build qt6-base-dev libsdl3-dev libsdl3-mixer-dev
41+
mkdir -p /tmp/sdl3
42+
cd /tmp/sdl3
43+
git clone --depth 1 https://github.com/libsdl-org/SDL_mixer.git
44+
cmake -S SDL_mixer -B SDL_mixer/build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DSDLMIXER_VENDORED=OFF -DSDLMIXER_MOD_XMP=ON -DSDLMIXER_MOD_XMP_LITE=OFF -DSDLMIXER_MOD_XMP_SHARED=OFF
45+
cmake --build SDL_mixer/build
46+
sudo cmake --install SDL_mixer/build
2147
2248
- name: Configure
2349
run: cmake -S . -B build -G Ninja

README.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,17 @@ Windows (Visual Studio + vcpkg):
1414
2. The output is placed in `Run\` (exe + required DLLs/plugins).
1515

1616
Linux (Ubuntu/Debian):
17-
1. Install deps: `sudo apt-get install cmake ninja-build qt6-base-dev libsdl3-dev libsdl3-mixer-dev`
18-
(If SDL3 packages are unavailable, build/install SDL3 + SDL3_mixer from source.)
19-
2. Configure: `cmake -S . -B build -G Ninja`
20-
3. Build: `cmake --build build`
17+
1. Install deps: `sudo apt-get install cmake ninja-build qt6-base-dev build-essential git pkg-config`
18+
2. If SDL3 packages are available: `sudo apt-get install libsdl3-dev libsdl3-mixer-dev`
19+
3. If SDL3 packages are not available, build from source:
20+
- `git clone https://github.com/libsdl-org/SDL.git`
21+
- `cmake -S SDL -B SDL/build -G Ninja -DSDL_SHARED=ON -DSDL_STATIC=OFF -DSDL_TESTS=OFF`
22+
- `sudo cmake --install SDL/build`
23+
- `git clone https://github.com/libsdl-org/SDL_mixer.git`
24+
- `cmake -S SDL_mixer -B SDL_mixer/build -G Ninja -DSDLMIXER_VENDORED=ON -DSDLMIXER_SHARED=ON -DSDLMIXER_STATIC=OFF -DSDLMIXER_TESTS=OFF`
25+
- `sudo cmake --install SDL_mixer/build`
26+
4. Configure: `cmake -S . -B build -G Ninja`
27+
5. Build: `cmake --build build`
2128

2229
Notes:
2330
* Dependencies are fetched with vcpkg via `Project\build_vs.cmd`.

0 commit comments

Comments
 (0)