只有472KB的minigtk.dll?这是怎么做到的?
一直不太原因选择pygtk的原因,一是控件不原生,二是windows下安装库太大,分发和维护都不方便
今天发现XChat for Windows很小(900多KB),而且用的是GTK。。。有一个472KB的minigtk.dll,就几乎实现了标准gtk的所有功能。。 这是怎么做到的呢? 有没有大牛编译一个for pygtk的兼容版本? http:///files/source/2.8/?S=D <http:///files/source/2.8/?S=D>别人把源代码都发出来了,还问什么啊,去翻吧。 2010/8/2 http:///files/binary/win32/mini-src/ <http:///files/binary/win32/mini-src/>minigtk可能是这里面的东西。 http://xc2free.9./index.php?showtopic=7 应该是编译教程吧? <http://xc2free.9./index.php?showtopic=7> 源码是有。。。我想知道的是和官方8MB的库相比是怎么做到472KB而且不损失太多功能的。。。。 大小倒不是问题,QT虽然大,主要就两个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 |
|