maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Games (https://talk.maemo.org/forumdisplay.php?f=12)
-   -   Ggmud 0.8.1 (https://talk.maemo.org/showthread.php?t=28011)

tobiasj 2009-03-31 23:27

Ggmud 0.8.1
 
I still have to hildonize the menus (it really needs the menu-bar gone...) and such, but while I learn hildon I thought I would post the working copy of GGMUD so those who use mud clients a lot more than I do can test it's functionality.

****UPDATE*****

Thanks to qwerty12 the menus are now hildonized and I have added a fullscreen toggle to it so that you can choose what works best. The latest version is now on my website and you can download it using the link below...
***************

You can find the instructions and such on the GGMUD site.

You can download the tar from my website ggmud.tar.gz

Untar it from / and it will install the bin to /usr/share/games and a desktop file and icon.

see screen shots below.

-John

http://www.n8ftl.com/maemo/images/ggmud/ggmud1.png

http://www.n8ftl.com/maemo/images/ggmud/ggmud2.png

http://www.n8ftl.com/maemo/images/ggmud/ggmud3.png

tobiasj 2009-04-01 00:56

Re: Ggmud 0.8.1
 
I believe I may have messed up the .desktop file, as mine no longer runs from the icon. let me do a quickl reinstall and I will re-poist it if need be.. you can still run it from /usr/share/games/ggmud


it is a chmod issue with the ggmud binary, I am not sure if the one in the tar is effected or not so I am going to make a new one and post it in a moment, you can remedy the original with a chmod +x /usr/share/games/ggmud.

*Update* the new tar is posted... should work fine now.
-John

Addison 2009-04-01 01:20

Re: Ggmud 0.8.1
 
1 Attachment(s)
This looks awesome!

Hey, any good places you could recommend?

Also, do we need to use our own Xterm font for this, if so any good ones that you could suggest?

I'm currently using a custom Vera Mono font that gives me an 80x25 screen but since I need to use Xkbd, I actually only get an 80x24 display.

Here's a screenshot of the font:
http://img23.imageshack.us/img23/1428/98036407eu1.png

Thanks!

Attachment 3290

tobiasj 2009-04-01 01:55

Re: Ggmud 0.8.1
 
Quote:

Originally Posted by Addison (Post 276263)
This looks awesome!

Hey, any good places you could recommend?

Also, do we need to use our own Xterm font for this, if so any good ones that you could suggest?

I'm currently using a custom Vera Mono font that gives me an 80x25 screen but since I need to use Xkbd, I actually only get an 80x24 display.

Here's a screenshot of the font:

Thanks!

I play on Dark Forces (as you can probably tell from the screen cap) and on the discworld mud. but you can find a ton of them here

Mudconnect.com

There is a font selection menu in the options (see screenshot) and I am not sure if you can add any, I will look at the code and see if I can add that one.

http://www.n8ftl.com/maemo/images/ggmud/ggmud4.png

qwerty12 2009-04-01 17:30

Re: Ggmud 0.8.1
 
For hildon menus:

Code:

diff -ur ggmud-0.8.1~svn236.orig/Makefile ggmud-0.8.1~svn236/Makefile
--- ggmud-0.8.1~svn236.orig/Makefile        2008-10-07 10:16:18.000000000 +0100
+++ ggmud-0.8.1~svn236/Makefile        2009-04-01 18:18:47.000000000 +0100
@@ -9,8 +9,8 @@
 CXX ?= g++
 INCDIR = -Itt -Ilua -Izlib -Ihttpfetch
 COMMONLIBS = -Ltt -ltt -Llua -llua -Lzlib -lzlib -Lhttpfetch -lfetch
-CFLAGS = $(INCDIR) `pkg-config gtk+-2.0 --cflags` $(GLOBAL_CFLAGS) -DENABLE_BINRELOC -DBR_PTHREADS=0 
-LIBS = $(COMMONLIBS) `pkg-config gtk+-2.0 gthread-2.0 --libs`
+CFLAGS = $(INCDIR) `pkg-config gtk+-2.0 hildon-1 --cflags` $(GLOBAL_CFLAGS) -DENABLE_BINRELOC -DBR_PTHREADS=0 
+LIBS = $(COMMONLIBS) `pkg-config gtk+-2.0 hildon-1 gthread-2.0 --libs`
 
 VERSION := $(shell grep VERSION config.h | cut -d\" -f2 )
 OS:=        $(uname)
diff -ur ggmud-0.8.1~svn236.orig/interface.c ggmud-0.8.1~svn236/interface.c
--- ggmud-0.8.1~svn236.orig/interface.c        2008-04-23 17:56:53.000000000 +0100
+++ ggmud-0.8.1~svn236/interface.c        2009-04-01 18:28:40.000000000 +0100
@@ -14,6 +14,7 @@
 
 #include <gdk/gdkkeysyms.h>
 #include <gtk/gtk.h>
+#include <hildon/hildon-program.h>
 
 #include "callbacks.h"
 #include "interface.h"
@@ -1568,7 +1569,7 @@
 
  accel_group = gtk_accel_group_new ();
 
-  window_main = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  window_main = hildon_window_new();
  gtk_widget_set_size_request (window_main, 600, 400);
  gtk_container_set_border_width (GTK_CONTAINER (window_main), 3);
  gtk_window_set_title (GTK_WINDOW (window_main), "GGMud");
@@ -1577,9 +1578,9 @@
  gtk_widget_show (vbox17);
  gtk_container_add (GTK_CONTAINER (window_main), vbox17);
 
-  menubar_main = gtk_menu_bar_new ();
+  menubar_main = gtk_menu_new ();
  gtk_widget_show (menubar_main);
-  gtk_box_pack_start (GTK_BOX (vbox17), menubar_main, FALSE, FALSE, 0);
+  hildon_window_set_menu(window_main, menubar_main);
 
  menuitem1 = gtk_menu_item_new_with_mnemonic ("_File");
  gtk_widget_show (menuitem1);


tobiasj 2009-04-01 18:02

Re: Ggmud 0.8.1
 
Hey! thanks! but um... what is it?

:D


-John

qwerty12 2009-04-01 18:10

Re: Ggmud 0.8.1
 
:p

A diff/patch. If you copy and paste the contents of that into a text editor and save it as a text file in your ggmud source folder, you can then cd to your source folder and run "patch -p1 < "name of the file you saved patch as". After that, you can run make and your resultant binary will have the hildon menus. :)

tobiasj 2009-04-01 18:18

Re: Ggmud 0.8.1
 
Quote:

Originally Posted by qwerty12 (Post 276556)
:p

A diff/patch. If you copy and paste the contents of that into a text editor and save it as a text file in your ggmud source folder, you can then cd to your source folder and run "patch -p1 < "name of the file you saved patch as". After that, you can run make and your resultant binary will have the hildon menus. :)

ok so who, what, how.... you just knock that out or what?

btw how long should it take? it has been 'patching' for about 3 minutes now...

never mind missed a "

though 3 outa 3 hunks failed in interface.c I need to look into those lines..


-John

tobiasj 2009-04-01 18:24

Re: Ggmud 0.8.1
 
oh, and how does one access the hardware buttons in xephyr? (menu for example)
never needed them before today...

**
never mind, good grief.. some days I am suprised I can remember how to breathe...
**

-John

tobiasj 2009-04-01 18:29

Re: Ggmud 0.8.1
 
Quote:

Originally Posted by qwerty12 (Post 276556)
:p

A diff/patch. If you copy and paste the contents of that into a text editor and save it as a text file in your ggmud source folder, you can then cd to your source folder and run "patch -p1 < "name of the file you saved patch as". After that, you can run make and your resultant binary will have the hildon menus. :)

I wish I could click the thanks button more than once...

That worked so well I just can not believe it.

There are a few things I would like to add now, for example allowing it to pop out of fullscreen now that the menu is gone would be great. I think I can figure that out.

What I want to know is where did that patch/diff come from? did you write (patch?) it?

how would I go about doing the same for a different application?


-John

qwerty12 2009-04-01 18:48

Re: Ggmud 0.8.1
 
Quote:

Originally Posted by tobiasj (Post 276571)
I wish I could click the thanks button more than once...

That worked so well I just can not believe it.

There are a few things I would like to add now, for example allowing it to pop out of fullscreen now that the menu is gone would be great. I think I can figure that out.

What I want to know is where did that patch/diff come from? did you write (patch?) it?

how would I go about doing the same for a different application?


-John

Yeah, that's my patch & code :)

Alas, different programs vary. But, in general, you want to link to hildon-1 (that's my Makefile change), add that hildon include to whatever file you're adding hildon functions to, replace the gtk_window_new toplevel with the hildon_window_new. For the menu, I changed it from a menubar to a normal menu as hildon doesn't like menubars, removed the gtk_box_start as that's how the menubar is shown and replaced it with the hildon menu new. First argument to that function is the hildon window, the second argument is the menu (look at the second argument passed to the gtk_box start for the menu)

if you want to #ifdef hildon code, use #ifdef MAEMO_CHANGES as when you compile against hildon-1, -DMAEMO_CHANGES will be sent to gcc.

tobiasj 2009-04-01 19:47

Re: Ggmud 0.8.1
 
OK fullscreen toggle is in place and working properly. it is quite nice at this point.

I have repacked it and posted it to my website (4-01-2009 3:40pm EST) with the working hildon menu and full screen toggle.

let me know if anything else isn't working.


Thanks,

-John

tobiasj 2009-04-01 20:56

Re: Ggmud 0.8.1
 
Quote:

Originally Posted by qwerty12 (Post 276588)
Yeah, that's my patch & code :)

Alas, different programs vary. But, in general, you want to link to hildon-1 (that's my Makefile change), add that hildon include to whatever file you're adding hildon functions to, replace the gtk_window_new toplevel with the hildon_window_new. For the menu, I changed it from a menubar to a normal menu as hildon doesn't like menubars, removed the gtk_box_start as that's how the menubar is shown and replaced it with the hildon menu new. First argument to that function is the hildon window, the second argument is the menu (look at the second argument passed to the gtk_box start for the menu)

if you want to #ifdef hildon code, use #ifdef MAEMO_CHANGES as when you compile against hildon-1, -DMAEMO_CHANGES will be sent to gcc.

That makes it sound a lot less complicated then I am betting it is.

One other app I am working on is gFTP and I will adapt what you have shown me here to that app and see if I can do it myself. I REALLY appreciate your patch/diff and I wanna learn how to do it myself eventually. Thing is your patch gives me a good map to work from for hildonizing in other apps.

Did you have some way of generating that diff file after making changes to the files or did you create it manually?

I have found a few pdf's and a few websites (including maemo.org's porting apps walkthrough) that touch on hildonizing, but there isnt that one site that really walks you through a gtk application hildon conversion. (though maemo's is real good)

Thanks again,

-John

qwerty12 2009-04-01 21:29

Re: Ggmud 0.8.1
 
Quote:

Originally Posted by tobiasj (Post 276635)
That makes it sound a lot less complicated then I am betting it is.

One other app I am working on is gFTP and I will adapt what you have shown me here to that app and see if I can do it myself. I REALLY appreciate your patch/diff and I wanna learn how to do it myself eventually. Thing is your patch gives me a good map to work from for hildonizing in other apps.

Did you have some way of generating that diff file after making changes to the files or did you create it manually?

I have found a few pdf's and a few websites (including maemo.org's porting apps walkthrough) that touch on hildonizing, but there isnt that one site that really walks you through a gtk application hildon conversion. (though maemo's is real good)

Thanks again,

-John

gFTP has already been hildonized by me and yerga (OK, yerga much more than me - I worked on the menu & the packaging) and has been in Extras for a while now.

That diff was generated by having a copy of the original folder, and my modified folder and running "diff -ur "original folder" "modified folder" > my.diff". -a and -p can also be nice options too, depending on the situation.

Best Regards,
Faheem

tobiasj 2009-04-01 21:45

Re: Ggmud 0.8.1
 
Quote:

Originally Posted by qwerty12 (Post 276644)
gFTP has already been hildonized by me and yerga (OK, yerga much more than me - I worked on the menu & the packaging) and has been in Extras for a while now.

That diff was generated by having a copy of the original folder, and my modified folder and running "diff -ur "original folder" "modified folder" > my.diff". -a and -p can also be nice options too, depending on the situation.

Best Regards,
Faheem

yeah, I saw that. there is a new ('NEW') version of gFTP, (.19) and I wanted to use it as a learning experience (I figured since it had been done already it COULD be done and that was half the battle...) Besides, I couldnt find anything else to work on. ;)


Ah, so that is how it is done.. OK I will try that myself and see what happens... Thanks!

-John

R2ll2r 2011-07-27 08:15

Re: Ggmud 0.8.1
 
Quote:

Originally Posted by Addison (Post 276263)
This looks awesome!

Hey, any good places you could recommend?

Quote:

Originally Posted by qwerty12 (Post 276644)
....

Sorry to bump an old Thread...

Does anyone (Addison, Qwerty12, or others)
know how to keep the buffer at the end of the output window?
similar to:
"/more off" (in Tinyfugue) or
"#buffer end" (afaik in tintin)

any help greatly appreciated.
modifying the review buffer size (in vi, or from gui) doesnt seem to stick, or to work...
perhaps I'm missing something?

Thanks :D

Addison 2011-07-28 02:03

Re: Ggmud 0.8.1
 
^ I'm not seeing an option for this either.

There doesn't seem to be any good documentation for Ggmud.

Why not just use Tinyfugue? I think it works perfect on my end.


All times are GMT. The time now is 14:02.

vBulletin® Version 3.8.8