Opened 14 years ago

Closed 12 years ago

#492 closed enhancement (fixed)

packaging resources

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

Description (last modified by fabio)

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 (2)

0ad.packaging.tar.gz (5.8 KB ) - added by fabio 14 years ago.
resources.tar.gz (9.0 KB ) - added by Sergio Fabian Vier 14 years ago.
updated resources

Download all attachments as: .zip

Change History (19)

by fabio, 14 years ago

Attachment: 0ad.packaging.tar.gz added

comment:1 by fabio, 14 years ago

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 by philip, 14 years ago

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

by Sergio Fabian Vier, 14 years ago

Attachment: resources.tar.gz added

updated resources

in reply to:  2 comment:3 by Sergio Fabian Vier, 14 years ago

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 by Philip Taylor, 14 years ago

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 by (none), 14 years ago

Milestone: Unclassified

Milestone Unclassified deleted

comment:6 by Andrew, 14 years ago

Milestone: Backlog

comment:7 by fabio, 14 years ago

Can the man page and the translation of desktop file:

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

be merged?

comment:8 by Philip Taylor, 14 years ago

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 by philip, 14 years ago

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

comment:10 by historic_bruno, 12 years ago

Component: Non-game systemsBuild & Packages

comment:11 by fabio, 12 years ago

Description: modified (diff)
Milestone: BacklogAlpha 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 by fabio, 12 years ago

Description: modified (diff)

comment:13 by Kieran P, 12 years ago

Resolution: fixed
Status: newclosed

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 by ben, 12 years ago

In 11613:

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

comment:15 by historic_bruno, 12 years ago

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

comment:16 by Vincent Cheng, 12 years ago

Cc: Vincentc1208@… added
Keywords: patch review added
Milestone: Alpha 10Alpha 11
Resolution: fixed
Status: closedreopened
Summary: packaging resources[ PATCH ] packaging resources

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 by Kieran P, 12 years ago

Keywords: patch review removed
Milestone: Alpha 11Alpha 10
Resolution: fixed
Status: reopenedclosed
Summary: [ PATCH ] packaging resourcespackaging resources

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.