Commit ff5c0ecc authored by Fabian Greffrath's avatar Fabian Greffrath

Show a dialog box if files are missing. Based on patches and wordings by...

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.
parent 52b79258
......@@ -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@greffrath.com> Tue, 12 Feb 2013 09:41:26 +0100
-- Fabian Greffrath <fabian@debian.org> Mon, 29 Jun 2015 13:51:26 +0200
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@debian.org> Mon, 29 Jun 2015 13:58:51 +0200
rott (1.1.2+svn287-1) unstable; urgency=medium
* New upstream SVN snapshot.
......
......@@ -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
......
Description: show a dialog box if files are missing
Author: Alexandre Detiste <alexandre.detiste@gmail.com>,
Fabian Greffrath <fabian@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
10-all-variants.patch
no-files-found-dialog.patch
......@@ -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/
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment