Skip to content

Commit

Permalink
Add Flatpak manifest and Builder instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
YaLTeR committed Apr 28, 2021
1 parent f3eb615 commit 411ba1b
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,20 @@ If you want to make a release build, you need to specify `-DCMAKE_BUILD_TYPE=Rel

### Linux

#### GNOME Builder
1. Set up Flathub by following the [guide](https://flatpak.org/setup/) for your distribution.
1. Install [GNOME Builder](https://flathub.org/apps/details/org.gnome.Builder).
1. Open GNOME Builder.
1. Press the Clone Repository button, enter `https://github.com/YaLTeR/BunnymodXT.git` and press Clone Project. Wait until it finishes.

The cloning window should close, and a new window with the BunnymodXT project should open.
1. If Builder prompts you to install missing SDKs, press Install and wait for the process to finish. It will take a while. You can monitor the progress by pressing the circle in the top-right.
1. Click on the bar at the top-center which says BunnymodXT, and click the Build button.
1. Once the build finishes, in the same bar menu click the Export Bundle button. The file manager will open in a path that looks like `gnome-builder/projects/BunnymodXT/flatpak/staging/x86_64-master`. Navigate up to the `BunnymodXT` folder, then down to `builds/rs.bxt.BunnymodXT.json-...` where you will find the built `libBunnymodXT.so`.
1. Now you can make some changes to the code and press Build, then grab `libBunnymodXT.so` from the same folder.

#### Manually

Building on Linux requires

- A recent GCC or Clang toolchain
Expand Down
54 changes: 54 additions & 0 deletions build-aux/flatpak/rs.bxt.BunnymodXT.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"app-id": "rs.bxt.BunnymodXT",
"runtime": "org.freedesktop.Sdk",
"runtime-version": "20.08",
"command": "",
"sdk": "org.freedesktop.Sdk",
"sdk-extensions": [
"org.freedesktop.Sdk.Compat.i386",
"org.freedesktop.Sdk.Extension.toolchain-i386",
"org.freedesktop.Sdk.Extension.rust-stable"
],
"build-options": {
"append-path": "/usr/lib/sdk/toolchain-i386/bin:/usr/lib/sdk/rust-stable/bin",
"build-args" : [
"--share=network"
],
"env": {
"CC": "i686-unknown-linux-gnu-gcc",
"CXX": "i686-unknown-linux-gnu-g++",
"RUSTFLAGS": "-C linker=i686-unknown-linux-gnu-gcc"
}
},
"modules": [
{
"name": "boost",
"buildsystem": "simple",
"sources": [
{
"type": "archive",
"url": "https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2",
"sha256": "f0397ba6e982c4450f27bf32a2a83292aba035b827a5623a14636ea583318c41"
}
],
"build-commands": [
"./bootstrap.sh --prefix=${FLATPAK_DEST} --with-libraries=headers",
"./b2 -j${FLATPAK_BUILDER_N_JOBS} -d0 install"
],
"cleanup": [
"*"
]
},
{
"name": "BunnymodXT",
"buildsystem": "cmake-ninja",
"builddir": true,
"sources": [
{
"type": "git",
"url": "https://github.com/YaLTeR/BunnymodXT.git"
}
]
}
]
}

0 comments on commit 411ba1b

Please sign in to comment.