只有472KB的minigtk.dll?這是怎么做到的?
一直不太原因選擇pygtk的原因,一是控件不原生,二是windows下安裝庫太大,分發(fā)和維護(hù)都不方便
今天發(fā)現(xiàn)XChat for Windows很?。?00多KB),而且用的是GTK。。。有一個(gè)472KB的minigtk.dll,就幾乎實(shí)現(xiàn)了標(biāo)準(zhǔn)gtk的所有功能。。 這是怎么做到的呢? 有沒有大牛編譯一個(gè)for pygtk的兼容版本? http:///files/source/2.8/?S=D <http:///files/source/2.8/?S=D>別人把源代碼都發(fā)出來了,還問什么啊,去翻吧。 2010/8/2 http:///files/binary/win32/mini-src/ <http:///files/binary/win32/mini-src/>minigtk可能是這里面的東西。 http://xc2free.9./index.php?showtopic=7 應(yīng)該是編譯教程吧? <http://xc2free.9./index.php?showtopic=7> 源碼是有。。。我想知道的是和官方8MB的庫相比是怎么做到472KB而且不損失太多功能的。。。。 大小倒不是問題,QT雖然大,主要就兩個(gè)dll:QtCore和QtGui,gtk帶了一大堆文件,看著就暈,參考pidgin和tortoiseHg看看 在Qt里面,裁剪的原理就是把不用的
http://xc2free.9./index.php?showtopic=7
This guide will tell you how to compie MiniGTK as a static library This was done with MS Visual C++ .NET 2003. I have not tried ti with What you need: MinGW - Get it here. How: First of all, extract glibgtkpango244.tar.bz2 with WinRAR or some Open a Visual Studio Command Prompt windows and cd to the directory For Example: The %PATH% is very important. Now, cd to gtk\gtk. run nmake -f makefile.msc. Let it do its thing Next, cd to ..\gdk\win32 and run nmake -f makefile.msc. Now, cd to .. Now, copy libiconv-1.9.2\include\iconv.h.msvc-static to glib\glib and cd to the directory where you extracted everything. Then, cd to Now, cd to ../gobject and run nmake -f makefile.msc. It will quickly Next, cd to ../gmodule. Run nmake -f makefile.msc. It will fail and cd to ..\build\win32\dirent. Run nmake -f makefile.msc. Copy the lib cd back to the directory where you extracted everything. Now, cd to cd back to the directory where you extracted everything. Now, cd to cd back to the directory where you extracted everything. Now, cd to Run make. Then, cd to lib\.libs and run teh following: CODE Copy the newly create lib file to teh same directory as the rest. cd back to teh directory with all teh libs you built. In this CODE then run CODE Now, edit makefile.msc so it looks like this: CODE all: Next, edit minigtk.def and remove the following from it CODE To create minigtk.dll, run nmake -f makefile.msc. To make the static library run nmake -f makefile.msc static. Ignore To link it to xchat, use Pu7os guide. If there are any errors in this guide, please post them. EDIT by Pu7o: MinGW should be in the path first, not cygwin. EDIT by Daemon404 : I have gotten gettext to work as a shared library. Get the source code for gettext-0.10.40 (Must be that specific cd to the directory and run sh configure --disable-shared CODE Then run: CODE Refer to pu7o's guide abotu linkign to minigtk to fidn otu hwo to get Edit by Pu7o: Changed "intl.dll" to "minintl.dll" for the following reason: Intl.dll is the name used by the full gettext library. Using intl.dll Edit by Daemon404 (Again): I have been able to statically link my Edit by Pu7o: Added part about visual c++ toolkit, with the archive Edit by Pu7o: Changed links to reflect the new MiniGTK. Edit by Daemon404. It is also possible to compile MiniGTK with MSVC This post has been edited by Daemon404 on June 24, 2005 01:02 am |
|