SGI: Development

my first port: gXipmsg - Page 1

hi everyone!

at last i finished something for my SGI projects hehe hope you can try this on your side for me, really thanks for any comments and suggestion :)

README:
//created: geo (August 2012)
https://github.com/gorais/gXipmsg.git


gXipmsg is a Motif version of the wonderful tool IPMsg found on this site: http://ipmsg.org/index.html.en
This project taught me a lot about Motif and TCP/UDP. The goal was to design an application that can be build and run
on all *nix platforms with as much as possible no need of modifiyng anything, as inspired by the O'Reilly book and sample codes.

The main goal for this project is to utilize the fast and easy file transfer on any *nix system between other platforms without
setting up NFS,SAMBA or other client-server apps for this purpose. Current release is ALPHA.

APLHA release: (done)
* Messaging thru UDP protocol
* Can broadcast message to specific people

BETA release: (next)
* File/folder transfer thru TCP


gXipmsg was tested on the following:

1. Intel x86:
* Windows XP through Cygwin
* Solaris 10 through VMWare
* FreeBSD 9 with OpenMotif through VBox
* Ubuntu 12.04 with OpenMotif through VBox

2. MIPS:
* IRIX 6.5 on SGI O2 and Octane

If you have any chance to try this on other platform, i'll be delighted to hear your feedback :)
You can contact me via email: [email protected]

To try, please download the Windows version on your Windows box.
Then build using make or GNU make with Makefile.
PLease note, BSD and SUN has its own Makefile, please use this with -f option.

Hope you enjoy trying this as much i enjoyed coding this, thanks!!!


gXipmsg_ALPHA.tar.gz
:Octane: (Sakura) :O2: (Sasuke) :1600SW: (Naruto) ... lil Jesse! (O2 laptop)
“Imagination is more important than knowledge.“ – A. Einstein
ops! did a quick compile test on my O2 and it seems the Makefile has a glitch, sorry when i updated the Makefile i only try it on my Cygwin.
Anyway, i already updated them on my github.
But ill just quote it here for your convenience. (im using FF on my O2 now and cannot attach the Makefile hmmm)

Please overwrite the Makefile with this: (even quote doesn't work, strange FF on my O2...)

DEBUG = -g
INCDIR =
LIBDIR =
FLAGS = -lXm -lXt -lSM -lICE -lX11

gXipmsg : main.o udp.o pack.o appIcon.o sendDialog.o recvDialog.o
cc $(INCDIR) $(DEBUG) -o gXipmsg main.o udp.o pack.o appIcon.o sendDialog.o recvDialog.o $(LIBDIR) $(FLAGS)

main.o : main.c main.h gXipmsg.h
cc $(INCDIR) $(DEBUG) -c main.c

udp.o : udp.c udp.h
cc $(INCDIR) $(DEBUG) -c udp.c

pack.o : pack.c pack.h
cc $(INCDIR) $(DEBUG) -c pack.c

appIcon.o : appIcon.c appIcon.h
cc $(INCDIR) $(DEBUG) -c appIcon.c

sendDialog.o : sendDialog.c sendDialog.h
cc $(INCDIR) $(DEBUG) -c sendDialog.c

recvDialog.o : recvDialog.c recvDialog.h
cc $(INCDIR) $(DEBUG) -c recvDialog.c

clean :
rm -f gXipmsg *.s *.o *.exe *.stackdump
:Octane: (Sakura) :O2: (Sasuke) :1600SW: (Naruto) ... lil Jesse! (O2 laptop)
“Imagination is more important than knowledge.“ – A. Einstein
Screenshots would be nice!
:Onyx2:
mia wrote: Screenshots would be nice!

hi mia! before i sleep here are some quick screenshots that i took:

gXipmsg in action under Cygwin
gXipmsg on WinXP.JPG


IPMsg under WinXP (downloaded for testing)
IPMsg on WinXP.JPG


gXipmsg from Octane
gXipmsg from Octane.jpg


btw, please ignore the time stamps, i forgot to properly set my Octanes system time.
Tomorrow will post some screenshots for Solaris, FreeBSD and Ubuntu, coz all these are just running on my office vmware and vbox. For FreeBSD, it compiles but i cannot get any UDP response, my suspicion is firewall? Any BSD user here can help me? :) thanks... so, will hit the sack now, its 12:47am now... hope you guys can try this for me :) ciao!!
:Octane: (Sakura) :O2: (Sasuke) :1600SW: (Naruto) ... lil Jesse! (O2 laptop)
“Imagination is more important than knowledge.“ – A. Einstein
Just for excitement, this release just contains the main feature which is sending messages thru UDP.
Next release will focus to implement the file/folder transfer thru TCP. With this nice feature, we can share files from any platform
without setting up NFS, Samba or others.. :)

