Ticket #492 (closed enhancement: fixed)

Opened 3 years ago

Last modified 12 months ago

packaging resources

Reported by: fabio Owned by:
Priority: If Time Permits Milestone: Alpha 10
Component: Build & Packages Keywords:
Cc: Vincentc1208@…

Description (last modified by fabio) (diff)

I am attaching some files from debian package that may be useful to other distributions and that could eventually included in the 0ad source:

  • 0ad.desktop : desktop file for menu (it assumes the executable is in /usr/lib/games/0ad/system/pyrogenesis )
  • 0ad.png : png icon file (converted from upstream ps.ico and optimized with optipng and advdef)
  • 0ad : script that call /usr/lib/games/0ad/system/pyrogenesis to easily run the game from terminal
  • 0ad.6 : man page with options taken from upstream readme.txt

Update (2012-04-10):

Attachments

0ad.packaging.tar.gz (5.8 KB) - added by fabio 3 years ago.
resources.tar.gz (9.0 KB) - added by sergiovier 3 years ago.
updated resources

Change History

Changed 3 years ago by fabio

comment:1 Changed 3 years ago by fabio

If you want to include the man page remove the debian copyright section at the end (last 6 lines, I am the author).

comment:2 follow-up: ↓ 3 Changed 3 years ago by philip

(In [7882]) Add resources for Linux packages, based on files from fabio (see #492)

Changed 3 years ago by sergiovier

updated resources

comment:3 in reply to: ↑ 2 Changed 3 years ago by sergiovier

Replying to philip:

(In [7882]) Add resources for Linux packages, based on files from fabio (see #492)

updated resources: updated script file and altas support for desktop files menu.

comment:4 Changed 3 years ago by Philip

Hmm, I had wondered about adding an Atlas .desktop entry but I'm not sure it's a good idea - the editor is available fairly prominently from the game's main menu (since a month ago), so another entry point is not really necessary, and it's nice to avoid cluttering the user's programs menu (unlike on Windows where we've already got a whole subfolder to contain whatever we want).

We ideally shouldn't have a shell script wrapper at all - currently it's only there because on some systems we try to detect the executable's location at runtime and fail if it was run via PATH, so we have to run it from an absolute path instead. So I'd prefer to avoid adding any complexity to the script, and features like --help should be added to the C++ code instead (so they'll work when the PATH thing gets fixed).

comment:5 Changed 3 years ago by anonymous

  • Milestone Unclassified deleted

Milestone Unclassified deleted

comment:6 Changed 3 years ago by wacko

  • Milestone set to Backlog

comment:7 Changed 3 years ago by fabio

Can the man page and the translation of desktop file:

Comment[it]=Videogioco strategico in tempo reale di guerre antiche

be merged?

comment:8 Changed 3 years ago by Philip

I skipped the translation since it seemed weird to only have [it] and not any other languages - eventually we'll need to some proper translation process set up for the game, and that can be used for the desktop file too.

But I suppose that's a rubbish reason not to include this translation already.

I skipped the man page since I wasn't sure how accurate it was (it's based on readme.txt which doesn't seem very accurate), so I didn't want to add it yet, but then I didn't get around to checking/updating it. If it's going to list command-line arguments then I'd prefer the list to be much more complete (which probably involves searching the code for all the uses of CmdLineArgs). Ideally it should mention config files too (i.e. where to look for default.cfg, and where to write local.cfg to override settings). Something like that would be great :-)

comment:9 Changed 3 years ago by philip

(In [8310]) Add translation to desktop file (see #492)

comment:10 Changed 14 months ago by historic_bruno

  • Component changed from Non-game systems to Build & Packages

comment:11 Changed 13 months ago by fabio

  • Description modified (diff)
  • Milestone changed from Backlog to Alpha 10

I'll retarget for alpha 10 since updated files that can committed are now available and because an user complained on the forum about low icon quality ( see http://www.wildfiregames.com/forum/index.php?showtopic=15902 ).

comment:12 Changed 13 months ago by fabio

  • Description modified (diff)

comment:13 Changed 13 months ago by k776

  • Status changed from new to closed
  • Resolution set to fixed

Marking this as fixed. I don't think Trac is the right place to store files. Once the new website is done, we should make a resources/media section for this sort of thing.

comment:14 Changed 13 months ago by ben

In 11613:

New higher quality icons. Fixes #954. Refs #492.

comment:15 Changed 13 months ago by historic_bruno

If this ticket still has relevant info, maybe move the content to a Trac page? (you can still attach files)

comment:16 Changed 12 months ago by vincent

  • Status changed from closed to reopened
  • Cc Vincentc1208@… added
  • Summary changed from packaging resources to [ PATCH ] packaging resources
  • Milestone changed from Alpha 10 to Alpha 11
  • Keywords patch review added
  • Resolution fixed deleted

Currently, the script that calls pyrogenesis (build/resources/0ad.sh) hardcodes the path to the pyrogenesis binary (/usr/bin/pyrogenesis), which means that Linux distros which install game binaries to /usr/games (i.e. Debian & Ubuntu) end up having to patch the file. Instead of hardcoding the path, I propose the following patch, which looks for the first instance of pyrogenesis in the user's PATH and runs that. The patch below also modifies build/resources/0ad.desktop to use a relative path for the Exec= field rather than a hardcoded path.

--- a/build/resources/0ad.sh
+++ b/build/resources/0ad.sh
@@ -1,3 +1,9 @@
 #!/bin/sh
 
-/usr/bin/pyrogenesis "$@"
+path_to_pyrogenesis=$(which pyrogenesis)
+if [ -x "$path_to_pyrogenesis" ] ; then
+	"$path_to_pyrogenesis" "$@"
+else
+	echo "Error: pyrogenesis cannot be found in $PATH"
+	exit 1
+fi
--- a/build/resources/0ad.desktop
+++ b/build/resources/0ad.desktop
@@ -3,7 +3,7 @@
 Name=0 A.D.
 Comment=A real-time strategy game of ancient warfare
 Comment[it]=Videogioco strategico in tempo reale di guerre antiche
-Exec=/usr/bin/0ad
+Exec=0ad
 Icon=0ad
 Terminal=false
 Type=Application

comment:17 Changed 12 months ago by k776

  • Keywords patch review removed
  • Status changed from reopened to closed
  • Summary changed from [ PATCH ] packaging resources to packaging resources
  • Resolution set to fixed
  • Milestone changed from Alpha 11 to Alpha 10

I've split this into another ticket rather than reopen this one. See the new one at #1424

Note: See TracTickets for help on using tickets.