Skip to content

Commit 1efea44

Browse files
Ratul SahaZhilkinSerg
authored andcommitted
Flatpak build recipe added (CleverRaven#30233)
* Flatpak build recipe added * gitignore updated * Link Time optimisation flag enabled in flatpak build * Cataclysm tiles build manifest added * Got rid of background terminal window * Flatpak build instructions added in separate file * Removed extra space between Note and colon Co-Authored-By: sahaRatul <[email protected]> * Updated compiling guide to match PR comments
1 parent 2303ad4 commit 1efea44

File tree

7 files changed

+128
-0
lines changed

7 files changed

+128
-0
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,3 +171,8 @@ Xcode/
171171

172172
# gdb
173173
.gdb_history
174+
175+
# Flatpak build artifacts
176+
/.flatpak-builder/
177+
/repo/
178+
/build-dir/

COMPILING-FLATPAK.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Compiling Guide for Linux (Flatpak)
2+
3+
## Prerequisites
4+
5+
- Install `flatpak` and `flatpak-builder` from your distribution's package manager.
6+
- Install `freedesktop-platform` & `freedesktop-sdk` using `flatpak install flathub org.freedesktop.Platform//18.08 org.freedesktop.Sdk//18.08`
7+
8+
## Build
9+
10+
Clone the source code and run `flatpak-builder --repo=repo --ccache --force-clean build-dir org.Cataclysm.DDA.json` or `flatpak-builder --repo=repo --ccache --force-clean build-dir org.Cataclysm.DDA.Tiles.json` to build the ncurses or tiles version of the application.
11+
12+
## Installation
13+
14+
Run `flatpak --user install test-repo org.Cataclysm.DDA` (or) `flatpak --user install test-repo org.Cataclysm.DDA.Tiles` to install the game.
15+
Note: If you are installing the game for first time you will have to set up local repo. Run this `flatpak --user remote-add --no-gpg-verify test-repo repo`
16+
17+
## Starting the game
18+
19+
`flatpak run org.Cataclysm.DDA` (or) `flatpak run org.Cataclysm.DDA.Tiles`
20+
**or**
21+
Launch the Game from Applications -> Games -> Cataclysm: Dark Days Ahead (or) Cataclysm: Dark Days Ahead - Tiles.
22+
**Note**: For the ncurses version, terminal will just show a blank screen on launch. Just press any button to start the game.
23+
24+
## Permissions
25+
26+
- **Ncurses version**
27+
- Home Directory
28+
- **Tiles Version**
29+
- Home Directory
30+
- Wayland
31+
- Fallback-X11 - (incase Wayland doesn't work)
32+
- IPC - (Required for X11)
33+
- PulseAudio
34+
- DRI

SIGNOFF

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,5 @@ Patrik Stridvall <[email protected]>
6161
Ryan Schneider (RadHazard) <[email protected]>
6262
Paul Bransford (draeath) <[email protected]>
6363
Mark Langsdorf (mlangsdorf) <[email protected]> / <[email protected]>
64+
Ratul Saha (sahaRatul) <[email protected]> / <[email protected]>
6465
Davis Bray (Kaltag1925) <[email protected]>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[Desktop Entry]
2+
Name=Cataclysm: Dark Days Ahead - Tiles
3+
GenericName=Post-apocalyptic roguelike
4+
Comment=A turn-based survival game set in a post-apocalyptic world.
5+
Icon=org.Cataclysm.DDA.Tiles
6+
Type=Application
7+
Exec=cataclysm-launcher
8+
Terminal=false
9+
Categories=Game;RolePlaying;
10+
Keywords=zombie;rogue;roguelike;tiles;dda;cdda;

data/xdg/org.Cataclysm.DDA.desktop

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[Desktop Entry]
2+
Name=Cataclysm: Dark Days Ahead
3+
GenericName=Post-apocalyptic roguelike
4+
Comment=A turn-based survival game set in a post-apocalyptic world.
5+
Icon=org.Cataclysm.DDA
6+
Type=Application
7+
Exec=cataclysm-launcher
8+
Terminal=true
9+
Categories=Game;RolePlaying;
10+
Keywords=zombie;rogue;roguelike;tiles;dda;cdda;

org.Cataclysm.DDA.Tiles.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"id": "org.Cataclysm.DDA.Tiles",
3+
"runtime": "org.freedesktop.Platform",
4+
"runtime-version": "18.08",
5+
"sdk": "org.freedesktop.Sdk",
6+
"command": "cataclysm-launcher",
7+
"finish-args": [
8+
"--filesystem=home",
9+
"--socket=pulseaudio",
10+
"--socket=wayland",
11+
"--socket=fallback-x11",
12+
"--share=ipc",
13+
"--device=dri"
14+
],
15+
"modules": [
16+
{
17+
"name": "cataclysm-tiles",
18+
"buildsystem": "simple",
19+
"build-commands": [
20+
"CPPPATH=/app/include make -j4 NATIVE=linux64 USE_HOME_DIR=1 CLANG=1 TILES=1 SOUND=1 RELEASE=1 CCACHE=1 LTO=1 RUNTESTS=0 ASTYLE=0",
21+
"install -Dm755 cataclysm-tiles /app/bin/cataclysm-tiles",
22+
"install -Dm755 cataclysm-launcher /app/bin/cataclysm-launcher",
23+
"install -Dm755 data/xdg/org.Cataclysm.DDA.Tiles.desktop /app/share/applications/org.Cataclysm.DDA.Tiles.desktop",
24+
"install -Dm644 data/xdg/cataclysm-dda.appdata.xml /app/share/metainfo/org.Cataclysm.DDA.Tiles.appdata.xml",
25+
"install -Dm644 data/xdg/cataclysm-dda.svg /app/share/icons/hicolor/128x128/apps/org.Cataclysm.DDA.Tiles.svg",
26+
"cp -r data /app/bin/data",
27+
"cp -r gfx /app/bin/gfx"
28+
],
29+
"sources": [
30+
{
31+
"type": "dir",
32+
"path": "."
33+
}
34+
]
35+
}
36+
]
37+
}

org.Cataclysm.DDA.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"id": "org.Cataclysm.DDA",
3+
"runtime": "org.freedesktop.Platform",
4+
"runtime-version": "18.08",
5+
"sdk": "org.freedesktop.Sdk",
6+
"command": "cataclysm-launcher",
7+
"finish-args": [
8+
"--filesystem=home"
9+
],
10+
"modules": [
11+
{
12+
"name": "cataclysm",
13+
"buildsystem": "simple",
14+
"build-commands": [
15+
"CPPPATH=/app/include make -j4 NATIVE=linux64 USE_HOME_DIR=1 CLANG=1 RELEASE=1 LTO=1 CCACHE=1 RUNTESTS=0 ASTYLE=0",
16+
"install -Dm755 cataclysm /app/bin/cataclysm",
17+
"install -Dm755 cataclysm-launcher /app/bin/cataclysm-launcher",
18+
"install -Dm755 data/xdg/org.Cataclysm.DDA.desktop /app/share/applications/org.Cataclysm.DDA.desktop",
19+
"install -Dm644 data/xdg/cataclysm-dda.appdata.xml /app/share/metainfo/org.Cataclysm.DDA.appdata.xml",
20+
"install -Dm644 data/xdg/cataclysm-dda.svg /app/share/icons/hicolor/128x128/apps/org.Cataclysm.DDA.svg",
21+
"cp -r data /app/bin/data"
22+
],
23+
"sources": [
24+
{
25+
"type": "dir",
26+
"path": "."
27+
}
28+
]
29+
}
30+
]
31+
}

0 commit comments

Comments
 (0)