night everyone!
:Octane: (Sakura) :O2: (Sasuke) :1600SW: (Naruto) ... lil Jesse! (O2 laptop)
“Imagination is more important than knowledge.“ – A. Einstein
The SGI Screenshots don't look IRIXy enough. If your app supports Xresources (it should), try setting the following resourced (prefixed by gXipmsg or whatever it's using as an internal name). Use xrdb -merge to merge your new resources with those already set at the start of your session.

Code: Select all

*schemeFileList:        SgiSpec
*useSchemes:            all
*useEnhancedFSB:        True
*sgiMode:               true
geo wrote: Hope you enjoy trying this as much i enjoyed coding this, thanks!!!


Hi,

It looks very nice! Can you please provide also the IRIX binary? I don't have SGI compiler and I'm not able to compile it here :-(
:O2: :Indy: :Indy:
canavan wrote: The SGI Screenshots don't look IRIXy enough. If your app supports Xresources (it should), try setting the following resourced (prefixed by gXipmsg or whatever it's using as an internal name). Use xrdb -merge to merge your new resources with those already set at the start of your session.

Code: Select all

*schemeFileList:        SgiSpec
*useSchemes:            all
*useEnhancedFSB:        True
*sgiMode:               true

hi canavan! thanks for this suggestion! ok will put this on my todolist for the next version :)


jirka wrote: Hi,

It looks very nice! Can you please provide also the IRIX binary? I don't have SGI compiler and I'm not able to compile it here

hi jirka! thanks! ok here is the binary compiled on my Octane. Not sure to ask this but if i compile it on Octane, its runable on any SGI right? or should it compiled on specific machines? My feeling is it should work but i remember O2 uses 32bit while others are 64bit? But i guess these specs doesn't matter right? OK thanks for trying this out! :)
gXipmsg.zip
:Octane: (Sakura) :O2: (Sasuke) :1600SW: (Naruto) ... lil Jesse! (O2 laptop)
“Imagination is more important than knowledge.“ – A. Einstein
other screenshots as promised:

on x86 Solaris 10 via VMware
gXipmsg on x86 Solaris 10 via VMWare.JPG


on Ubuntu 12.04 via Virtual Box
gXipmsg on Ubuntu 12.04 via VirtualBox.JPG


FreeBSD still working with firewall option :(
:Octane: (Sakura) :O2: (Sasuke) :1600SW: (Naruto) ... lil Jesse! (O2 laptop)
“Imagination is more important than knowledge.“ – A. Einstein
geo wrote: Hi,
hi jirka! thanks! ok here is the binary compiled on my Octane. Not sure to ask this but if i compile it on Octane, its runable on any SGI right? or should it compiled on specific machines?


Hello,
Thanks much! It works on my O2 (IRIX 6.5.27) so it must be 32-bit binary. I can even receive messages from the IPmessenger (I have tried the version 0.9 on my old PowerPC iMac)! Only the sending to that IPmessenger don't work for me.
:O2: :Indy: :Indy:
jirka wrote: Hello,
Thanks much! It works on my O2 (IRIX 6.5.27) so it must be 32-bit binary. I can even receive messages from the IPmessenger (I have tried the version 0.9 on my old PowerPC iMac)! Only the sending to that IPmessenger don't work for me.

Hi jirka! Thanks too for trying this :) so I guess it doesn't matter which machine as long as the app is not particular with the bit width right?

Anyway, nice screenshoot! hehe but i notice the gXipmsg didn't show the xpm icon, i forgot to mention that you should place the ipmsg.xpm together with the binary, next version ill add a make install on the makefiles ;)

Oh! i see, sorry i dont have any mac here to replicate it but hmm which IPmessenger did you use again on the iMac? is it the GNOME2 version? if so, could you please try compile gXipmsg on the iMac and see if still not able to send message? Or you can also try the X11R6 version on the iMac, just what is convenient for you, this will let us know which has the bug, is it on my Motif version, or the other IPmessnger.

Really thanks a lot to try it out, this way we can polish this more and soon i will focus on the file transfer, just imagine a file sharing to any platforms without installing anything, would be great right? :)
:Octane: (Sakura) :O2: (Sasuke) :1600SW: (Naruto) ... lil Jesse! (O2 laptop)
“Imagination is more important than knowledge.“ – A. Einstein
This is a useful piece of work, geo. Thank you. :D
hamei wrote: This is a useful piece of work, geo. Thank you. :D

