summaryrefslogtreecommitdiff
path: root/tw/packages/files
diff options
context:
space:
mode:
Diffstat (limited to 'tw/packages/files')
-rw-r--r--tw/packages/files/simutrans-paths.patch18
-rw-r--r--tw/packages/files/simutrans.appdata.xml20
-rw-r--r--tw/packages/files/simutrans.desktop8
3 files changed, 46 insertions, 0 deletions
diff --git a/tw/packages/files/simutrans-paths.patch b/tw/packages/files/simutrans-paths.patch
new file mode 100644
index 00000000..bfc0db4a
--- /dev/null
+++ b/tw/packages/files/simutrans-paths.patch
@@ -0,0 +1,18 @@
+This patch stores user-specific config in $XDG_CONFIG_HOME/simutrans
+rather than ~/simutrans.
+
+--- a/sys/simsys.cc 2022-09-25 01:36:18.951636483 +0200
++++ b/sys/simsys.cc 2022-09-25 01:36:44.615457050 +0200
+@@ -395,7 +395,11 @@
+ #elif defined __ANDROID__
+ tstrncpy(buffer,SDL_GetPrefPath("Simutrans Team","simutrans"),lengthof(buffer));
+ #else
+- sprintf(buffer, "%s/simutrans", getenv("HOME"));
++ if (getenv("XDG_CONFIG_HOME") == NULL) {
++ sprintf(buffer, "%s/.config/simutrans", getenv("HOME"));
++ } else {
++ sprintf(buffer, "%s/simutrans", getenv("XDG_CONFIG_HOME"));
++ }
+ #endif
+
+ // create directory and subdirectories
diff --git a/tw/packages/files/simutrans.appdata.xml b/tw/packages/files/simutrans.appdata.xml
new file mode 100644
index 00000000..a286817b
--- /dev/null
+++ b/tw/packages/files/simutrans.appdata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<component type="desktop-application">
+ <id>com.simutrans.simutrans</id>
+ <launchable type="desktop-id">simutrans.desktop</launchable>
+ <name>Simutrans</name>
+ <summary>Transportation simulator</summary>
+ <metadata_license>CC0-1.0</metadata_license>
+ <project_license>Artistic-1.0</project_license>
+ <description>
+ <p>Simutrans is a free transportation simulator: the player operates a transportation company and has to transport goods and passengers between factories and different cities.</p>
+ </description>
+ <screenshots>
+ <screenshot type="default">
+ <!-- Simutrans homepage header image. -->
+ <image>https://www.simutrans.com/images/smsc/2016-05.png</image>
+ </screenshot>
+ </screenshots>
+ <url type="bugtracker">https://forum.simutrans.com/index.php?board=8.0</url>
+ <url type="homepage">https://www.simutrans.com/</url>
+</component>
diff --git a/tw/packages/files/simutrans.desktop b/tw/packages/files/simutrans.desktop
new file mode 100644
index 00000000..ed9c200f
--- /dev/null
+++ b/tw/packages/files/simutrans.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=Simutrans
+Comment=Transportation simulator
+Exec=simutrans
+Icon=simutrans
+Terminal=false
+Type=Application
+Categories=Game;Simulation;