[rott] 01/01: Show a dialog box if files are missing. Based on patches and wordings by Alexandre Detiste, thank you very much (Closes: #790407).
Fabian Greffrath
fabian at moszumanska.debian.org
Mon Jun 29 12:08:13 UTC 2015
This is an automated email from the git hooks/post-receive script.
fabian pushed a commit to branch master
in repository rott.
commit ff5c0ecc6c8ecfdfced6f8698bdb6f7484cd2ee9
Author: Fabian Greffrath <fabian at debian.org>
Date: Mon Jun 29 14:08:10 2015 +0200
Show a dialog box if files are missing. Based on patches and wordings by Alexandre Detiste, thank you very much (Closes: #790407).
* Show a dialog box if files are missing. Based on patches and
wordings by Alexandre Detiste, thank you very much (Closes: #790407).
+ Replace the unhelpful "W_InitFiles: no files found" error message
with instructions to read README.Debian.
+ Improve README.Debian with clear instructions on how to use
game-data-packager to locate/download the game data, build the
possible rott-*-data Debian package(s), and install it/them.
+ Add "Suggests: zenity | kde-baseapps-bin | x11-utils | libnotify-bin"
for the supported dialog box applications.
---
debian/README.Debian | 21 ++++++++++--
debian/changelog | 14 ++++++++
debian/control | 2 ++
debian/patches/no-files-found-dialog.patch | 54 ++++++++++++++++++++++++++++++
debian/patches/series | 1 +
debian/rott.install | 2 +-
debian/rott.links | 2 +-
7 files changed, 92 insertions(+), 4 deletions(-)
diff --git a/debian/README.Debian b/debian/README.Debian
index 312394a..9cff3ed 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -8,12 +8,29 @@ Rise of the Triad for Debian
In order to select which variant is started by the 'rott' command and the
desktop and menu files, Debian's 'update-alternatives' mechanism is used:
.
- $ update-alternatives --config rott
+ # update-alternatives --config rott
.
By default, the 'rott-shareware' alternative is preferred.
.
The game expects its data files in the '/usr/share/games/rott' directory
(with upper case file names), so make sure to also copy the appropriate data
files into this directory when changing the 'rott' alternative.
+ .
+ To automate this task, you may want to install the 'game-data-packager'
+ package and run the following commands, which will locate/download the data,
+ build the possible rott-*-data Debian package(s), and install it/them.
+ .
+ $ game-data-packager -i rott
+ .
+ This will download the shareware episode and also try to automaticaly
+ process the commercial episode as sold by Steam (by looking in various
+ popular locations).
+ .
+ $ game-data-packager -i rott /path/to/setup_rise_of_the_triad_*.exe
+ .
+ This will download the shareware episode and process the commercial episode
+ as sold by GOG.com.
+ .
+ For more information, please see the manual page for game-data-packager(6).
- -- Fabian Greffrath <fabian+debian at greffrath.com> Tue, 12 Feb 2013 09:41:26 +0100
+ -- Fabian Greffrath <fabian at debian.org> Mon, 29 Jun 2015 13:51:26 +0200
diff --git a/debian/changelog b/debian/changelog
index 47ece40..83f508c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,17 @@
+rott (1.1.2+svn287-2) UNRELEASED; urgency=medium
+
+ * Show a dialog box if files are missing. Based on patches and
+ wordings by Alexandre Detiste, thank you very much (Closes: #790407).
+ + Replace the unhelpful "W_InitFiles: no files found" error message
+ with instructions to read README.Debian.
+ + Improve README.Debian with clear instructions on how to use
+ game-data-packager to locate/download the game data, build the
+ possible rott-*-data Debian package(s), and install it/them.
+ + Add "Suggests: zenity | kde-baseapps-bin | x11-utils | libnotify-bin"
+ for the supported dialog box applications.
+
+ -- Fabian Greffrath <fabian at debian.org> Mon, 29 Jun 2015 13:58:51 +0200
+
rott (1.1.2+svn287-1) unstable; urgency=medium
* New upstream SVN snapshot.
diff --git a/debian/control b/debian/control
index 25364c1..f99cb91 100644
--- a/debian/control
+++ b/debian/control
@@ -24,6 +24,8 @@ Depends:
Recommends:
game-data-packager,
musescore-soundfont-gm | freepats
+Suggests:
+ zenity | kde-baseapps-bin | x11-utils | libnotify-bin
Description: SDL-Port of Rise of the Triad
Rise of the Triad is a high quality, fast scrolling first-person perspective
3D action game. It includes a lot of destructive enemies, an arsenal of
diff --git a/debian/patches/no-files-found-dialog.patch b/debian/patches/no-files-found-dialog.patch
new file mode 100644
index 0000000..6437398
--- /dev/null
+++ b/debian/patches/no-files-found-dialog.patch
@@ -0,0 +1,54 @@
+Description: show a dialog box if files are missing
+Author: Alexandre Detiste <alexandre.detiste at gmail.com>,
+ Fabian Greffrath <fabian at debian.org>
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=790407
+
+--- a/rott/rt_util.c
++++ b/rott/rt_util.c
+@@ -446,6 +446,34 @@ void Error (char *error, ...)
+ #if USE_SDL
+ SDL_Quit();
+ #endif
++ #ifdef PLATFORM_UNIX
++ char* argv[6];
++ char zenity_buf[300] = "--text=\0";
++ strncat(zenity_buf,msgbuf,sizeof(zenity_buf)-8);
++ pid_t child_pid;
++ child_pid = fork();
++ if(child_pid == 0) {
++ argv[0] = "zenity";
++ argv[1] = "--error";
++ argv[2] = zenity_buf;
++ argv[3] = "--title=ROTT";
++ argv[4] = NULL;
++ execvp(argv[0], argv);
++ argv[0] = "kdialog";
++ argv[2] = msgbuf;
++ execvp(argv[0], argv);
++ argv[0] = "xmessage";
++ argv[1] = "-center";
++ argv[3] = NULL;
++ execvp(argv[0], argv);
++ argv[0] = "notify-send";
++ argv[1] = "ROTT";
++ argv[3] = "-i";
++ argv[4] = "dialog-error";
++ argv[5] = NULL;
++ execvp(argv[0], argv);
++ }
++ #endif
+
+ exit (1);
+ }
+--- a/rott/w_wad.c
++++ b/rott/w_wad.c
+@@ -235,7 +235,8 @@ void W_InitMultipleFiles (char **filenam
+ W_AddFile (*filenames);
+
+ if (!numlumps)
+- Error ("W_InitFiles: no files found");
++ Error ("W_InitFiles: One or more of the required ROTT 1.3 data files could not be found.\n\
++ Please read the README.Debian file.");
+
+ //
+ // set up caching
diff --git a/debian/patches/series b/debian/patches/series
index 46d5c04..4eebc45 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
10-all-variants.patch
+no-files-found-dialog.patch
diff --git a/debian/rott.install b/debian/rott.install
index 3953ae8..4fff5cd 100644
--- a/debian/rott.install
+++ b/debian/rott.install
@@ -2,5 +2,5 @@
../debian/rott.svg /usr/share/icons/hicolor/scalable/apps/
../debian/rott.xpm /usr/share/pixmaps/
../misc/rott.desktop /usr/share/applications/
-rott-shareware /usr/games/
rott-commercial /usr/games/
+rott-shareware /usr/games/
diff --git a/debian/rott.links b/debian/rott.links
index ec37eb2..73db729 100644
--- a/debian/rott.links
+++ b/debian/rott.links
@@ -1,2 +1,2 @@
-usr/share/man/man6/rott.6.gz usr/share/man/man6/rott-shareware.6.gz
usr/share/man/man6/rott.6.gz usr/share/man/man6/rott-commercial.6.gz
+usr/share/man/man6/rott.6.gz usr/share/man/man6/rott-shareware.6.gz
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/rott.git
More information about the Pkg-games-commits
mailing list