thanks hamei!! Yeah esp here in our company, we use this to communicate with others and pass files like schematics, firmware, pcb drawing, mechanical drawing or office files :) sending it to bldg B is just a drag n drop n clik away hehe so this is why i want this to work on our NIX machines ;) coz im a bit lazy to setup again NFS hehe so lets finish this fast! Wanna lend a hand there hehe or still busy with your motif browser? :) if im done with this i can also help you.
:Octane: (Sakura) :O2: (Sasuke) :1600SW: (Naruto) ... lil Jesse! (O2 laptop)
“Imagination is more important than knowledge.“ – A. Einstein
well done!
:Octane2: 2xR12000 400MHz, 4GB RAM, V12
SGI - the legend will never die!!
geo wrote: Wanna lend a hand there hehe or still busy with your motif browser? :) if im done with this i can also help you.

I'd love to, but kind of busy right now getting the text big enough so I can put the magnifying glass away :)
geo wrote: so I guess it doesn't matter which machine as long as the app is not particular with the bit width right?

I think so. It's mips4 binary so it should work on SGIs with at least the R5000 processors (it don't work on my R4400 Indy :-( ...)

geo wrote: this will let us know which has the bug, is it on my Motif version, or the other IPmessnger.


It is probably a bun in that IP messenger verison (it's a native Mac colne, not a Gtk one). I tried the X11R6 verison (xipsmsg) on the iMac and there are no problems with sending.

geo wrote: just imagine a file sharing to any platforms without installing anything, would be great right? :)
Surely!
:O2: :Indy: :Indy:
I can't compile it in IRIX 6.5.30, I'd guess that my Motif headers are too old, because XmCHARSET_TEXT isn't defined anywhere in /usr/include or its subdirectories, including Xm. Which packages from what CD do I have to install to compile gXipmsg?

Code: Select all

cc   -g -c appIcon.c
cc-1020 cc: ERROR File = appIcon.c, Line = 139
The identifier "XmCHARSET_TEXT" is undefined.

text = (char *) XmStringUnparse (xstr_list[mIdx], NULL,XmCHARSET_TEXT, XmCHARSET_TEXT,NULL, 0, XmOUTPUT_ALL);
^

cc-1020 cc: ERROR File = appIcon.c, Line = 139
The identifier "XmOUTPUT_ALL" is undefined.

text = (char *) XmStringUnparse (xstr_list[mIdx], NULL,XmCHARSET_TEXT, XmCHARSET_TEXT,NULL, 0, XmOUTPUT_ALL);
^

cc-1020 cc: ERROR File = appIcon.c, Line = 165
The identifier "XmCHARSET_TEXT" is undefined.

text = (char *) XmStringUnparse (xstr_list[mIdx], NULL,XmCHARSET_TEXT, XmCHARSET_TEXT,NULL, 0, XmOUTPUT_ALL);
^

cc-1020 cc: ERROR File = appIcon.c, Line = 165
The identifier "XmOUTPUT_ALL" is undefined.

text = (char *) XmStringUnparse (xstr_list[mIdx], NULL,XmCHARSET_TEXT, XmCHARSET_TEXT,NULL, 0, XmOUTPUT_ALL);
^

4 errors detected in the compilation of "appIcon.c".
gmake: *** [appIcon.o] Error 2
Niice, now we need some new VPN over the Internets for all of us the IRIX users so that we can share the files and message each other :P
[click for links to hinv] JP: :Fuel: | :O2: | :Indy: || PL: [ :Fuel: :O2: :O2+: :Indy: ]
morning everyone! suddenly my modem in my room stopped working.. no internet access really feels like in purgatory hehe

Geoman wrote: well done!
thanks Geoman! but still not yet finish, file transfer is the next big work :)

hamei wrote: I'd love to, but kind of busy right now getting the text big enough so I can put the magnifying glass away
hahaha can imagine how big the text are hehehe

jirka wrote: I think so. It's mips4 binary so it should work on SGIs with at least the R5000 processors (it don't work on my R4400 Indy ...)
oh! sorry i don't have any R4400 machine here , not able to compile for you. any chance for you to install gcc on the indy?

jirka wrote: It is probably a bun in that IP messenger verison (it's a native Mac colne, not a Gtk one). I tried the X11R6 verison (xipsmsg) on the iMac and there are no problems with sending.
aha! thanks for this confirmation, feel good to hear this hehe wow, there is a Mac clone? this is not from the site right? coz i only saw a MacOSX version. but yeah, nice to know this, thanks! :)

jirka wrote: Surely!
hehe will start this feature this week, wish me luck!!

