A small contribution

8 views
Skip to first unread message

baltasarq

unread,
Oct 15, 2009, 12:20:20 PM10/15/09
to garglk-dev
Hi, there !

I've downloaded the .deb package in my Ubuntu 9.04 with lxde, and it
works fine. I'm really happy with it, and I have added two goodies:

a) A gargoyle.desktop file in the /usr/share/applications/ directory
(this place is the standard freedesktop place), with the following
content:

[Desktop Entry]
Name=Gargoyle
Comment=Play interactive fiction stories
Exec=gargoyle %F
Icon=gargoyle
Type=Application

b) A simple icon, modified from the one from lxterminal, with a '>' in
its screen. Unfortunately, it seems that I cannot post attachments
here. I placed this icon, gargoyle.png in /usr/share/pixmaps.

After that, I could right-click a .z5 or whatever if file and
associate it easily with Gargoyle, so Gargoyle will be launched every
time the file is clicked from then on.

I like Gargoyle very much; nice work and thank you.

Sylvain Beucler

unread,
Oct 15, 2009, 1:54:18 PM10/15/09
to baltasarq, garglk-dev
On Thu, Oct 15, 2009 at 09:20:20AM -0700, baltasarq wrote:
>
> Hi, there !
>
> I've downloaded the .deb package in my Ubuntu 9.04 with lxde, and it
> works fine. I'm really happy with it, and I have added two goodies:
>
> a) A gargoyle.desktop file in the /usr/share/applications/ directory
> (this place is the standard freedesktop place), with the following
> content:
>
> [Desktop Entry]
> Name=Gargoyle
> Comment=Play interactive fiction stories
> Exec=gargoyle %F
> Icon=gargoyle
> Type=Application

This sounds like a good idea, but it's a bit weird to have an icon the
menu that does nothing (i.e. print "usage: gargoyle <gamefile>" in
~/.xsession-errors ;)).

Maybe gargoyle could show an "Open Game" dialog instead?


> b) A simple icon, modified from the one from lxterminal, with a '>' in
> its screen. Unfortunately, it seems that I cannot post attachments
> here. I placed this icon, gargoyle.png in /usr/share/pixmaps.
>
> After that, I could right-click a .z5 or whatever if file and
> associate it easily with Gargoyle, so Gargoyle will be launched every
> time the file is clicked from then on.
>
> I like Gargoyle very much; nice work and thank you.

That's a nice idea too :)

There's even a way to automatically associate .z5 and other extensions
to gargoyle.

See:
http://git.savannah.gnu.org/cgit/freedink/dfarc.git/tree/share/freedink-mime.xml.in
for an example and
http://git.savannah.gnu.org/cgit/freedink/dfarc.git/tree/share/Makefile.am
for how to make Gnome/KDE take it into account.

See also
http://kapo-cpp.blogspot.com/2008/02/register-your-own-mime-type-on-free.html
for an introduction. We probably need a few "magic numbers" to
identify Z-Machine games and other type of games.

--
Sylvain

baltasarq

unread,
Oct 16, 2009, 4:40:33 AM10/16/09
to garglk-dev

Hi !

> This sounds like a good idea, but it's a bit weird to have an icon the
> menu that does nothing (i.e. print "usage: gargoyle <gamefile>" in
> ~/.xsession-errors ;)).
>
> Maybe gargoyle could show an "Open Game" dialog instead?

I think that would be a nice idea. However, in UNIX gargoyle is just a
script. Given that, the solution would be to a) create a gtk
application (probably trivial), or b) use gringosh, or something like
that, to display an open dialog from the script.

http://www.badpenguin.org/libgringo

> > b) A simple icon, modified from the one from lxterminal, with a '>' in
> > its screen. Unfortunately, it seems that I cannot post attachments
> > here. I placed this icon, gargoyle.png in /usr/share/pixmaps.



>
> > After that, I could right-click a .z5 or whatever if file and
> > associate it easily with Gargoyle, so Gargoyle will be launched every
> > time the file is clicked from then on.
>
> > I like Gargoyle very much; nice work and thank you.
>
> That's a nice idea too :)
>
> There's even a way to automatically associate .z5 and other extensions
> to gargoyle.
>
> See:http://git.savannah.gnu.org/cgit/freedink/dfarc.git/tree/share/freedi...
> for an example andhttp://git.savannah.gnu.org/cgit/freedink/dfarc.git/tree/share/Makefi...
> for how to make Gnome/KDE take it into account.
>
> See alsohttp://kapo-cpp.blogspot.com/2008/02/register-your-own-mime-type-on-f...

