刷金's profile秘密好望角★The.Secret.Cape.of...PhotosBlogListsMore Tools Help

秘密好望角★The.Secret.Cape.of.Good.Hope

吾生也有涯,而知也无涯。以有涯随无涯,殆已。

刷金 牛

Photo 1 of 1
More albums (1)
6/9/2009

牛刷金的来历

玩过《三国战纪 2:群雄争霸》的应该知道。顺便贴一段单王刷分 23 亿的录像(不是我打的):
   
5/24/2009

被误读的几句话

  1. 误:以德报怨。
    正:或曰:“以德报怨,何如?”子曰:“何以报德?以直报怨,以德报德。”
  2. 误:民可使由之,不可使知之。
    正:民可,使由之;不可,使知之。
  3. 误:量小非君子,无毒不丈夫。
    正:量小非君子,无度不丈夫。
  4. 误:吾生也有涯,而知也无涯。
    正:吾生也有涯,而知也无涯。以有涯随无涯,殆已。
  5. 误:相濡以沫。
    正:相濡以沫,不如相忘于江湖。
9/28/2008

Using GTK+ on Win64

If you are coding GTK+ for win32 only, stop here and go to Glade for Win32.

GTK+ team has recently released development packages for win64, but without Glade, and there seems to be nobody working on it at this time. I spent nearly every night in this week on it and has just managed to get it work. This is my first time to build staffs from source, so I encountered and solved a lot of problems. I'm going to walk my path again and write it down, and hopefully it will help you.

Prerequisites

  • mingw-w64
    Download the latest complete toolchain. You can choose mingw-w64-bin_i686-mingw_*.zip that is a cross compiler toolchain working on both win32 and win64. If you own a copy of 64-bit Windows, you can also use mingw-w64-bin_x86_64-mingw_*.zip that is a native compiler toolchain for win64 only, which is also my situation.Unpack it to C:\mingw-w64 or anywhere as you wish, add C:\mingw-w64\bin to your Path environment variable.
  • msys
    Download the latest version here (currently msysCORE-1.0.11-20080826.tar.gz), unpack it to C:\msys and add C:\msys\bin to your Path. Don't use the "Current Release" version 1.0.10, for it will crash on Windows Vista. You can create a desktop shortcut to msys.bat, which launches a Unix-like shell used to build our packages.
  • GTK+ Development Packages
    Downloag the all-in-one bundle from the official GTK+ web site. Unpack it to C:\GTK or anywhere as you wish, add C:\GTK\bin to your Path, and set the PKG_CONFIG_PATH environment variable to C:\GTK\lib\pkgconfig.
    You also need libjpeg and libtiff required by libglade we're going to build.
  • Test Your Settings
    Open msys shell by running msys.bat, and execute make --version, gcc --version and pkg-config --cflags gtk+-2.0. Make sure you get outputs about version or make, version of gcc and the include directories of GTK+. If not, you'd better go through the above requirements again.
Now you're ready to compile. Glade depends on several libraries, and they seem to have no win64 binaries available too. In a nutshell, you need to build the following things one by one: libiconv, libxml2, libglade, hicolor-icon-theme and Glade3.

libiconv

  • Download libiconv
    Though the Official GTK+ site provides a small static library called win_iconv as a replacement for the much larger GNU libiconv, libxml prefers the latter for now. You get the latest source code of libiconv from here.
  • Hack libtool
    libtool has a bug on windows. It treats all *.a files as static libraries which would cause linking fail. I don't know how to make it distinguish static and dynamic libraries, but since all we have now are dynamic ones, this hacking task becomes very simple.
    Open build-aux/ltmain.sh, navigate to function func_win32_libid(), delete the entire *ar\ archive*) case, and then change
    *ar\ archive\ import\ library*)
    to
    *ar\ archive*)
    Now libtool will treat every *.a file as an archive import library.
  • Correct windres-options
    Sed expressions in windows/windres-options are wrong. Open this file and change
    sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q}
    a\
    0
    q
    '
    sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q}
    a\
    0
    q
    '
    sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p;q}
    a\
    0
    q
    '

    to
    sed_extract_major='
    /^[0-9]/{s/^\([0-9]*\).*/\1/p
    q
    }
    a\
    0
    '
    sed_extract_minor='
    /^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p
    q
    }
    a\
    0
    '
    sed_extract_subminor='
    /^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p
    q
    }
    a\
    0
    '
  • Build And Install
libxml2
  • Download libxml2
    Get the latest source here.
  • Hack libtool
    Please refer to "libiconv". Notice ltmain.sh is in the root directory this time.
  • Modify Source
    Open include/wsochcompat.h and delete #include <wspiapi.h>. wspiapi.h is actually not needed but leaving it would cause some linking errors.
  • Build And Install
libglade
  • Download libglade And Hack libtool
    Get the latest source here.
  • Build And Install
hicolor-icon-theme

  • Download hicolor-icon-theme
    Get the latest source here.
  • Build And Install