canavan wrote: I can't compile it in IRIX 6.5.30, I'd guess that my Motif headers are too old, because XmCHARSET_TEXT isn't defined anywhere in /usr/include or its subdirectories, including Xm. Which packages from what CD do I have to install to compile gXipmsg?
hi canavan, thanks for trying, hmmm can you check if what Motif version is currently set on your IRIX? by default it is using Motif 1.2 and there was a script you need to run to switch to Motif 2.1, i forgot which and where the script, but I'm sure there was coz i used it on here. But i'm not sure this will resolve the compile issue on your side, can you try this first? Thanks and hope to hear the result :)

kubatyszko wrote: Niice, now we need some new VPN over the Internets for all of us the IRIX users so that we can share the files and message each other :P
waah, nice idea kubatyszko! so will need to finish next version soon hehe btw, your location reminds me of how i meet this IPMsg tool, got friends working in NEC and their Japanese counterparts introduced to them to use this tool for messaging and exchanging files inside their LAN, really2x handy :)
:Octane: (Sakura) :O2: (Sasuke) :1600SW: (Naruto) ... lil Jesse! (O2 laptop)
“Imagination is more important than knowledge.“ – A. Einstein
geo wrote: hi canavan, thanks for trying, hmmm can you check if what Motif version is currently set on your IRIX? by default it is using Motif 1.2 and there was a script you need to run to switch to Motif 2.1, i forgot which and where the script, but I'm sure there was coz i used it on here. But i'm not sure this will resolve the compile issue on your side, can you try this first? Thanks and hope to hear the result :)


Per Motif 2.1 porting guide:

Code: Select all

If you need to change the default environment to 2.1, enter (as root) the following command:
# /usr/Motif-2.1/lib/mksymlinks
To return the default environment to 1.2, enter:
# /usr/Motif-1.2/lib/mksymlinks


Worked for me like a charm.

Geo, on a sidenote, you can create a Makefile.irix with the contents you suggested, and ask the user to run

Code: Select all

make -f Makefile.irix
- this way you keep the project closer to original


Btw, it doesn't work on my Freebsd 8.1-release, I log into by bsd box from OSX over SSH (with X-forwarding) - it does compile flawlessly, launches (on my remote X session in the OSX) with the docked icon, but when I click on the icon I get :


Code: Select all

[kuba@bzzd ~/gXipmsg]$ ./gXipmsg
Segmentation fault: 11 (core dumped)



Code: Select all

(gdb) where
#0  0x00000008009fbcd1 in XtWidgetToApplicationContext () from /usr/local/lib/libXt.so.6
#1  0x00000008009f2cde in XtAddCallback () from /usr/local/lib/libXt.so.6
#2  0x0000000000403449 in sendDialog_Create (xt_List=0x801a06800, mSelPos=0) at sendDialog.c:52
#3  0x0000000000402ae7 in appIcon_IconCallBack (widget=0x801a10a80, client_data=0x801a06800, call_data=0x7fffffffe050)
at appIcon.c:83
#4  0x00000008009f1d9f in XtCallCallbackList () from /usr/local/lib/libXt.so.6
#5  0x0000000800729e51 in ActivateCommonG () from /usr/local/lib/libXm.so.3
#6  0x000000080072b775 in InputDispatch () from /usr/local/lib/libXm.so.3
#7  0x0000000800700493 in _XmDispatchGadgetInput () from /usr/local/lib/libXm.so.3
#8  0x00000008007a412a in _XmGadgetActivate () from /usr/local/lib/libXm.so.3
#9  0x0000000800a27616 in HandleActions () from /usr/local/lib/libXt.so.6
#10 0x0000000800a27db6 in _XtTranslateEvent () from /usr/local/lib/libXt.so.6
#11 0x00000008009ff97a in XtDispatchEventToWidget () from /usr/local/lib/libXt.so.6
#12 0x00000008009fff96 in _XtDefaultDispatcher () from /usr/local/lib/libXt.so.6
#13 0x00000008009ff0b8 in XtDispatchEvent () from /usr/local/lib/libXt.so.6
#14 0x00000008009ff243 in XtAppMainLoop () from /usr/local/lib/libXt.so.6
#15 0x0000000000402ab8 in appIcon_Run (xac_App=0x50c958) at appIcon.c:77
#16 0x0000000000401e5b in gXipmsg_main (argc=1, argv=0x7fffffffeaa8) at main.c:41
#17 0x0000000000401e8b in main (argc=1, argv=0x7fffffffeaa8) at main.c:49



Cheers
[click for links to hinv] JP: :Fuel: | :O2: | :Indy: || PL: [ :Fuel: :O2: :O2+: :Indy: ]