From: <mie...@us...> - 2008-01-14 20:54:47
|
Revision: 2217 http://oorexx.svn.sourceforge.net/oorexx/?rev=2217&view=rev Author: miesfeld Date: 2008-01-14 12:54:51 -0800 (Mon, 14 Jan 2008) Log Message: ----------- rexxgtk this fixes the build on Windows and adds some doc on working with GTK on Windows. Modified Paths: -------------- sandbox/david/Makefile.win sandbox/david/test2-1.rex sandbox/david/test3-9.rex Added Paths: ----------- sandbox/david/rexxgtk.def sandbox/david/windows-building.txt sandbox/david/windows-gtk.setup.notes Modified: sandbox/david/Makefile.win =================================================================== --- sandbox/david/Makefile.win 2008-01-14 18:53:01 UTC (rev 2216) +++ sandbox/david/Makefile.win 2008-01-14 20:54:51 UTC (rev 2217) @@ -39,26 +39,65 @@ # Setup include ver.mak GTK = gtk+-2.0 -RX_PATH = "c:\Program Files\ooRexx" -# This is the output from the pkg-config --cflags command -GTKLFLAGS = gtk-win32-2.0.lib atk-1.0.lib gdk-win32-2.0.lib gdi32.lib \ - imm32.lib shell32.lib ole32.lib gdk_pixbuf-2.0.lib \ - pangowin32-1.0.lib pangocairo-1.0.lib \ - cairo.lib pangoft2-1.0.lib fontconfig.lib freetype.lib z.lib \ - pango-1.0.lib gobject-2.0.lib gmodule-2.0.lib \ - gthread-2.0.lib glib-2.0.lib intl.lib iconv.lib -# This is the output from the pkg-config --libs command -GTKLIBS = -IC:/GTK/include/gtk-2.0 \ - -IC:/GTK/lib/gtk-2.0/include -IC:/GTK/include/atk-1.0 \ - -IC:/GTK/include/cairo -IC:/GTK/include/pango-1.0 \ - -IC:/GTK/include/glib-2.0 -IC:/GTK/lib/glib-2.0/include \ - -IC:/GTK/include/freetype2 -IC:/GTK/include -GRXCFLAGS = /nologo /c /GX /MT /W1 /D_X86=1 /D_CONSOLE /DWIN32 \ - /I $(RX_PATH)\api /DVMAJOR=$(VMAJOR) /DVMINOR=$(VMINOR) /DVREL=$(VREL) \ - $(GTKLIBS) -GRXLFLAGS = /nologo /DLL $(GTKLFLAGS) + +# Point RX_PATH at your installation of ooRexx +RX_PATH = "C:\ooRexx" + +# Point GTK_PATH to your top level GTK directory. Use unix style forward +# slashes +GTK_PATH = C:/Tools/gtk + +# Set the GTK+ include path. Provided your GTK_PATH above is correct, this +# should work. +# +# However, if you have compile problems, you should generate your own. The +# easiest way to do this is to run pkg-config and copy the output here. See the +# windows-building.tx file for information on how to do this. Use the following +# command: +# pkg-config --msvc-syntax --cflags gtk+-2.0 +# It may be easier to simply run the command on your own system to be sure you +# pick up the correct settings. After getting the output, leave off the +# -mms-bitfields, delete the exisiting, and past it in here. +GTK_IPATH = -I$(GTK_PATH)/include/gtk-2.0 -I$(GTK_PATH)/lib/gtk-2.0/include \ + -I$(GTK_PATH)/include/atk-1.0 -I$(GTK_PATH)/include/cairo \ + -I$(GTK_PATH)/include/pango-1.0 -I$(GTK_PATH)/include/glib-2.0 \ + -I$(GTK_PATH)/lib/glib-2.0/include + +# Set the GTK+ library path. The same caveats as for the GTK+ include path. If +# you do have compile problems, generate your own settings using pkg-config. +# Use the following command: +# pkg-config --msvc-syntax --libs gtk+-2.0 +# +GTKLIBS = /libpath:$(GTK_PATH)/lib gtk-win32-2.0.lib gdk-win32-2.0.lib \ + atk-1.0.lib gdk_pixbuf-2.0.lib pangowin32-1.0.lib pangocairo-1.0.lib \ + pango-1.0.lib cairo.lib gobject-2.0.lib gmodule-2.0.lib glib-2.0.lib \ + intl.lib iconv.lib + +LIBS = $(GTKLIBS) $(RX_PATH)\api\rexx.lib $(RX_PATH)\api\rexxapi.lib + +INCLUDES = -I$(RX_PATH)\api $(GTK_IPATH) + +GCFLAGS_COMMON = /nologo /c /GX /MT /W3 + +GCFLAGS_DEFINES = /D_X86=1 /D_CONSOLE /DWIN32 /DVMAJOR=$(VMAJOR) /DVMINOR=$(VMINOR) /DVREL=$(VREL) + +!IF "$(DBG)" == "1" +GFLAGS_DEBUG = /Zi /Od /D_DEBUG /DEBUGTYPE:CV +!ENDIF + +GRXCFLAGS = $(GCFLAGS_COMMON) $(GCFLAGS_DEFINES) $(GFLAGS_DEBUG) $(INCLUDES) + +# Do not add /NOENTRY to the GLFLAGS +GLFLAGS_COMMON = /nologo /machine:IX86 /SUBSYSTEM:Windows /DLL + +!IF "$(DBG)" == "1" +GLFLAGS_DEBUG = /MAP /NOLOGO /PROFILE /DEBUG -debugtype:cv +!ENDIF + +GRXLFLAGS = $(GLFLAGS_COMMON) $(GLFLAGS_DEBUG) + OBJECTS = rexxgtk.obj \ - grxwidget.obj \ + grxwidget.obj \ grxwindow.obj \ grxcontainer.obj \ grxqueue.obj \ @@ -66,20 +105,17 @@ grxbutton.obj \ grxpaned.obj \ grxtable.obj \ - grxentrytable.obj \ + grxentry.obj \ grxfixed.obj \ grxexpander.obj \ grxhandlebox.obj \ grxnotebook.obj \ grxeventbox.obj - # Build the DLL -rexxgtk.dll: $(OBJECTS) - link $(GRXLFLAGS) $(RX_PATH)\api\rexx.lib $(RX_PATH)\api\rexxapi.lib \ - $(OBJECTS) +rexxgtk.dll: $(OBJECTS) rexxgtk.def + link $(OBJECTS) $(GRXLFLAGS) $(LIBS) /def:rexxGtk.def /OUT:$(@R).dll /implib:$(@R).lib /PDB:$(@R).pdb - # Build the objects rexxgtk.obj: rexxgtk.c rexxgtk.h cl -c $(GRXCFLAGS) rexxgtk.c @@ -127,7 +163,6 @@ cl -c $(GRXCFLAGS) grxeventbox.c - clean: - rm *.so *.o + del *.dll *.obj *.pdb *.lib *.exp *.map Added: sandbox/david/rexxgtk.def =================================================================== --- sandbox/david/rexxgtk.def (rev 0) +++ sandbox/david/rexxgtk.def 2008-01-14 20:54:51 UTC (rev 2217) @@ -0,0 +1,235 @@ +;/*----------------------------------------------------------------------------*/ +;/* */ +;/* Copyright (c) 2008 Rexx Language Association. All rights reserved. */ +;/* */ +;/* This program and the accompanying materials are made available under */ +;/* the terms of the Common Public License v1.0 which accompanies this */ +;/* distribution. A copy is also available at the following address: */ +;/* http://www.oorexx.org/license.html */ +;/* */ +;/* Redistribution and use in source and binary forms, with or */ +;/* without modification, are permitted provided that the following */ +;/* conditions are met: */ +;/* */ +;/* Redistributions of source code must retain the above copyright */ +;/* notice, this list of conditions and the following disclaimer. */ +;/* Redistributions in binary form must reproduce the above copyright */ +;/* notice, this list of conditions and the following disclaimer in */ +;/* the documentation and/or other materials provided with the distribution. */ +;/* */ +;/* Neither the name of Rexx Language Association nor the names */ +;/* of its contributors may be used to endorse or promote products */ +;/* derived from this software without specific prior written permission. */ +;/* */ +;/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */ +;/* AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */ +;/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */ +;/* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */ +;/* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */ +;/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ +;/* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */ +;/* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY */ +;/* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */ +;/* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */ +;/* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +;/* */ +;/*----------------------------------------------------------------------------*/ + + +EXPORTS + GRXLOADFUNCS = GrxLoadFuncs + GRXSETREXXQUEUENAME = GrxSetRexxQueueName + + GRXVERSION = GrxVersion + GRXMAIN = GrxMain + GRXMAINITERATION = GrxMainIteration + +; GRXGSLISTUNINIT = GrxGSListUninit +; GRXGSLISTAPPEND = GrxGSListAppend +; GRXGSLISTPREPEND = GrxGSListPrepend +; GRXGSLISTINSERT = GrxGSListInsert +; GRXGLISTUNINIT = GrxGListUninit +; GRXGLISTAPPEND = GrxGListAppend +; GRXGLISTPREPEND = GrxGListPrepend +; GRXGLISTINSERT = GrxGListInsert + GRXWIDGETSHOW = GrxWidgetShow + GRXWIDGETSHOWALL = GrxWidgetShowAll + GRXWIDGETHIDE = GrxWidgetHide + GRXWIDGETHIDEALL = GrxWidgetHideAll + GRXWIDGETSETSIZE = GrxWidgetSetSize + GRXWIDGETDESTROY = GrxWidgetDestroy + GRXWIDGETGRABFOCUS = GrxWidgetGrabFocus + GRXWIDGETSETFONT = GrxWidgetSetFont + GRXWIDGETGETFONT = GrxWidgetGetFont + GRXWIDGETGETACCESSIBLE = GrxWidgetGetAccessible + GRXWIDGETGETNAME = GrxWidgetGetName + GRXWIDGETSETNAME = GrxWidgetSetName + GRXWIDGETSETSENSITIVE = GrxWidgetSetSensitive + GRXWIDGETCONNECTSIGNAL = GrxWidgetConnectSignal + GRXWIDGETGETTOPLEVEL = GrxWidgetGetTopLevel +; GRXMESSAGEDIALOG = GrxMessageDialog +; GRXFILESELECTIONDIALOG = GrxFileSelectionDialog +; GRXFONTSELECTIONDIALOG = GrxFontSelectionDialog +; GRXDIALOGNEW = GrxDialogNew +; GRXDIALOGSETTITLE = GrxDialogSetTitle +; GRXDIALOGRUN = GrxDialogRun +; GRXDIALOGADDBUTTON = GrxDialogAddButton +; GRXDIALOGGETVBOX = GrxDialogGetVBox +; GRXDIALOGSETTIMEOUT = GrxDialogSetTimeout + GRXBUTTONNEW = GrxButtonNew + GRXBUTTONSETLABEL = GrxButtonSetLabel + GRXBUTTONGETLABEL = GrxButtonGetLabel + GRXBUTTONUSEUNDERLINE = GrxButtonUseUnderline + GRXBUTTONNEWFROMSTOCK = GrxButtonNewFromStock + GRXBUTTONCONNECTSIGNAL = GrxButtonConnectSignal + GRXCHECKBUTTONNEW = GrxCheckButtonNew + GRXCHECKBUTTONGETSTATE = GrxCheckButtonGetState + GRXCHECKBUTTONSETSTATE = GrxCheckButtonSetState + GRXRADIOBUTTONNEW = GrxRadioButtonNew + GRXRADIOBUTTONGROUP = GrxRadioButtonGroup + GRXCONTAINERADD = GrxContainerAdd + GRXCONTAINERREMOVE = GrxContainerRemove + GRXCONTAINERSETBORDERWIDTH = GrxContainerSetBorderWidth + GRXCONTAINERCONNECTSIGNAL = GrxContainerConnectSignal + GRXBOXPACKSTART = GrxBoxPackStart + GRXBOXPACKEND = GrxBoxPackEnd + GRXVBOXNEW = GrxVBoxNew + GRXHBOXNEW = GrxHBoxNew +; GRXTEXTVIEWNEW = GrxTextViewNew +; GRXTEXTVIEWSETTEXT = GrxTextViewSetText +; GRXTEXTVIEWGETTEXT = GrxTextViewGetText +; GRXTEXTVIEWSETEDITABLE = GrxTextViewSetEditable +; GRXTEXTVIEWSETWRAPMODE = GrxTextViewSetWrapMode +; GRXFRAMENEW = GrxFrameNew +; GRXSCROLLEDWINDOWNEW = GrxScrolledWindowNew +; GRXSCROLLEDWINDOWSETPOLICY = GrxScrolledWindowSetPolicy + GRXENTRYNEW = GrxEntryNew + GRXENTRYSETMAXLENGTH = GrxEntrySetMaxLength + GRXENTRYGETMAXLENGTH = GrxEntryGetMaxLength + GRXENTRYSETTEXT = GrxEntrySetText + GRXENTRYGETTEXT = GrxEntryGetText + GRXENTRYSETWIDTHCHARS = GrxEntrySetWidthChars + GRXLABELNEW = GrxLabelNew + GRXLABELSETTEXT = GrxLabelSetText + GRXLABELSETJUSTIFY = GrxLabelSetJustify + GRXLABELSETSELECTABLE = GrxLabelSetSelectable + GRXLABELCONNECTSIGNAL = GrxLabelConnectSignal +; GRXCLISTNEW = GrxCListNew +; GRXCLISTUNINIT = GrxCListUninit +; GRXCLISTSELECTED = GrxCListSelected +; GRXCLISTSETCOLUMNTITLE = GrxCListSetColumnTitle +; GRXCLISTGETCOLUMNTITLE = GrxCListGetColumnTitle +; GRXCLISTSETTEXT = GrxCListSetText +; GRXCLISTGETTEXT = GrxCListGetText +; GRXCLISTAPPEND = GrxCListAppend +; GRXCLISTPREPEND = GrxCListPrepend +; GRXCLISTINSERT = GrxCListInsert +; GRXCLISTSETCOLUMNWIDTH = GrxCListSetColumnWidth +; GRXHSEPARATORNEW = GrxHSeparatorNew +; GRXVSEPARATORNEW = GrxVSeparatorNew +; GRXCOMBONEW = GrxComboNew +; GRXCOMBOSETPOPDOWNSTRINGS = GrxComboSetPopdownStrings +; GRXCOMBOGETSELECTED = GrxComboGetSelected +; GRXCOMBOSETVALUEINLIST = GrxComboSetValueInList +; GRXIMAGENEW = GrxImageNew +; +; GRXACCESSGETNAME = GrxAccessGetName +; GRXACCESSSETNAME = GrxAccessSetName +; GRXACCESSGETDESCRIPTION = GrxAccessGetDescription +; GRXACCESSSETDESCRIPTION = GrxAccessSetDescription +; GRXACCESSGETLAYER = GrxAccessGetLayer +; GRXACCESSGETROLE = GrxAccessGetRole +; GRXACCESSGETROLEDESCRIPTION = GrxAccessGetRoleDescription +; GRXACCESSGETLOCALROLEDESCRIPTION = GrxAccessGetLocalRoleDescription +; + GRXNOTEBOOKNEW = GrxNotebookNew + GRXNOTEBOOKAPPENDPAGE = GrxNotebookAppendPage + GRXNOTEBOOKPREPENDPAGE = GrxNotebookPrependPage + GRXNOTEBOOKINSERTPAGE = GrxNotebookInsertPage + GRXNOTEBOOKAPPENDPAGEMENU = GrxNotebookAppendPageMenu + GRXNOTEBOOKPREPENDPAGEMENU = GrxNotebookPrependPageMenu + GRXNOTEBOOKINSERTPAGEMENU = GrxNotebookInsertPageMenu + GRXNOTEBOOKREMOVEPAGE = GrxNotebookRemovePage + GRXNOTEBOOKSETSHOWBORDER = GrxNotebookSetShowBorder + GRXNOTEBOOKSETSHOWTABS = GrxNotebookSetShowTabs + GRXNOTEBOOKSETTABPOS = GrxNotebookSetTabPos + GRXNOTEBOOKSETHOMOGENEOUSTABS = GrxNotebookSetHomogeneousTabs + GRXNOTEBOOKSETTABBORDER = GrxNotebookSetTabBorder + GRXNOTEBOOKSETSCROLLABLE = GrxNotebookSetScrollable + GRXNOTEBOOKPOPUPENABLE = GrxNotebookPopupEnable + GRXNOTEBOOKPOPUPDISABLE = GrxNotebookPopupDisable + GRXNOTEBOOKGETCURRENTPAGE = GrxNotebookGetCurrentPage + GRXNOTEBOOKSETCURRENTPAGE = GrxNotebookSetCurrentPage +; +; GRXSIGNALCONNECT = GrxSignalConnect +; GRXDIALOGWAIT = GrxDialogWait +; GRXDIALOGSTART = GrxDialogStart +; GRXGETSIGNAL = GrxGetSignal + + GRXWINDOWNEW = GrxWindowNew + GRXWINDOWSETTITLE = GrxWindowSetTitle + GRXWINDOWSTART = GrxWindowStart + GRXWINDOWCONNECTSIGNAL = GrxWindowConnectSignal + GRXPANEDADD1 = GrxPanedAdd1 + GRXPANEDADD2 = GrxPanedAdd2 + GRXPANEDPACK1 = GrxPanedPack1 + GRXPANEDPACK2 = GrxPanedPack2 + GRXHPANEDNEW = GrxHPanedNew + GRXVPANEDNEW = GrxVPanedNew + GRXTABLENEW = GrxTableNew + GRXTABLEATTACH = GrxTableAttach + GRXTABLESETROWSPACINGS = GrxTableSetRowSpacings + GRXTABLESETCOLSPACINGS = GrxTableSetColSpacings + GRXFIXEDNEW = GrxFixedNew + GRXFIXEDPUT = GrxFixedPut + GRXFIXEDMOVE = GrxFixedMove + GRXEXPANDERNEW = GrxExpanderNew + GRXEXPANDERSETEXPANDED = GrxExpanderSetExpanded + GRXEXPANDERSETLABEL = GrxExpanderSetLabel + GRXEXPANDERGETLABEL = GrxExpanderGetLabel + GRXEXPANDERUSEUNDERLINE = GrxExpanderUseUnderline + GRXEXPANDERSETSPACING = GrxExpanderSetSpacing + GRXEXPANDERCONNECTSIGNAL = GrxExpanderConnectSignal + GRXHANDLEBOXNEW = GrxHandleBoxNew + GRXHANDLEBOXSETSHADOWTYPE = GrxHandleBoxSetShadowType + GRXHANDLEBOXSETHANDLEPOSITION = GrxHandleBoxSetHandlePosition + GRXHANDLEBOXSETSNAPEDGE = GrxHandleBoxSetSnapEdge + GRXHANDLEBOXCONNECTSIGNAL = GrxHandleBoxConnectSignal + GRXEVENTBOXNEW = GrxEventBoxNew + GRXEVENTBOXSETABOVECHILD = GrxEventBoxSetAboveChild + GRXEVENTBOXGETABOVECHILD = GrxEventBoxGetAboveChild + GRXEVENTBOXSETVISIBLEWINDOW = GrxEventBoxSetVisibleWindow + GRXEVENTBOXGETVISIBLEWINDOW = GrxEventBoxGetVisibleWindow + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Modified: sandbox/david/test2-1.rex =================================================================== --- sandbox/david/test2-1.rex 2008-01-14 18:53:01 UTC (rev 2216) +++ sandbox/david/test2-1.rex 2008-01-14 20:54:51 UTC (rev 2217) @@ -50,6 +50,8 @@ window~set_title('Hello World') window~show() +say 'You must ctrl-c (twice) to end this program after closing the window' + call gtk_main -- we will never get here since there is no connection to a destroy routine Modified: sandbox/david/test3-9.rex =================================================================== --- sandbox/david/test3-9.rex 2008-01-14 18:53:01 UTC (rev 2216) +++ sandbox/david/test3-9.rex 2008-01-14 20:54:51 UTC (rev 2217) @@ -46,4 +46,4 @@ -- Event callbacks are not supported in rexxgtk so this example is not -- implementd. - +say "Sorry, this example is not implemented." Added: sandbox/david/windows-building.txt =================================================================== --- sandbox/david/windows-building.txt (rev 0) +++ sandbox/david/windows-building.txt 2008-01-14 20:54:51 UTC (rev 2217) @@ -0,0 +1,126 @@ + + Some Notes on Building rexxgtk on Windows + ========================================== + +Download and set up GTK runtime and development environment +----------------------------------------------------------- + +This page has links to all the files you will need: + +http://www.gimp.org/~tml/gimp/win32/downloads.html + +The page also explains fairly well why you will *have* to us Microsoft Visual +C++ 6.0 + +Create some directory to put all the downloaded zip files in, say + +C:\>md gtk +C:\>cd gtk +C:\gtk> + +Then use the links and get both the runtime and dev files. You will need all +of these. Download them all into the same directory. + +glib-2.12.13.zip <runtime required> +glib-dev-2.12.13.zip <developement> + +gtk+-2.10.14.zip <runtime required> +gtk+-dev-2.10.14.zip <developement> + +pango-1.16.4.zip <runtime required> +pango-dev-1.16.4.zip <developement> + +atk-1.12.3.zip <runtime required> +atk-dev-1.12.3.zip <developement> + +cairo-1.4.8.zip <runtime required> +cairo-dev-1.4.8.zip <developement> + +GNU libiconv <runtime required, dev stuff included> + +pkg-config-0.20.zip + +gettext-0.14.5.zip. <runtime required> +gettext-dev-0.14.5.zip <developement> + +/* The links on the www.gimp.org/~tml/gimp/win32/downloads.html page for the + * following 3 packages will take you to the GnuWin32 project. You need to + * grab the main file, the dev file, and the dependency file for each of them + * at the same time. + */ +libpng 1.2.8 <runtime + dev + dependency required> +libjpeg 6b-4 <runtime + dev + dependency required> +libtiff 3.6.1 <runtime + dev + dependency required> + +Once you have all the files, simply unzip them all from the same directory. +They create a directory structure that has everything set up correctly. (You +will be prompted about overwritting 3 files, just say yes.) + +Then put the bin directory in your path. Run the gtk-demo and if everything +is set up correctly, it will execute. + +C:\gtk>unzip * +C:\gtk>set PATH=C:\gtk\bin;%PATH% +C:\gtk>gtk-demo + + +Decide which compiler you will use +---------------------------------- + +The following instructions are for Microsoft Visual C++ 6.0. makefile.win is +targeted for this compiler. The rexxgtk DLL will compile and has been tested +using Visual C++ 6.0. If you want to use another compiler, then the following +instructions will not be much help. + +It is assumed that your Visuall C++ 6.0 environment is set up, that exercise is +left to the reader. + +Because of the linkage of the GTK runtime, you will *have* to use Microsoft +Visual C++ 6.0. You can not use a later version of the compiler, unless you +are very knowledgable. (In which case you probably don't need these +instructions.) The page: + + http://www.gimp.org/~tml/gimp/win32/downloads.html + +gives a good introduction as to why this is true. + +Use pkg-config to get the needed includes and libs +-------------------------------------------------- + +The pkg-config utility is great for setting up makefile.win. You need to +Set PKG_CONFIG_PATH to point to your install of GTK: + +C:\gtk>set PKG_CONFIG_PATH=C:\gtk\lib\pkgconfig + +Then run this command to to get the inlcudes. You can copy and paste the +output into the makefile. (See below.) + +C:\gtk>pkg-config --msvc-syntax --cflags gtk+-2.0 + +And run this command to get the libs. (Same idea with copy and paste.) + +C:\gtk>pkg-config --msvc-syntax --libs gtk+-2.0 + +Edit makefile.win +---------------- + +You need to edit the top part of makefile.win. + +* Put in the path to the ooRexx installation. + +* Then use pkg-config as shown above to get the values for the GTK_IPATH macro. + The --cflags command. + +* Then use pkg-config, the --libs command, to get the value for the GTKLIBS + macro. + +* Once you have finished those edits you can build and link the DLL with this + command: + + nmake /F Makefile.win + +* You can build a debug version with this syntax: + + nmake /F Makefile.win DBG=1 + + Added: sandbox/david/windows-gtk.setup.notes =================================================================== --- sandbox/david/windows-gtk.setup.notes (rev 0) +++ sandbox/david/windows-gtk.setup.notes 2008-01-14 20:54:51 UTC (rev 2217) @@ -0,0 +1,104 @@ + +To simply view a demo of what GTK is capable of on Windows, the easiest thing +to do is to get the GTK runtime installer from: + + http://gimp-win.sourceforge.net/stable.html + +All you need to download is the GTK runtime, ignore the GIMP stuff. Get: + + GTK+ 2 Runtime Environment (version 2.10.13, for Windows 2000 and newer) + +Install it, it has an un-install that works. + +Then get the gtk-demo.exe from this page: + + http://www.gimp.org/~tml/gimp/win32/downloads.html + +The gtk-demo.exe is part of this package: + + gtk+-dev-2.10.14.zip + +Download and uzip it after you have installed the runtime above. cd into the +bin directory, after you have unzipped the file, and run gtk-demo.exe. + +/* Note that there is a Windows XP theme that gives GTK applications a very + * similar look and feel to Windows XP. After setting up the GTK runtime follow + * the next steps to use the Windows XP theme. + */ + +Locate the file gtkrc in etc: + +etc\gtk-2.0\gtkrc + +Locate the file gtkrc in share: + +share\themes\MS-Windows\gtk-2.0\gtkrc + +Compare the files and, if not the same copy the MS-Windows file over to the +etc location. + + +/* To actually do development on Windows, it is more complicated. You can get + * the runtime binaries and all the needed developement files from the following + * page: + */ + +From page http://www.gimp.org/~tml/gimp/win32/downloads.html + +This page has links to everything you need for both the GTK runtime and the +files needed to do development. It is not clear at first every thing that is +needed for the run time to work. So here is the list. + +If you download and unzip all the "runtime required" files listed here, you can +then run the gtk-demo, without using the setup program above. If you are only +going to run already compiled programs, the easist thing to do is to use the +setup program above. + +On the other hand to do developement you would need all the "developement" +files listed here, in addition to a runtime. If you are going to do +development, it is probably easier to get all the files here and not bother +with the runtime setup above. + +-- These are the main files + +glib-2.12.13.zip <runtime required> +glib-dev-2.12.13.zip <developement> + +gtk+-2.10.14.zip <runtime required> +gtk+-dev-2.10.14.zip <developement> + +pango-1.16.4.zip <runtime required> +pango-dev-1.16.4.zip <developement> + +atk-1.12.3.zip <runtime required> +atk-dev-1.12.3.zip <developement> + +cairo-1.4.8.zip <runtime required> +cairo-dev-1.4.8.zip <developement> + +-- These are the additional files that are needed to get gtk-demo to work + +GNU libiconv <runtime required, dev stuff included> + +gettext-0.14.5.zip. <runtime required> +gettext-dev-0.14.5.zip <developement> + +/* These 3 come from GnuWin32, grab the dev files at the same time, if doing + * development + */ +libpng 1.2.8 <runtime required> +libjpeg 6b-4 <runtime required> +libtiff 3.6.1 <runtime required> + +Zlib 1.2.3 <runtime required, dev stuff included> + +---- These files are not needed for gtk-demo to work, but there are part of the + Windows installer GTK runtime. So I suspect that they are also needed + for developement, to be complete. + +fontconfig-2.4.2-tml-20070301.zip +fontconfig-dev-2.4.2-tml-20070301 + +libxml2 + + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |