乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      只有472KB的minigtk.dll?這是怎么做到的?

       quasiceo 2013-02-14
      只有472KB的minigtk.dll?這是怎么做到的?
      一直不太原因選擇pygtk的原因,一是控件不原生,二是windows下安裝庫太大,分發(fā)和維護(hù)都不方便

      今天發(fā)現(xiàn)XChat for Windows很?。?00多KB),而且用的是GTK。。。有一個472KB的minigtk.dll,就幾乎實(shí)現(xiàn)了標(biāo)準(zhǔn)gtk的所有功能。。

      這是怎么做到的呢?

      有沒有大牛編譯一個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雖然大,主要就兩個dll:QtCore和QtGui,gtk帶了一大堆文件,看著就暈,參考pidgin和tortoiseHg看看

      在Qt里面,裁剪的原理就是把不用的
      控件功能都去掉,最后只剩下幾個基本的窗體,這么小還是有可能的。但是裁剪
      程比較耗費(fèi)時間的。 要仔細(xì)看編譯文檔和手冊,熟悉類庫的基本構(gòu)架。當(dāng)然,Qt
      簡化了這項(xiàng)工作,提供了一些工具來做。以前沒有這個工具的時候,是寫一個
      config.h文件,在里面編輯一些定義的宏就可以完成基本的裁剪工作了

      http://xc2free.9./index.php?showtopic=7

       This guide will tell you how to compie MiniGTK as a static library
      and a shared DLL.

      This was done with MS Visual C++ .NET 2003. I have not tried ti with
      anythign else.

      What you need:

      MinGW - Get it here.
      MS Visual C++ (edit by Pu7o: You can also use the free MSVC++ Toolkit,
      available here. If you do, you should unzip this archive on the
      toolkit's installation directory.)
      MiniGTK Source Code - Get it here.
      libiconv 1.9.2 Source Code - Get it here.
      Cygwin - Get it here.

      How:

      First of all, extract glibgtkpango244.tar.bz2 with WinRAR or some
      other archiving utility. Also, extract libiconv-1.9.2.tar.gz to the
      same directory.

      Open a Visual Studio Command Prompt windows and cd to the directory
      where you extracted everything. Now, you have to set the PATH to you
      cygwin and mingw bin directories.

      For Example:
      CODE
      SET PATH=C:\MinGW\bin;C:\Cygwin\bin;%PATH%

      The %PATH% is very important.

      Now, cd to gtk\gtk. run nmake -f makefile.msc. Let it do its thing
      until it finishes. The LIB file will automatically be moved to the
      directory where you extracted everything.

      Next, cd to ..\gdk\win32 and run nmake -f makefile.msc. Now, cd to ..
      and run nmake -f makefile.msc. Once its done, ti will automatically
      move teh LIB fiel to teh same directory as the gtk lib.

      Now, copy libiconv-1.9.2\include\iconv.h.msvc-static to glib\glib and
      rename it to iconv.h.

      cd to the directory where you extracted everything. Then, cd to
      glib/glib. Run nmake -f makefile.msc. It will eventualyl fail, and
      complain about iconv.lib. Ignore this. cd to gnulib. Run nmake -f
      makefile.msc. Now cd to .. and run nmake -f makefile.msc
      glib-2.2s.lib. Copy glib-2.2s.lib to the same directory as teh otehr
      libs you built.

      Now, cd to ../gobject and run nmake -f makefile.msc. It will quickly
      fail and give you anotehr iconv.lib thing. Ignore it. Now run nmake -f
      makefile.msc gobject-2.2s.lib. Copy the lib to folder where you have
      all of the rest of the libs.

      Next, cd to ../gmodule. Run nmake -f makefile.msc. It will fail and
      complain about glib. Ignore this. Run link -lib /out:gmodule-2.2s.lib
      gmodule.obj. Copy the lib to the place with teh rest fo the libs you
      built.

      cd to ..\build\win32\dirent. Run nmake -f makefile.msc. Copy the lib
      to the place with the rest fo the libs you built.

      cd back to the directory where you extracted everything. Now, cd to
      gtk\gdk-pixbuf. Run nmake -f makefile.msc. It will eventually fail and
      complain abotu glib. Ignore it. Run nmake -f makefile.msc
      gdk_pixbuf-2.2s.lib. Copy the lib to teh same directory as teh rest.

      cd back to the directory where you extracted everything. Now, cd to
      pango\pango and re-type "nmake -f makefile.msc". It will fail and
      complain about glib. Ignore it. The libs you need have already been
      build before the error occurred. Copy both libs to the directory with
      teh rest of them.

      cd back to the directory where you extracted everything. Now, cd to
      libiconv-1.9.2.
      Run:
      CODE
      sh configure --disable-shared --enable-static

      Run make. Then, cd to lib\.libs and run teh following:

      CODE
      ar vx libiconv.a
      link -lib /out:iconv.lib *.o

      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
      directory, create a file called empty.c and put this in it:

      CODE
      errno(){return 0;}
      _alloca(){return 0;}

      then run

      CODE
      gcc -c empty.c
      lib -out:empty.lib empty.o
      .

      Now, edit makefile.msc so it looks like this:

      CODE
      OBJ = gobject-2.2s.lib gmodule-2.2s.lib glib-2.2s.lib  \
       gdk-win32-2.2s.lib gdk_pixbuf-2.2s.lib \
       pango-0.24s.lib pangowin32-0.24s.lib \
       gtk-win32-2.2s.lib dirent.lib empty.lib /nodefaultlib:libc.lib
      LIBS = iconv.lib
      SYSLIB = gdi32.lib shell32.lib user32.lib advapi32.lib imm32.lib
      ole32.lib comdlg32.lib winmm.lib ws2_32.lib

      all:
      link /LTCG $(OBJ) /DLL /OUT:minigtk.dll /SUBSYSTEM:Windows $(LIBS)
      $(SYSLIB) /DEF:minigtk.def
      ls -l minigtk.dll
      static:
      link -lib $(OBJ) /OUT:minigtk-static.lib $(LIBS) $(SYSLIB)

      Next, edit minigtk.def and remove the following from it

      CODE
      textdomain
      gettext
      bind_textdomain_codeset
      bindtextdomain

      To create minigtk.dll, run nmake -f makefile.msc.

      To make the static library run nmake -f makefile.msc static. Ignore
      the warnings.

      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.
      Do This with cygwin, mingw, and msvc in your path:

      Get the source code for gettext-0.10.40 (Must be that specific
      version) and extract it.

      cd to the directory and run sh configure --disable-shared
      --enable-static and then run make. Find teh newly create libintl.a and
      cd to intl\.libs and create a fiel named gettext.def with thsio in it:

      CODE
      EXPORTS
      textdomain
      gettext
      bind_textdomain_codeset
      bindtextdomain

      Then run:

      CODE
      dllwrap --def gettext.def --dllname minintl.dll libintl.a

      Refer to pu7o's guide abotu linkign to minigtk to fidn otu hwo to get
      gettext.lib out of intl.dll using exports.sed. Then all you have to to
      is add gettext.lib to the LIBS=... line of makefile.msc and have it in
      the same dir as minigtk-static.lib, etc.

      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
      for this "miniature-version" of libintl could cause compatibility
      problems with other programs which might use gettext.

      Edit by Daemon404 (Again): I have been able to statically link my
      minint to xchat using teh great program DLL to Lib by Binary-Soft. :-)

      Edit by Pu7o: Added part about visual c++ toolkit, with the archive
      zip file. The archive.zip file is based on this one by boing with some
      extra needed files from the platform SDK. (a few .h files and
      comdlg32.lib)

      Edit by Pu7o: Changed links to reflect the new MiniGTK.

      Edit by Daemon404. It is also possible to compile MiniGTK with MSVC
      6.0. I just did it. You need to add /Zm1000 to the command line
      arguments in makefile.msc in glib\glib

      This post has been edited by Daemon404 on June 24, 2005 01:02 am

        本站是提供個人知識管理的網(wǎng)絡(luò)存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點(diǎn)擊一鍵舉報(bào)。
        轉(zhuǎn)藏 分享 獻(xiàn)花(0

        0條評論

        發(fā)表

        請遵守用戶 評論公約

        類似文章 更多