Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
196 changes: 196 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
---
name: Build
on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
ubuntu:
name: Ubuntu 24.04
runs-on: ${{ format('ubuntu-24.04{0}', matrix.arch == 'arm64' && '-arm' || '') }}
strategy:
fail-fast: false
matrix:
arch: [x64, arm64]
container:
image: ubuntu:24.04
steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Install dependencies
run: |
apt-get update
apt-get install -y --no-install-recommends build-essential file gettext libsdl2-dev libsdl2-ttf-dev libcurl4-openssl-dev libjpeg-dev libpng-dev libvorbis-dev libgl1-mesa-dev

- name: Build Neverball
run: |
make -j$(nproc)

- name: Run binaries check
run: |
file neverball neverputt mapc
./neverball --version

- name: Create standalone tarball
shell: bash
run: |
set -euo pipefail
bundle="neverball-${{ github.sha }}-linux-${{ matrix.arch }}"
rm -rf "$bundle"
mkdir -p "$bundle"
cp -a neverball neverputt mapc "$bundle/"
cp -a data locale "$bundle/"
cp -a README.md LICENSE.md "$bundle/" || true
tar -czf "$bundle.tar.gz" "$bundle"

- name: Upload standalone tarball
uses: actions/upload-artifact@v6
with:
name: neverball-linux-${{ matrix.arch }}
path: neverball-${{ github.sha }}-linux-${{ matrix.arch }}.tar.gz

fedora:
name: Fedora 43
runs-on: ${{ format('ubuntu-24.04{0}', matrix.arch == 'arm64' && '-arm' || '') }}
strategy:
fail-fast: false
matrix:
arch: [x64, arm64]
container:
image: fedora:43
steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Install dependencies
run: |
dnf install -y @development-tools file gettext-devel SDL2-devel SDL2_ttf-devel libcurl-devel libjpeg-turbo-devel libpng-devel libvorbis-devel mesa-libGL-devel

- name: Build Neverball
run: |
make -j$(nproc)

- name: Run binaries check
run: |
file neverball neverputt mapc
./neverball --version

- name: Create standalone tarball
shell: bash
run: |
set -euo pipefail
bundle="neverball-${{ github.sha }}-linux-${{ matrix.arch }}"
rm -rf "$bundle"
mkdir -p "$bundle"
cp -a neverball neverputt mapc "$bundle/"
cp -a data locale "$bundle/"
cp -a README.md LICENSE.md "$bundle/" || true
tar -czf "$bundle.tar.gz" "$bundle"

- name: Upload standalone tarball
uses: actions/upload-artifact@v6
with:
name: neverball-linux-fedora-${{ matrix.arch }}
path: neverball-${{ github.sha }}-linux-${{ matrix.arch }}.tar.gz

steam-linux-runtime:
name: Steam Linux Runtime 4.0
if: false # Disabled due to missing libsdl2-ttf in the image (libsdl3-ttf not picked by SDL2 compat?). Should port to SDL3 anyways.
runs-on: ${{ format('ubuntu-24.04{0}', matrix.arch == 'arm64' && '-arm' || '') }}
strategy:
fail-fast: false
matrix:
arch: [x64, arm64]
container:
image: ${{ format('registry.gitlab.steamos.cloud/steamrt/steamrt4/sdk{0}', matrix.arch == 'arm64' && '/arm64' || '') }}
steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Build Neverball
run: |
make -j$(nproc)

- name: Run binaries check
run: |
file neverball neverputt mapc
./neverball --version

windows:
name: Windows MSYS2
runs-on: ${{ matrix.arch == 'arm64' && 'windows-11-arm' || 'windows-2025' }}
strategy:
fail-fast: false
matrix:
arch: [x64, arm64]
steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Setup MSYS2
uses: msys2/setup-msys2@v2
with:
update: true
msystem: ${{ matrix.arch == 'arm64' && 'CLANGARM64' || 'CLANG64' }}
install: >
base-devel
mingw-w64-clang-${{ matrix.arch == 'arm64' && 'aarch64' || 'x86_64' }}-toolchain
mingw-w64-clang-${{ matrix.arch == 'arm64' && 'aarch64' || 'x86_64' }}-pkgconf
mingw-w64-clang-${{ matrix.arch == 'arm64' && 'aarch64' || 'x86_64' }}-gettext
mingw-w64-clang-${{ matrix.arch == 'arm64' && 'aarch64' || 'x86_64' }}-SDL2
mingw-w64-clang-${{ matrix.arch == 'arm64' && 'aarch64' || 'x86_64' }}-SDL2_ttf
mingw-w64-clang-${{ matrix.arch == 'arm64' && 'aarch64' || 'x86_64' }}-curl
mingw-w64-clang-${{ matrix.arch == 'arm64' && 'aarch64' || 'x86_64' }}-libjpeg-turbo
mingw-w64-clang-${{ matrix.arch == 'arm64' && 'aarch64' || 'x86_64' }}-libpng
mingw-w64-clang-${{ matrix.arch == 'arm64' && 'aarch64' || 'x86_64' }}-libvorbis

- name: Build Neverball
shell: msys2 {0}
run: |
make CC=clang -j"$(nproc 2>/dev/null || echo 1)"

- name: Run binaries check
shell: msys2 {0}
run: |
file neverball.exe neverputt.exe mapc.exe
./neverball.exe --version

- name: Create standalone tarball
shell: msys2 {0}
run: |
set -euo pipefail
bundle="neverball-${{ github.sha }}-windows-${{ matrix.arch }}"
rm -rf "$bundle"
mkdir -p "$bundle"

