Port a GTK+ app to Windows
Hi, I want to port gLabels to Windows because I still have to use Windows sometimes, and I need to able to access my labels and business cards at all times. But I can't figure out how to do it, I'm not a big c++ person and a newbie to Linux. All I've got the source code, can someone point me in the right direction, I want to make it use the libraries that the GIMP, GAIM, Inkscape, etc. use.
|
Basicly porting invlves these steps:
- find the librairy for the platform you want to port to. In your case, check out for a GTK+ librairy windows version. I dont use GTK, but I know the windows version of the librairy does exist. It is used in the windows port of GAIM. So get the librairy and install it on your system - Setup your environment. That one can be tricky. Depending on what compiler you want to use. Mings, cygwin version of gcc, visual studio, etc. If you use a make file based cmpiler, you will need to get familiar with makefiles. But the make file for the linux port should provide a good starting point. - Start compiling. ... (that is actually the only easy step!) - Check out the errors that came out. You might be extremely lucky and not get any errors. But I doubt it. You will most likely get some errors. Now you will need to corret these. The errors you will get will be compile and linkig errors because there might be none portable code in there. If its the case, you will need to fix those issues. - redo last 2 steps until you get a fully working application Note that porting an application is not the easyest task out there. It really depends on the software you want to port. Vrey well written software, will compile "out of the box" on any platform as long as you have the librairies. But you never know until you try it. And errors can be hard to fix. If you really want to do it, go for it! But be aware its not a project that will only take a few hours. You are looking at a lot of work, speacilly if you are not used to programming. |
"I want to make it use the libraries that the GIMP, GAIM, Inkscape, etc. use."
They use the Gtk+ libraries "I want to port gLabels to Windows because I still have to use Windows sometimes, and I need to able to access my labels and business cards at all times. But I can't figure out how to do it, I'm not a big c++ person and a newbie to Linux. All I've got the source code, can someone point me in the right direction" Here is a short online tutorial. http://www.yolinux.com/TUTORIALS/GTK...mmingTips.html Here are some examples of using Gtk+ http://linuxheadquarters.com/howto/p...w/window.shtml You can find some decent Gtk+ books on Amazon. ----------------------------- Steve Stites |
re
i havent used that prog. but i do cross build gimp and plugins for fedora and win xp
i use MinGW for win builds . first i would read all the info on building gimp in mingw then do a gimp build ( that way you will have compatable libs . then try a build of gLabels most likley ./configure --with-gtk=//your path and see tor's page on gtk and gimp |
Thanks. I'll try the tutorials, and see what I get.
|
So far, I've actually made a VC++ project out of it. Does anyone know where to get the following header files for Windows? They are required for gLabels:
config.h e-marshal.h unistd.h libbonoboui.h gnome-font.h gnome-glyphlist.h gnome.h gnome-vfs.h |
config.h
That is not a standard librairy I regognize. It must be a header of the projet. Check out where they put that. It should be somewhere in the source. unistd.h If my memory is corect that one is a unix only header! So you will hae to check exactly what they use in there and provide subtitute. Not sure where you could find a win32 version of the gnome headers. |
re
hi config.h is part of gtk build and gimp build it is found in the src root dir.
ex. win. c\\src\gtk look for a file called config.h.in . config.h is built by gcc when you type make if you are using visual stuido .net you will nead to make this file by hand see config.h.in edit it and rename a copy to config.h |
Well, I got the errors down to 79, but I'm missing a few more llibraries now. what can substitute for the gnome libs?
Far as I know, the unistd.h is for the recent file list. What exactly it does, I'm not sure. 80%+ of all the programming I ever did was .NET, maybe less than 5% was C++, never any pure C. |
re
try grabing the libs from mingw or gnuwin32 and the headers from mingw
and reright a copy fo the win headers to work as the mingw i my self gave up on this aproch and do ALL my linux to win with mingw and not in visual stuido .net also have a look hear http://www.gimp.org/~tml/gimp/win32/downloads.html for gtk for win |
Thnks, I'll try that when I get a chance.
|
All times are GMT -5. The time now is 05:33 AM. |