Skip to content

Commit 10d5881

Browse files
committed
improve build instructions,
add ubuntu build
1 parent 7d0de83 commit 10d5881

4 files changed

Lines changed: 53 additions & 4 deletions

File tree

.github/workflows/build-ubuntu.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: build-ubuntu
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
ubuntu:
11+
runs-on: ubuntu-24.04
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
submodules: recursive
16+
17+
- name: Install dependencies
18+
run: |
19+
sudo apt-get update
20+
sudo apt-get install -y cmake ninja-build qt6-base-dev libsdl3-dev libsdl3-mixer-dev
21+
22+
- name: Configure
23+
run: cmake -S . -B build -G Ninja
24+
25+
- name: Build
26+
run: cmake --build build

.github/workflows/build.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,14 @@ jobs:
2727
- name: Build (Release x64)
2828
shell: pwsh
2929
run: |
30+
if (Test-Path Run) { Remove-Item Run -Recurse -Force }
3031
.\Project\build_vs.cmd x64 Release
3132
33+
- name: List Run contents
34+
shell: pwsh
35+
run: |
36+
Get-ChildItem -Path Run -File | Format-Table Name, Length
37+
3238
- name: Package build
3339
shell: pwsh
3440
run: |

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,12 @@ if(WIN32)
317317
COMMENT "Copy runtime DLLs to Run")
318318
endif()
319319

320+
add_custom_command(TARGET editor POST_BUILD
321+
COMMAND ${CMAKE_COMMAND} -E copy_if_different
322+
"${CMAKE_CURRENT_LIST_DIR}/Dependencies/OpenFodder/openfodder.ini.example"
323+
"${CMAKE_CURRENT_LIST_DIR}/Run/openfodder.ini"
324+
COMMENT "Copy openfodder.ini into Run")
325+
320326
if(TARGET Qt6::qmake)
321327
get_target_property(_qt6_qmake Qt6::qmake IMPORTED_LOCATION)
322328
get_filename_component(_qt6_bin_dir "${_qt6_qmake}" DIRECTORY)

README.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Open Fodder Editor
2-
[![Build Status](https://travis-ci.com/OpenFodder/editor.svg?branch=master)](https://travis-ci.com/OpenFodder/editor)
2+
[![build](https://github.com/OpenFodder/editor/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/OpenFodder/editor/actions/workflows/build.yml)
33

44
![ofed](https://user-images.githubusercontent.com/1327406/47386538-9dd6e400-d758-11e8-90ab-127d81909407.png)
55

@@ -9,9 +9,20 @@ Open Fodder Editor is a campaign and map editor for [Open Fodder](https://github
99

1010
#### To Compile
1111

12-
* SDL2
13-
* SDL2-Mixer
14-
* QT5
12+
Windows (Visual Studio + vcpkg):
13+
1. `Project\build_vs.cmd` (defaults to x64 Release)
14+
2. The output is placed in `Run\` (exe + required DLLs/plugins).
15+
16+
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`
21+
22+
Notes:
23+
* Dependencies are fetched with vcpkg via `Project\build_vs.cmd`.
24+
* The build uses Qt6, SDL3, and SDL3_mixer.
25+
* Run folder is the debugger working directory.
1526

1627
#### Requirements
1728

0 commit comments

Comments
 (0)