Glade3

  • Download Glade3 And Hack libtool
    Get the latest source here.
  • Correct The Code
    Open gladeui/glade-utils.h and delete these two functions:
    void glade_util_widget_set_tooltip(GtkWidget *widget, const gchar *str);
    gboolean glade_util_version_lesser_than(gdouble a, gdouble b);

    Open gladeui/glade-builtins.h and delete these two functions:
    guint glade_builtin_key_from_string(const gchar *string);
    const gchar *glade_builtin_string_from_key(guint key);

    These four functions have only declarations without implementations. Leaving them will cause linking errors.
  • Build And Install
    Configure with GMSGFFMT=msgfmt.
Now you have a complete development tool set of GTK+ on win64.

8/30/2008

1984 年第五届金酸梅电影奖

原文:http://www.razzies.com/forum/forum_posts.asp?TID=334

最差影片
  《波列罗》,制片人波·德里克。
……
8/29/2008

1995 年第五届 Ig 诺贝尔奖

原文:http://improbable.com/ig/ig-pastwinners.html#ig1995

营养学
  佐治亚州亚特兰大市 J.·马汀尼斯公司的约翰·马汀尼斯,因他的鲁瓦克咖啡——世界上最贵的咖啡,它由鲁克(又叫果子狸,一种印度尼西亚土生的类似山猫的动物)吃掉再拉出的咖啡豆做成。

物理学
  英格兰诺里奇食物研究所的 D.M.R.·乔治特A.C.·史密斯,因他们对受潮的谷制品早餐的严密分析,发表于题为《对水分在谷制品早餐搁板上的压实效应的研究》的报告中。[发表于《粉末技术》,1994 年 11 月,第 81 卷,2 号,189-196 页]

经济学
  同时颁发给尼克·利森和他在霸菱银行的上司,以及加利福利亚橙县的罗伯特·塞特隆,因他们使用导数的微积分来演示每个金融机构都有极限。[参考:《霸菱失败了:尼克·利森和霸菱公司的倒塌》和《大赌注搞砸了》]

医学
  玛西娅·E.·布贝尔戴维·S.·山那霍夫-哈尔萨迈克尔·R.·玻意耳,因他们题为《对单侧强迫性鼻孔呼吸效果的认知》的鼓舞性研究。[发表于《神经学国际期刊》,第 57 卷,1991 年,239-249 页]

文学
  威斯康星州麦迪逊市的戴维·B.·布施詹姆斯·R.·斯达林,因他们深入透彻的研究报告《直肠异物:案例报告和世界文献的全面重温》。这些引证包括下列报告,不胜枚举:一些七彩灯泡;一个卷笔刀;两个手电筒;一个金属丝弹簧;一个鼻烟盒;一个带土豆塞子的油罐;十一种不同形式的水果、蔬菜和其它吃的东西;一个钟表匠的锯子;一条冰冻猪尾巴;一个罐头盖子;一个啤酒杯;以及由一副眼镜、一把手提箱钥匙、一个烟袋和一本杂志组成的一个病人的经典全套收藏品。

和平
  台湾国会,因其演示政客以拳打脚踢和互相欺诈能获得比向他国开战更多的好处。

心理学
  庆应义塾大学的渡边茂坂本纯子胁真澄,因他们成功地训练鸽子去区别毕加索和莫奈的画作。[参考:《鸽子对莫奈和毕加索画作的辨别》,《行为实验分析期刊》,卷 63,1995 年,165-174 页]

公共健康
  挪威特隆海姆市森泰福集团的玛莎·科尔德·巴克维格,以及丹麦技术大学的露丝·尼尔森,因她们的透彻研究:《冷天里湿内衣在体温响应和保暖舒适上的影响》。[发表于《人体工程学》,卷 37,8 号,1994 年 8 月,1375-1389 页]

牙科学
  明尼苏达州肖维市的罗伯特·H.·博蒙特,因他的深刻研究:《病人对打蜡或不打蜡的牙线的偏好》。[发表于《牙周病学期刊》,卷 61,2 号,1990 年 2 月,123-125 页]

化学
  比佛利山的毕坚·帕克萨德香水企业,因其创造了 DNA 科龙香水和 DNA 香精香水,它们都不含脱氧核糖核酸,并且都装在三重螺旋状瓶子里。
 

Weather

Loading...
一些有用的链接
一些有趣的链接
感谢访问!
Please wait...
Sorry, the comment you entered is too long. Please shorten it.
You didn't enter anything. Please try again.
Sorry, we can't add your comment right now. Please try again later.
To add a comment, you need permission from your parent. Ask for permission
Your parent has turned off comments.
Sorry, we can't delete your comment right now. Please try again later.
You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
Complete the security check below to finish leaving your comment.
The characters you type in the security check must match the characters in the picture or audio.
刷金 牛wrote:
测试一下效果。 
Aug. 7