baltasarq

unread,
Oct 16, 2009, 4:40:35 AM10/16/09
to garglk-dev

Hi !

> This sounds like a good idea, but it's a bit weird to have an icon the
> menu that does nothing (i.e. print "usage: gargoyle <gamefile>" in
> ~/.xsession-errors ;)).
>
> Maybe gargoyle could show an "Open Game" dialog instead?

I think that would be a nice idea. However, in UNIX gargoyle is just a
script. Given that, the solution would be to a) create a gtk
application (probably trivial), or b) use gringosh, or something like
that, to display an open dialog from the script.

http://www.badpenguin.org/libgringo

> > b) A simple icon, modified from the one from lxterminal, with a '>' in
> > its screen. Unfortunately, it seems that I cannot post attachments
> > here. I placed this icon, gargoyle.png in /usr/share/pixmaps.



>
> > After that, I could right-click a .z5 or whatever if file and
> > associate it easily with Gargoyle, so Gargoyle will be launched every
> > time the file is clicked from then on.
>
> > I like Gargoyle very much; nice work and thank you.
>
> That's a nice idea too :)
>
> There's even a way to automatically associate .z5 and other extensions
> to gargoyle.
>
> for how to make Gnome/KDE take it into account.
>
> See alsohttp://kapo-cpp.blogspot.com/2008/02/register-your-own-mime-type-on-f...

Eric F.

unread,
Oct 17, 2009, 7:09:30 AM10/17/09
to garglk-dev
such an open dialog would be really nice, libgringo seems the best
tool for this.

About the mime type, I've made some icons for IF, and file
associations as well:
see
http://anamnese.online.fr/site2/index.php?page=esclinux#toc6

and http://download.tuxfamily.org/esclinuxcd/ressources/icons/

Sylvain Beucler

unread,
Oct 17, 2009, 7:17:32 AM10/17/09
to Eric F., garglk-dev
On Sat, Oct 17, 2009 at 04:09:30AM -0700, Eric F. wrote:
>
> such an open dialog would be really nice, libgringo seems the best
> tool for this.

On the bad side, the latest release is from 2006, and it doesn't seem
to be packaged in distros.

--
Sylvain

Eric Forgeot

unread,
Oct 17, 2009, 8:18:44 AM10/17/09
to be...@beuc.net, garglk-dev
I think there is another tool which is supporting both console and gtk
mode, maybe zenity?



2009/10/17, Sylvain Beucler <be...@beuc.net>:

baltasarq

unread,
Oct 19, 2009, 3:56:55 AM10/19/09
to garglk-dev

Hello !

> I think there is another tool which is supporting both console and gtk
> mode, maybe zenity?

Zenity seems to be the simplest and best fit answer for me. It is
packaged by default in Ubuntu, so I suppose it is also probably
available in other distros.

I've made a script with the required behaviour using two lines and
less than two minutes ($? stores the answer):

==
zenity --file-selection
echo $?
==

However, another possibility is to convert the gargoyle script for
UNIX in a GTK application, I've also wondered why the Windows version
has a binary selector while the Linux one is a simple script, with
less functionality (at least, until now). It could even be possible to
create a cross-platform launcher in Gtk. I can do that, provided there
is interest. I mean, the same program would be the same for all
platforms. Or maybe I'm missing something big and this cannot be done.

Ben Cressey

unread,
Oct 19, 2009, 11:10:56 AM10/19/09
to balt...@gmail.com, garglk-dev
However, another possibility is to convert the gargoyle script for
UNIX in a GTK application, I've also wondered why the Windows version
has a binary selector while the Linux one is a simple script, with
less functionality (at least, until now). It could even be possible to
create a cross-platform launcher in Gtk. I can do that, provided there
is interest. I mean, the same program would be the same for all
platforms. Or maybe I'm missing something big and this cannot be done.

This is indeed my intention - to port launcher.c to GTK.  I just haven't found the time to do it yet, but it should be straightforward.  I think that makes more sense than introducing another package dependency on the Linux side.  If you want to take a crack at the port, please feel free.  I would be delighted to accept patches.

