Skip to content

Commit 6ae5b65

Browse files
committed
Initial commit
0 parents  commit 6ae5b65

File tree

7 files changed

+168
-0
lines changed

7 files changed

+168
-0
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.flatpak-builder
2+
*.flatpak
3+
repo
4+
openttd/

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "modules"]
2+
path = modules
3+
url = https://github.com/casept/flatpak-modules.git

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2017 David Paskevic
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
all:
2+
rm -rf openttd
3+
flatpak-builder --repo=repo --ccache openttd org.openttd.openttd.json
4+
flatpak build-bundle repo openttd-1.7.flatpak org.openttd.openttd
5+
clean:
6+
rm -rf build repo openttd *.flatpak .flatpak-builder
7+
install:
8+
flatpak install --user --bundle openttd-1.7.flatpak
9+
uninstall:
10+
flatpak uninstall --user org.openttd.openttd

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# flatpak-openttd
2+
3+
A flatpak package for the game openttd. Includes the opengfx, opensfx and openmsx resource packs, as well as timidity (needed to play music).
4+
5+
## Building
6+
First checkout the repo:
7+
```
8+
git clone https://github.com/casept/flatpak-openttd
9+
cd flatpak-openttd
10+
git submodule init
11+
git submodule update
12+
```
13+
14+
Install the needed runtime and SDK:
15+
```
16+
flatpak remote-add --user --if-not-exists --from gnome https://sdk.gnome.org/gnome.flatpakrepo
17+
flatpak install --user gnome org.freedesktop.Sdk 1.4
18+
flatpak install --user gnome org.freedesktop.Platform 1.4
19+
```
20+
21+
And build:
22+
```
23+
make
24+
```
25+
26+
## Installation
27+
Just run `make install`. This will install the game for your local user.
28+
29+
## Running
30+
In most desktop environments an openttd menu entry will have been created under games. If that's not the case you may need to log out and back in again. If you still can't find the icon your DE might not be looking in the directory where flatpak places .desktop files. If that's the case you'll have to run `flatpak run org.openttd.openttd` to start the game.
31+
32+
## Accessing save games/mods/etc.
33+
For sandboxing reasons the game is configured to save user data to `~/.var/app/org.openttd.openttd/.openttd` instead of the usual `~/.openttd`. This directory will have the same structure as it does when the game is installed systemwide by normal means.

modules

Submodule modules added at 5e2d1b0

org.openttd.openttd.json

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
{
2+
"app-id": "org.openttd.openttd",
3+
"version": "1.7",
4+
"runtime": "org.freedesktop.Platform",
5+
"runtime-version": "1.4",
6+
"sdk": "org.freedesktop.Sdk",
7+
"command": "openttd",
8+
"rename-desktop-file": "openttd.desktop",
9+
"rename-icon": "openttd",
10+
"finish-args": [
11+
/* X11 access */
12+
"--socket=x11", "--share=ipc",
13+
/* OpenGL access */
14+
"--device=dri",
15+
/* PulseAudio access */
16+
"--socket=pulseaudio",
17+
/* Network access */
18+
"--share=network",
19+
/* Wayland access */
20+
"--socket=wayland",
21+
/* Persist saves and config files */
22+
"--persist=.openttd"
23+
],
24+
25+
"modules": [
26+
"modules/libsdl-1.2.15.json",
27+
"modules/icu4c-55.1.json",
28+
"modules/libao-1.2.0.json",
29+
"modules/timidity-2.13.2.json",
30+
"modules/freepats-20060219.json",
31+
"modules/liblzo-2.10.json",
32+
{
33+
"name": "openttd",
34+
"config-opts": [
35+
"--without-allegro",
36+
"--with-liblzo2=/app/lib/liblzo2.so.2",
37+
"--menu-group=Game;StrategyGame;",
38+
"--binary-dir=bin"
39+
],
40+
"sources" : [
41+
{
42+
"type": "archive",
43+
"url": "https://binaries.openttd.org/releases/1.7.0/openttd-1.7.0-source.tar.xz",
44+
"sha256": "df9307f42a45ac57dff23fe5cfb9bdb2a3d676456e7c771de173de060c2a99e0"
45+
}
46+
]
47+
},
48+
{
49+
"name": "opengfx",
50+
"buildsystem": "simple",
51+
"build-commands": [
52+
"tar -xvf opengfx-0.5.2.tar",
53+
"cd opengfx-0.5.2",
54+
"mkdir -p /app/share/games/openttd/baseset/opengfx",
55+
"cp -r * /app/share/games/openttd/baseset/opengfx/"
56+
],
57+
"sources" : [
58+
{
59+
"type": "archive",
60+
"url": "https://binaries.openttd.org/extra/opengfx/0.5.2/opengfx-0.5.2-all.zip",
61+
"sha256": "19be61f1cb04cbb3cb9602f0b8eb6e6f56ecbefbfdd6e0e03f9579e5a5c1cbc8"
62+
}
63+
]
64+
},
65+
{
66+
"name": "opensfx",
67+
"buildsystem": "simple",
68+
"build-commands": [
69+
"mkdir -p /app/share/games/openttd/baseset/opensfx",
70+
"cp -r * /app/share/games/openttd/baseset/opensfx/"
71+
],
72+
"sources" : [
73+
{
74+
"type": "archive",
75+
"url": "https://binaries.openttd.org/extra/opensfx/0.2.3/opensfx-0.2.3-all.zip",
76+
"sha256": "6831b651b3dc8b494026f7277989a1d757961b67c17b75d3c2e097451f75af02"
77+
}
78+
]
79+
},
80+
{
81+
"name": "openmsx",
82+
"buildsystem": "simple",
83+
"build-commands": [
84+
"mkdir -p /app/share/games/openttd/baseset/openmsx",
85+
"cp -r * /app/share/games/openttd/baseset/openmsx/"
86+
],
87+
"sources" : [
88+
{
89+
"type": "archive",
90+
"url": "https://binaries.openttd.org/extra/openmsx/0.3.1/openmsx-0.3.1-all.zip",
91+
"sha256": "92e293ae89f13ad679f43185e83fb81fb8cad47fe63f4af3d3d9f955130460f5"
92+
}
93+
]
94+
}
95+
]
96+
}

0 commit comments

Comments
 (0)