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
37 changes: 21 additions & 16 deletions .github/workflows/build-all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
--security-opt apparmor:unconfined
strategy:
matrix:
flavour: [pkg-appimage-snapshot, pkg-appimage-deployment, pkg-appimage]
flavour: [pkg-appimage-deployment, pkg-appimage-test, pkg-appimage-dev]
steps:
## This is for debugging only and helps developing the workflow.
# - name: Environment Variables
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
ldconfig
- name: Build Oolite
run: |
ShellScripts/common/build_oolite.sh ${{matrix.flavour}}
./mk.sh ${{matrix.flavour}} --github-repository="$GITHUB_REPOSITORY"
- name: Archive installer
uses: actions/upload-artifact@v6
with:
Expand All @@ -78,7 +78,11 @@ jobs:
fetch-depth: 0
- name: Build flatpak
run: |
installers/flatpak/create_flatpak.sh
echo "Installing gitversion..."
source ShellScripts/Linux/install_gitversion_fn.sh
mkdir -p /usr/local/bin
install_gitversion "."
./mk.sh pkg-flatpak --github-repository="$GITHUB_REPOSITORY"
- name: Archive installer
uses: actions/upload-artifact@v6
with:
Expand All @@ -91,7 +95,7 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
flavour: [pkg-win-snapshot, pkg-win-deployment, pkg-win]
flavour: [pkg-win-deployment, pkg-win-test, pkg-win-dev]
steps:
## This is for debugging only and helps developing the workflow.
# - name: Environment Variables
Expand All @@ -105,6 +109,7 @@ jobs:
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: true
cache: false
- name: Checkout Oolite
Expand All @@ -122,7 +127,7 @@ jobs:
env:
msystem: UCRT64
run: |
ShellScripts/common/build_oolite.sh ${{matrix.flavour}}
./mk.sh ${{matrix.flavour}} --github-repository="$GITHUB_REPOSITORY"
- name: Archive installer
uses: actions/upload-artifact@v6
with:
Expand All @@ -146,7 +151,7 @@ jobs:
uses: actions/download-artifact@v7
with:
path: artifacts
- name: Calculate version number and set OOLITE_VERSION
- name: Calculate version number and set VER_FULL
id: version
run: |
set -x
Expand All @@ -166,14 +171,14 @@ jobs:
echo "Found AppImage: $APPIMAGE_PATH"
# 3. Run with packageinfo and extract the string inside quotes
chmod +x "$APPIMAGE_PATH"
VERSION_STR=$("$APPIMAGE_PATH" packageinfo | awk -F'"' '/^[[:space:]]*version =/ {print $2; exit}')
if [[ -z "$VERSION_STR" ]]; then
VER_FULL=$("$APPIMAGE_PATH" packageinfo | awk -F'"' '/^[[:space:]]*version =/ {print $2; exit}')
if [[ -z "$VER_FULL" ]]; then
echo "❌ Failed to extract version string from packageinfo output!" >&2
exit 1
fi
echo "Extracted Version: $VERSION_STR"
echo "Extracted Version: $VER_FULL"
# 4. Output the extracted version for subsequent steps
echo "OOLITE_VERSION=$VERSION_STR" >> "$GITHUB_OUTPUT"
echo "VER_FULL=$VER_FULL" >> "$GITHUB_OUTPUT"
- name: Remove old prereleases
if: github.ref == 'refs/heads/master' || endsWith(github.ref, 'maintenance')
uses: s00d/delete-older-releases@0.2.1
Expand All @@ -190,16 +195,16 @@ jobs:
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
# automatic_release_tag: "latest"
automatic_release_tag: "${{ steps.version.outputs.OOLITE_VERSION }}"
automatic_release_tag: "${{ steps.version.outputs.VER_FULL }}"
prerelease: true
title: "Oolite ${{ steps.version.outputs.OOLITE_VERSION }}"
title: "Oolite ${{ steps.version.outputs.VER_FULL }}"
files: |
artifacts/oolite-windows-pkg-win-snapshot/OoliteInstall-*-dev.exe
artifacts/oolite-windows-pkg-win-deployment/OoliteInstall-*.exe
artifacts/oolite-windows-pkg-win/OoliteInstall-*.exe
artifacts/oolite-linux-pkg-appimage-snapshot/*.AppImage
artifacts/oolite-windows-pkg-win-test/OoliteInstall-*.exe
artifacts/oolite-windows-pkg-win-dev/OoliteInstall-*-dev.exe
artifacts/oolite-linux-pkg-appimage-deployment/*.AppImage
artifacts/oolite-linux-pkg-appimage/*.AppImage
artifacts/oolite-linux-pkg-appimage-test/*.AppImage
artifacts/oolite-linux-pkg-appimage-dev/*.AppImage
artifacts/oolite-flatpak/*.flatpak
- name: Remove old workflow runs
if: github.ref == 'refs/heads/master' || endsWith(github.ref, 'maintenance')
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/test_builds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ jobs:
- name: Build and test Oolite
if: github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
run: |
ShellScripts/common/build_oolite.sh test
./mk.sh test-dev
- name: Build Oolite (no test)
if: github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
run: |
ShellScripts/common/build_oolite.sh
./mk.sh build-dev
- name: Build AppImage
run: |
ShellScripts/common/build_oolite.sh pkg-appimage-snapshot
./mk.sh pkg-appimage-dev

fedora:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -88,14 +88,14 @@ jobs:
- name: Build and test Oolite
if: github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
run: |
ShellScripts/common/build_oolite.sh test
./mk.sh test-dev
- name: Build Oolite (no test)
if: github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
run: |
ShellScripts/common/build_oolite.sh
./mk.sh build-dev
- name: Build AppImage
run: |
ShellScripts/common/build_oolite.sh pkg-appimage-snapshot
./mk.sh pkg-appimage-dev

arch:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -132,14 +132,14 @@ jobs:
- name: Build and test Oolite
if: github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
run: |
ShellScripts/common/build_oolite.sh test
./mk.sh test-dev
- name: Build Oolite (no test)
if: github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
run: |
ShellScripts/common/build_oolite.sh
./mk.sh build-dev
- name: Build AppImage
run: |
ShellScripts/common/build_oolite.sh pkg-appimage-snapshot
./mk.sh pkg-appimage-dev

windows:
runs-on: windows-latest
Expand Down Expand Up @@ -174,12 +174,12 @@ jobs:
env:
msystem: UCRT64
run: |
ShellScripts/common/build_oolite.sh test
./mk.sh test-dev

- name: Build Oolite (no test)
if: github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
shell: msys2 {0}
env:
msystem: UCRT64
run: |
ShellScripts/common/build_oolite.sh
./mk.sh build-dev
97 changes: 0 additions & 97 deletions Makefile

This file was deleted.

56 changes: 37 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ where XXX is a version number. Many Linux package managers support Flatpak so yo
double click the downloaded file to install it.

The AppImage is named `Oolite_XXX-x86_64.AppImage` where XXX is a version number. Download this
file to where you would like it stored, make it executable and run, for example by typing
file to where you would like it stored, ./mk.sh it executable and run, for example by typing

```bash
chmod +x Oolite_XXX-x86_64.AppImage
Expand Down Expand Up @@ -125,53 +125,71 @@ default, but you can supply a further argument to specify an alternative like do
Next run this in your Bash or MSYS2 prompt to build Oolite:

```bash
ShellScripts/common/build_oolite.sh release
./mk.sh build-dev
```

The completed build (executable and games files) can be found in the oolite.app directory.
The completed build (executable and games files) can be found in the build/meson_dev/oolite.app directory.

Subsequently, you can clean and build as follows:

```bash
make clean
make release
./mk.sh build-dev --clean
```

You can run a test from your Bash or MSYS2 prompt as follows:
You can run a test that launches the game and takes a snapshot from your Bash or MSYS2 prompt as follows:

```bash
make test
./mk.sh test
```

Other targets are release-deployment for a production release and release-snapshot for a debug release.
build-dev keeps debug symbols in the binary. Other build targets remove those symbols from the binary although they
are made available in a separate symbols file. build-deployment is for a production build and build-test is for a
test release that supports the debug console which is used by expansion developers for debugging their OXPs.

You can install:

```bash
./mk.sh install-dev
```

Other targets are install-deployment for a production install and install-test for a test install.

The underlying build system is Meson, but it is recommended to run via the mk.sh script which also allow you to pass
meson setup, compile and install flags. Type the following for help:

```bash
./mk.sh help
```

build-dev runs 2 targets which can be run independently: setup-dev which runs meson setup and compile-dev which runs
meson compile.

### Other Linux Make Targets
### Other Linux ./mk.sh Targets

This target builds an AppImage for testing which can be found in build:
This target builds an AppImage for development which can be found in the `build` fodler:

```bash
make pkg-appimage
./mk.sh pkg-appimage-dev
```

The target pkg-appimage-deployment is the production release, while pkg-appimage-snapshot is for debugging.
The target pkg-appimage-deployment is the production release, while pkg-appimage-test is for test.

This target builds a Flatpak which can be found in build:
This target builds a Flatpak (deployment only) which can be found in the `build` folder:

```bash
make pkg-flatpak
./mk.sh pkg-flatpak
```

Although there is a top level Makefile, the underlying build system is Meson. You can run the deployment
build directly using Meson build commands like this:
### Other Windows ./mk.sh Targets

This target builds a Windows NSIS installer for development which can be found in the `build` folder:

```bash
meson setup build/meson_deployment -Ddeployment_release_configuration=true -Ddebug=false -Dstrip_bin=true -Db_lto=true --native-file clang.ini --reconfigure
meson compile -C build/meson_deployment
meson install -C build/meson_deployment
./mk.sh pkg-win-dev
```

The target pkg-win-deployment is the production release, while pkg-win-test is for test.

### Mac OS

Intel-based Macs can run old builds of Oolite, but current Macs are unsupported. It is hoped that they can be supported
Expand Down
Loading