Ultimately launcher.c ought to be replaced with a Treaty of Babel compliant front-end.  I like the game browser model that Fizmo uses, and I think something similar could work well with Gargoyle's minimalist UI.

J. Baltasar García Perez-Schofield

unread,
Oct 19, 2009, 11:36:04 AM10/19/09
to Ben Cressey, balt...@gmail.com, garglk-dev

Hi !

> This is indeed my intention - to port

> launcher.c<http://code.google.com/p/garglk/source/browse/trunk/garglk/launcher.c>to


> GTK. I just haven't found the time to do it yet, but it should be
> straightforward. I think that makes more sense than introducing another
> package dependency on the Linux side. If you want to take a crack at the
> port, please feel free. I would be delighted to accept patches.

Mmm... I think that what you want is to have a cross-platform launcher.c. I mean, if it uses GTK, then it will be needed to provide the Gtk libraries in Windows (in Linux that's taken for granted). So you want something that, with conditional compilation, will use native Windows in Win32 and Gtk in UNIX. Is that it?

-- Baltasar García Perez-Schofield (jbga...@uvigo.es)
Dpt. Informática, Universidad de Vigo, España
http://webs.uvigo.es/jbgarcia/

Ben Cressey

unread,
Oct 19, 2009, 12:20:20 PM10/19/09
to jbga...@uvigo.es, balt...@gmail.com, garglk-dev
       Mmm... I think that what you want is to have a cross-platform launcher.c. I mean, if it uses GTK, then it will be needed to provide the Gtk libraries in Windows (in Linux that's taken for granted). So you want something that, with conditional compilation, will use native Windows in Win32 and Gtk in UNIX. Is that it?

Right, the goal is to use the native windows API for the platform in question.  A version of launcher.c with conditional compilation would be perfect.

Regards,
Ben

Dannii

unread,
Oct 20, 2009, 9:10:36 AM10/20/09
to garglk-dev
On Oct 20, 1:10 am, Ben Cressey <bcres...@gmail.com> wrote:
>
> Ultimately launcher.c ought to be replaced with a Treaty of Babel compliant
> front-end.  I like the game browser model that
> Fizmo<http://spellbreaker.org/~chrender/fizmo/screenshots/>uses, and I
> think something similar could work well with Gargoyle's
> minimalist UI.

Oohhh I like that, I've never seen Fizmo before. I may use a UI like
that with Parchment too... thanks for the pointer.

Eric Forgeot

unread,
Oct 24, 2009, 12:52:35 PM10/24/09
to garglk-dev
I think meanwhile it should be possible to add this code on the linux side, so even if zenity is not available (less likely in modern distributions), it should display the usage:

if [ x"$1" == x ]
then
        if [ -e /usr/bin/zenity ]
        then
                GAME=`zenity --title "Open game" --file-selection`
                gargoyle $GAME
        else
                echo "usage: gargoyle <gamefile>"
                exit 1
        fi
fi



2009/10/19 Ben Cressey <bcre...@gmail.com>

baltasarq

unread,
Oct 25, 2009, 6:26:31 AM10/25/09
to garglk-dev
Hi, there !

> I think meanwhile it should be possible to add this code on the linux side,
> so even if zenity is not available (less likely in modern distributions), it
> should display the usage:

The other day I sent to Ben the new launcher.c, surely he will do the
final tests and include it in the next release of Gargoyle. I'm very
glad to be helpful.

Regards,
Baltasar

Ben Cressey

unread,
Oct 26, 2009, 1:07:25 PM10/26/09
to balt...@gmail.com, garglk-dev

Baltasar's contribution will definitely be in the next release.  However, in the meanwhile, I certainly don't have any objections to an updated package for Linux, either official or otherwise, that includes the Zenity script.

The updated launcher.c is close to being merged in.  I had to correct a couple trivial Windows errors and I still need to test the behavior on Linux, but I'm confident that it'll make it into trunk in the next couple days. 

Eric Forgeot

unread,
Oct 26, 2009, 4:24:37 PM10/26/09
to bcre...@gmail.com, balt...@gmail.com, garglk-dev
great new. So it's probably useless to release an update just for this
zenity script which will be removed in the next version.

2009/10/26, Ben Cressey <bcre...@gmail.com>:
Reply all
Reply to author
Forward
0 new messages