Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 115997 - jrisk in-game help browser is hard-coded to firefox
Summary: jrisk in-game help browser is hard-coded to firefox
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Games
Depends on:
Reported: 2005-12-18 17:42 UTC by Denilson Sá Maia
Modified: 2007-10-16 01:16 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---

jRisk-firefox.patch (jRisk-firefox.patch,382 bytes, patch)
2006-07-14 07:40 UTC, Michael Vogt
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Denilson Sá Maia 2005-12-18 17:42:17 UTC
I've just merged jrisk. Looks a nice game, the game itself works, but all these help-related buttons don't work:
- "[H]elp manual" button at main menu
- "?" blue button at new-game menu
- "Manual" button at in-game menu
When clicked, they do nothing. No message is printed at terminal, either.

$  emerge -pv sun-jdk
[ebuild   Rf  ] dev-java/sun-jdk-  +X +alsa -browserplugin +doc -examples -jce -mozilla +nsplugin 0 kB

$  emerge -pv jrisk
[ebuild   R   ] games-board/jrisk-  -jikes 0 kB

$ emerge --info
Gentoo Base System version 1.6.13
Portage (default-linux/x86/2005.1, gcc-3.3.6, glibc-2.3.5-r2, i686)
System uname: i686 Pentium III (Coppermine)
dev-lang/python:     2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.20
virtual/os-headers:  2.6.11-r2
CFLAGS="-O2 -pipe -march=i686 -mcpu=pentium3 -fomit-frame-pointer"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -pipe -march=i686 -mcpu=pentium3 -fomit-frame-pointer"
FEATURES="autoconfig distlocks sandbox sfperms strict"
USE="x86 7zip X aac acpi alsa apache2 arts audiofile avi bitmap-fonts bzip2 cdr clamav crypt cups curl divx4linux dts dv dvd dvdr dvdread emboss encode esd ethereal exif expat fam ffmpeg flac foomaticdb fortran gd gdbm gif gimp gimpprint glut gphoto2 gpm gstreamer gtk gtk2 gtkhtml gzip idn imagemagick imlib ipv6 jack java joystick jpeg kdeenablefinal lcms libg++ libwww live lm_sensors lua mad matroska mhash mikmod mmx mng motif mp3 mpeg mysql ncurses nls no-htdocs nsplugin nvidia ogg oggvorbis openal opengl pam pcre pdflib perl png python qt quicktime rar readline recode scanner sdl slang spell sse ssl svg tcltk tcpd tetex theora tiff truetype truetype-fonts type1-fonts udev unicode usb vcd vorbis win32codecs wmf xanim xine xinerama xml2 xpm xv xvid zlib userland_GNU kernel_linux elibc_glibc"
Comment 1 Allen Brooker (AllenJB) 2006-01-20 18:13:34 UTC
All 3 buttons work for me on games-board/jrisk- on amd64
Comment 2 Michael Vogt 2006-07-14 07:39:09 UTC
I browsed through the jRisk code and found mozilla being the default (hardcoded) "help viewer". A more sane choice would be firefox IMO, the following patch just switches mozilla to firefox in risk/ If requested by the developers I'll make an IUSE="doc"-type ebuild which would then require firefox as a dep.
Comment 3 Michael Vogt 2006-07-14 07:40:49 UTC
Created attachment 91707 [details, diff]
Comment 4 Denilson Sá Maia 2006-07-14 07:49:24 UTC
I would prefer to use "links -g" as my help viewer.

Is there any way to not hardcode that setting?

Well, even if it will be kept hardcoded, please add some einfo/ewarn at ebuild, explaining it.
Comment 5 Michael Vogt 2006-07-14 08:00:59 UTC
Not hardcoding a single browser would go way beyond the scope of a patch, that would be the job of the actual game developer. The best we can do is to make it work for as many people as possible, that's why I suggested using firefox.
Comment 6 Denilson Sá Maia 2006-07-14 17:27:11 UTC
(In reply to comment #5)
> The best we can do is to make it work for as many people as possible,
> that's why I suggested using firefox.

I understand. I have another suggestion, but I'm not sure if it is feasible.

The ebuild could detect which browser is currently installed (among a list of available browsers: links, dillo, mozilla-firefox{,-bin}, mozilla, seamonkey, opera, ...) and then apply the patch according to which is installed.

Of course, this has a problem: if the user uninstall any of the browsers, the package would be broken and would need to be re-emerged. But, anyway, without any patch it is already broken...
Comment 7 Mr. Bones. (RETIRED) gentoo-dev 2006-07-14 21:20:19 UTC
This really needs to be addressed upstream.  Any general solution should be directed that way.
Comment 8 Michael Vogt 2006-07-15 02:54:48 UTC
I wrote a mail to the developer, we'll see if he's willing to provide a solution.
Comment 9 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2006-08-21 00:43:48 UTC
Seems to be fixed as of games-board/jrisk-
Comment 10 Mr. Bones. (RETIRED) gentoo-dev 2006-08-21 00:53:57 UTC
Really?  It works for you even though you don't have firefox installed?
Comment 11 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2006-08-21 01:24:34 UTC
(In reply to comment #10)
> Really?  It works for you even though you don't have firefox installed?

Sorry, no. I saw a BrowserLauncher class and thought it really detects browser, but on linux firefox is hardcoded.

By the way:
Suggestion #1: change bug summary to something like "browser path hardcoded in games-board/jrisk"
Suggestion #2: make jRisk-firefox.patch obsolete (in there is firefox instead of mozilla, so this patch is not needed IMO)
Comment 12 Mr. Bones. (RETIRED) gentoo-dev 2006-08-21 08:18:55 UTC
Comment on attachment 91707 [details, diff]

As mentioned in previous comments, simply changing the hard-coding isn't enough.  The code should figure out the right browser to use.
Comment 13 Tristan Heaven (RETIRED) gentoo-dev 2006-10-03 18:03:24 UTC
Comment 14 Mr. Bones. (RETIRED) gentoo-dev 2007-10-16 01:16:51 UTC
Needs to be fixed by upstream.