Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 115997

Summary: jrisk in-game help browser is hard-coded to firefox
Product: Gentoo Linux Reporter: Denilson Sá Maia <denilsonsa>
Component: [OLD] GamesAssignee: Gentoo Games <games>
Status: RESOLVED UPSTREAM    
Severity: minor CC: phajdan.jr, vcover
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: jRisk-firefox.patch

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-1.4.2.10  +X +alsa -browserplugin +doc -examples -jce -mozilla +nsplugin 0 kB

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

$ emerge --info
Gentoo Base System version 1.6.13
Portage 2.0.51.22-r3 (default-linux/x86/2005.1, gcc-3.3.6, glibc-2.3.5-r2, 2.6.14.2 i686)
=================================================================
System uname: 2.6.14.2 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
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=i686 -mcpu=pentium3 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
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"
DISTDIR="/gentoo/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
PKGDIR="/gentoo/packages"
PORTAGE_TMPDIR="/gentoo/tmp_portage"
PORTDIR="/gentoo/portage"
PORTDIR_OVERLAY="/gentoo/overlay"
SYNC="rsync://rsync.samerica.gentoo.org/gentoo-portage"
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"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS
Comment 1 Allen Brooker (AllenJB) 2006-01-20 18:13:34 UTC
All 3 buttons work for me on games-board/jrisk-1.0.8.5 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/Risk.java. 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]
jRisk-firefox.patch
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-1.0.8.7.
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 1.0.8.7 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]
jRisk-firefox.patch

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
http://www.catb.org/~esr/BROWSER/
Comment 14 Mr. Bones. (RETIRED) gentoo-dev 2007-10-16 01:16:51 UTC
Needs to be fixed by upstream.