Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 47564 - wrong script file for visualboyadvance (vba)
Summary: wrong script file for visualboyadvance (vba)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-11 17:06 UTC by Burberry
Modified: 2004-04-19 19:07 UTC (History)
0 users

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


Attachments
my version of the VBA wrapper (visualboyadvance,1.31 KB, application/octet-stream)
2004-04-19 18:57 UTC, james lische
Details
re-attached as .gz file because firefox seems to hang when trying to download the original attachment. (visualboyadvance.gz,698 bytes, application/x-gzip)
2004-04-19 19:07 UTC, james lische
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Burberry 2004-04-11 17:06:31 UTC
there is some mistake in "/usr/portage/games-emulation/visualboyadvance/files/visualboyadvance"

1. after emerge, default config file for vba is
/usr/share/games/VisualBoyAdvance/VisualBoyAdvance.cfg
and not be
/usr/games/share/VisualBoyAdvance/VisualBoyAdvance.cfg

2. we shouldn't do "cd ~/.${PN}" then 'exec ./${PN} "$@"', because "$@" may not include full path

---------------
correct script:
---------------

PN=VisualBoyAdvance
if ! [ -d ~/.${PN}/save ]; then
        DIR=`pwd`
        mkdir -p ~/.${PN}/save
        cd ~/.${PN}
        ln -s `which ${PN}` .
        cp /usr/share/games/${PN}/${PN}.cfg .
        sed -i \
                -e "s:#saveDir.*:saveDir ${HOME}/.${PN}/save:" \
            -e "s:#captureDir.*:captureDir ${HOME}/.${PN}:" \
            -e "s:#batteryDir.*:batteryDir ${HOME}/.${PN}/save:" \
            ${PN}.cfg
        cd "$DIR"
fi

exec ~/.${PN}/${PN} "$@"

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Mr. Bones. (RETIRED) gentoo-dev 2004-04-11 18:13:15 UTC
Fixed the path in the wrapper.  Not going to fix the cd ~/.${PN} part of the
wrapper.  That's needed for the executable to find the config file.  You
have to supply the full path for the roms.
Comment 2 Burberry 2004-04-12 19:45:51 UTC
in vba 1.7.1, after modify like 1st post, everything goes be fine.
vba 1.7.1 searching config file in current dir, then home dir, otherwise using default.
maybe we needn't do "ln -s `which ${PN}` ." in script, just 'exec ${PN} "$@"' is fine.
Comment 3 james lische 2004-04-19 18:57:19 UTC
Created attachment 29671 [details]
my version of the VBA wrapper

This is my version of the VBA wrapper.

I'm filing under this bug because it appears to resolve problem #2 described
above, allowing relative paths to the ROM image to be used.

This version of the wrapper also does the following:
1) Checks for the users config file seperately from the save directory allowing
the user to easily rebuild it by removing the config and launching the wrapper.

2) Is more verbose, noting to the user a wrapper is being used and what is
being done where.
Comment 4 james lische 2004-04-19 19:07:24 UTC
Created attachment 29672 [details]
re-attached as .gz file because firefox seems to hang when trying to download the original attachment.