cp -a neverball.exe neverputt.exe mapc.exe "$bundle/"
cp -a data locale "$bundle/"
cp -a README.md LICENSE.md "$bundle/" || true

# Resolve MinGW/Clang prefix dynamically (clang64 / clangarm64)
mingw_prefix="$(cygpath -u "$MINGW_PREFIX")"

# Collect DLL dependencies
dlls=$(
(ldd neverball.exe; ldd neverputt.exe; ldd mapc.exe) |
awk -v p="$mingw_prefix/bin/" '/=>/ {print $3} { if (index($1, p) == 1) print $1 }' |
grep -Ei "^$mingw_prefix/bin/.*\.dll$" |
sort -u
)

for dll in $dlls; do
cp -a "$dll" "$bundle/"
done

tar -czf "$bundle.tar.gz" "$bundle"

- name: Upload standalone tarball
uses: actions/upload-artifact@v6
with:
name: neverball-windows-${{ matrix.arch }}
path: neverball-${{ github.sha }}-windows-${{ matrix.arch }}.tar.gz
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ WINDRES ?= windres
sh scripts/translate-desktop.sh < $< > $@

%.ico.o: dist/ico/%.ico
echo "1 ICON \"$<\"" | $(WINDRES) -o $@
echo "1 ICON \"$<\"" | $(WINDRES) -o $@ -

#------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Release highlights can be found in [doc/release-notes.md](doc/release-notes.md).
## Documentation

* [LICENSE.md](LICENSE.md): a description of licensing and exceptions
* [doc/install.txt](doc/install.txt): instructions on how to build the
* [doc/install.md](doc/install.md): instructions on how to build the
game from source code
* [doc/manual.txt](doc/manual.txt): a detailed description of how to
play and configure the game
Expand Down
146 changes: 146 additions & 0 deletions doc/install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
# Neverball

## Requirements

| Name | |
| --------- | -------------------------------------- |
| SDL 2.0 | https://github.com/libsdl-org/SDL |
| SDL2_ttf | https://github.com/libsdl-org/SDL_ttf |
| libvorbis | https://xiph.org/vorbis |
| libpng | https://libpng.org/pub/png/libpng.html |
| libjpeg | https://ijg.org |
| libcurl | optional, see below |
| libintl | optional, see below |

### Ubuntu / Debian

```shell
sudo apt install build-essential gettext libsdl2-dev libsdl2-ttf-dev libcurl4-openssl-dev libjpeg-dev libpng-dev libvorbis-dev
```

### Fedora

```shell
sudo dnf install @development-tools gettext-devel SDL2-devel SDL2_ttf-devel libcurl-devel libjpeg-turbo-devel libpng-devel libvorbis-devel
```

## Compilation

Under Unix and Linux, simply run:

```shell
make
```

### Windows (MSYS2)

Under Windows, install the MSYS2 environment and run:

```shell
make
```

### Cross-compilation for Windows (Fedora example)

Cross-compilation for Windows is supported. On Fedora Linux:

```shell
make sols clean-src
mingw32-make -o sols PLATFORM=mingw
```

## Optional features

Optional features can be enabled at compile time by passing one or more additional arguments to `make`. Most of these features require additional libraries to be installed.

### Native language support

Disable NLS:

```shell
make ENABLE_NLS=0
```

- Enabled by default.
- Requires an additional library on non-GLIBC systems.
- Dependency: libintl (GNU gettext): https://www.gnu.org/software/gettext/

### Package downloads

Use libcurl for package downloads (enabled by default). Set this to any other value (e.g. `ENABLE_FETCH=0`) to disable downloads:

```shell
make ENABLE_FETCH=curl
```

- Dependency: libcurl: https://curl.se/libcurl

### Tilt input devices

Nintendo Wii Remote support on Linux:

```shell
make ENABLE_TILT=wii
```

- Dependencies: BlueZ (https://www.bluez.org), libwiimote (https://libwiimote.sourceforge.net)

Hillcrest Labs Loop support:

```shell
make ENABLE_TILT=loop
```

- Dependencies: libusb-1.0 (http://libusb.org/wiki/Libusb1.0), libfreespace (https://github.com/hcrest/libfreespace)

Leap Motion support on Linux:

```shell
make ENABLE_TILT=leapmotion
```

- Dependency: Leap Motion V2 SDK: https://developer.leapmotion.com

### Head-mounted display (HMD)

OpenHMD support (including the Oculus Rift):

```shell
make ENABLE_HMD=openhmd
```

- Dependency: OpenHMD: http://openhmd.net

Oculus Rift support:

```shell
make ENABLE_HMD=libovr
```

- Dependency: Oculus SDK: https://developer.oculusvr.com

### Radiant console output

Map compiler output to Radiant console:

```shell
make ENABLE_RADIANT_CONSOLE=1
```

- Dependency: SDL2_net: https://github.com/libsdl-org/SDL_net

## Installation

By default, an uninstalled build may be executed in place. A system-wide installation on Linux would probably copy the game to `/opt/neverball`.

To be able to use the NetRadiant level editor, the game data and binaries must be installed in the same location. Distributions that wish to package Neverball, Neverputt, and their shared data separately should take care to use symlinks and launcher scripts to support this.

## Distribution

The `dist` subdirectory contains some miscellaneous files:

- `.desktop` files
- high resolution icons in PNG, SVG and ICO formats

Web: https://neverball.org

Loading