[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: GTK 1.2 -> 1.3? (was Re: GTK+ 1.2.x on Win32?)



At 08:30 PM 4/6/2002 -0800, Taura Milana wrote:
>On 2002.04.06 14:04 Philip Bunce wrote:
>
>> >   I read http://www.gimp.org/~tml/gimp/win32/ and it
>> >suggests to use GTK 1.3, so I was wondering if there
>> >are any tutorials on porting GTK 1.2 to 1.3?  Also
>> >the web page did not mention where to get the
>> >.dll's and .lib's (or I couldn't find them) does
>> >anyone know?
>> 
>> As I understand it. Gimp has not been ported to the 2.0 API. You must use
>> 1.2.
>> GTK 1.3 is AKA GTK 2.0. It was called 1.3 until it reached release.
>> The files I downloaded and installed were.
>
>Thanks, I found the files.  Do I *and* my end users need to
>install the runtime dll's?

Yes.
I found that my users needed the following files which comes to about 7MB.

lib\iconv.dll*                lib\libgtk-win32-2.0-0.dll*
lib\libatk-1.0-0.dll*         lib\libintl-1.dll*
lib\libgdk-win32-2.0-0.dll*   lib\libpango-1.0-0.dll*
lib\libgdk_pixbuf-2.0-0.dll*  lib\libpangoft2-1.0-0.dll*
lib\libglib-2.0-0.dll*        lib\libpangowin32-1.0-0.dll*
lib\libgmodule-2.0-0.dll*     lib\libtiff.dll*
lib\libgobject-2.0-0.dll*     lib\libz.dll*
lib\libgthread-2.0-0.dll*

etc\gtk-2.0:
gtk.immodules*

etc\pango:
pango.modules*   pango.modules~*

lib\glib-2.0:
include/

lib\gtk-2.0:
2.0.0/    include/

lib\locale:
az/      el/      eu/      gl/      it/      nn/      ro/      sr/      vi/
ca/      en@IPA/  fa/      he/      ja/      no/      ru/      sv/      wa/
cs/      en_GB/   fi/      hr/      ko/      pl/      sk/      ta/      zh_CN/
da/      es/      fr/      hu/      lt/      pt/      sl/      tr/      zh_TW/
de/      et/      ga/      ia/      nl/      pt_BR/   sp/      uk/

lib\pango:
1.0.0/

Note that I probably could have cut down on the locales if I had wanted to.


>Do I need to use any of the GTK 2.0 runtimes or just the
>GTK 1.3 (there were no GTK 1.2's)?
>
>
>> which I just unzipped into a new directory.
>> They all came from Tor Lillqvist's site (follow the win32 link on
>> www.gtk.org).
>> 
>> I did run into a couple of small problems.
>> 
>> 1. The pkg-config program seems to have some problems. Even if you
>> specify --msvc-syntax, the library names
>> it emits are wrong. 
>> 
>> 232 D% pkg-config --msvc-syntax --libs gtk+-2.0
>>  /libpath:d:/win-gtk2/lib gtk-win32-1.3.lib gdk-win32-1.3.lib imm32.lib
>> shell32.
>> lib ole32.lib uuid.lib atk-1.0.lib gdk_pixbuf-1.3.lib m.lib
>> pangowin32-1.0.lib g
>> di32.lib pango-1.0.lib gobject-2.0.lib gmodule-2.0.lib glib-2.0.lib
>> intl.lib ico
>> nv.lib
>> 
>> You can't use this without changing the 3 instances of 1.3 to 2.0.
>> The resulting makefile for msvc will look something like this.
>
>I'm afraid I'm really confused at this point. All I know
>how to do in VC++ is add certain .lib files to my `project',
>kind of like how I use -l<library> in gcc.  Where or how
>exactly do I run pkg-config?

Ah. Since you were coming from a Linux background I assumed that you would prefer to use
a command line interface instead of messing around with the GUI stuff, and so the instructions
I provided were how to use nmake to build your app.

You will need help from someone else if you want to use the GUI interface to MSVC.

But if you do use the command line interface you simply execute the batch file 
c:\Program Files\Microsoft Visual Studio/VC98/Bin/VCVARS32.BAT
to set the environment, and then type 'nmake' in the directory where you put the makefile.
You wil see that the compiler is called cl and you can get help on the compiler options
using cl -help.



>> GTK = d:/win-gtk2
>> CFILES = <your .c files go here>
>> 
>> OFILES = $(CFILES:.c=.obj)
>> CC = cl /nologo
>> 
>> CFLAGS = -I$(GTK)/include/gtk-2.0 -I$(GTK)/lib/gtk-2.0/include \
>>         -I$(GTK)/include/atk-1.0 -I$(GTK)/include/pango-1.0 \
>>         -I$(GTK)/include/glib-2.0 -I$(GTK)/lib/glib-2.0/include
>> 
>> LIBS = /link /libpath:$(GTK)/lib gtk-win32-2.0.lib gdk-win32-2.0.lib \
>>         imm32.lib shell32.lib ole32.lib uuid.lib atk-1.0.lib \
>>         gdk_pixbuf-2.0.lib \
>>         pangowin32-1.0.lib gdi32.lib pango-1.0.lib gobject-2.0.lib \
>>         gmodule-2.0.lib glib-2.0.lib intl.lib iconv.lib
>> 
>> .c.obj:
>>         $(CC) -c $(CFLAGS) $<
>> 
>> yourprog.exe : $(OFILES)
>>         $(CC) -o $@ $(OFILES) $(LIBS)
>> 
>> 
>> $(OFILES) : Makefile
>> 
>> You will also need to make sure that $(GTK)/bin and $(GTK)/lib are in
>> your command search path.
>> This creates a dynamically-linked executable, so you will need to install
>> the dll's to run this executable.
>> The docs (which you can get by downloading the source package from
>> www.gtk.org contain a guide for
>> porting from 1.2 to 2.0.
>
>I'm afraid I'm really lost at this point. I know how to
>add the above to a Makefile since it looks like a typical
>UNIX Makefile, but I don't know where to add the above text
>to?  Please keep in mind that I although I'm fluent in working
>with Linux, it's only been a few weeks using VC++.
>
>
>--
>Sincerely,                  ,"-_                         \|/
>-Capt. Taura M.             ,   O=__                    --X--
>..__                         ,_JNMNNEO=_                 /|\
>OMNOUMmnne.                  {OMMNNNEEEEOO=_
>UOOOBIOOOEOMMn.               'LONMMMMNNEEEOOO=.__..,,..
>UUOOEUUOOOOOOOObe              '"=OMMMMWNEEEOOOOO,"=OEEEOO=,._
>OOUUUIEEIOONNOIUbe.                "7OMMMMNNNNNWWEEEEOOOOOO"   "'.
>EEBNNMMMNWNWWEEIMMNe.             __  7EMMMNNNNNWWWEEEEEEEOO.     " .
>NNMMMMWWWMMMWEINMMMNn            "=BBEEEEMMMMMMMMNNNWWWEEOOOOO=._     .
>                  http://furry.ao.net/~learfox/
>_______________________________________________
>gtk-app-devel-list mailing list
>gtk-app-devel-list@gnome.org
>http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

--------------------------------------------------------------------
--           Philip J. Bunce, Software Consultant
--     MIPS Assembly, Embedded Systems, PMON, UNIX, & C
--  Ph: 831-659-5684 Fax: 501-325-6812 http://www.carmel.com
--------------------------------------------------------------------





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]