| 志福 的个人资料阿福台照片日志列表 | 帮助 |
|
2007/9/20 [原创]手工交叉编译ARM版的Firefox手机浏览器插件gnash之Shell脚本 这是手工交叉编译ARM版的Firefox手机浏览器插件gnash之Shell脚本。(这里我们用的版本是firefox-2.0.0.3_r2) 有需要的朋友可以参考着配置一下,主要是一些编译环境变量的设置。具体可以参考官方的configure及open embedded中关于gnash交叉编译补丁文件。 以下是arm编译环境配置脚本conf_arm.sh: #!/bin/sh export PROJECTSDK="/proj/oe/build_mnh/staging" export PATH="${PROJECTSDK}/../cross/bin":$PATH #export CFLAGS="-g -L${PROJECTSDK}/${PROJECTTARGET}/lib -Wl,-rpath-link,${PROJECTSDK}/${PROJECTTARGET}/lib -pedantic -I${PROJECTSDK}/${PROJECTTARGET}/include -fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os -fpermissive -fvisibility-inlines-hidden -fshort-wchar" export CFLAGS="-g -L${PROJECTSDK}/${PROJECTTARGET}/lib -Wl,-rpath-link,${PROJECTSDK}/${PROJECTTARGET}/lib -pedantic -I${PROJECTSDK}/${PROJECTTARGET}/include -fpermissive" #export LDFLAGS="-Wl,-rpath-link,${PROJECTSDK}/${PROJECTTARGET}/lib -Wl,-O1" export CROSS_COMPILE="1" export CONFIGURE_ARGS="\ export BUILD_CC=gcc export HOST_CC="${BUILD_CC}"
以下是gnash编译脚本make_gnash_arm.sh: #!/bin/sh export PROJECTSDK="/proj/oe/build_mnh/staging" export PATH="${PROJECTSDK}/../cross/bin":$PATH #export CFLAGS="-g -L${PROJECTSDK}/${PROJECTTARGET}/lib -Wl,-rpath-link,${PROJECTSDK}/${PROJECTTARGET}/lib -pedantic -I${PROJECTSDK}/${PROJECTTARGET}/include -fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os -fpermissive -fvisibility-inlines-hidden -fshort-wchar" export CFLAGS="-g -L${PROJECTSDK}/${PROJECTTARGET}/lib -Wl,-rpath-link,${PROJECTSDK}/${PROJECTTARGET}/lib -pedantic -I${PROJECTSDK}/${PROJECTTARGET}/include -fpermissive" #export LDFLAGS="-Wl,-rpath-link,${PROJECTSDK}/${PROJECTTARGET}/lib -Wl,-O1" export CROSS_COMPILE="1" export CONFIGURE_ARGS="\ export BUILD_CC=gcc export HOST_CC="${BUILD_CC}"
[原创]手工交叉编译ARM版的Firefox手机浏览器之Shell脚本和mozconfig配置文件 这是手工交叉编译ARM版的Firefox手机浏览器之Shell脚本和mozconfig配置文件。(这里我们用的版本是firefox-2.0.0.3_r2) 有需要的朋友可以参考着配置一下,主要是一些编译环境变量的设置。具体可以参考官方的configure及open embedded中关于Firefox交叉编译补丁文件。 ARM版的Firefox手机浏览器之Shell脚本: #!/bin/sh export MOZSDK="/proj/oe/build_mnh/staging" export PATH="${MOZSDK}/../cross/bin":$PATH #export CFLAGS="-g -L${MOZSDK}/${MOZTARGET}/lib -Wl,-rpath-link,${MOZSDK}/${MOZTARGET}/lib -pedantic -I${MOZSDK}/${MOZTARGET}/include -fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os -fpermissive -fvisibility-inlines-hidden -fshort-wchar" export CFLAGS="-g -L${MOZSDK}/${MOZTARGET}/lib -Wl,-rpath-link,${MOZSDK}/${MOZTARGET}/lib -pedantic -I${MOZSDK}/${MOZTARGET}/include -fpermissive" #export LDFLAGS="-Wl,-rpath-link,${MOZSDK}/${MOZTARGET}/lib -Wl,-O1" export CROSS_COMPILE="1" export CONFIGURE_ARGS="\ export BUILD_CC=gcc export HOST_CC="${BUILD_CC}" case "$1" in make \
mozconfig配置文件: . $topsrcdir/browser/config/mozconfig #system config # use GTK+-2 widget set with XFT font rendering # enable minimal profile support ac_add_options --with-system-zlib ac_add_options --disable-accessibility # configure necko to allocate smaller network buffers # disable debug logging and tests # build crypto module (PSM + NSS) # build minimal set of protocol handlers # build minimal set of image decoders #ac_add_options --enable-reorder # enable static build ac_add_options --enable-plugins 同时有一个莫名的segmentation fault问题,需要在gtk+里面加一个以回国换行符结尾的且非空串的"printf(""string\n");",说起来很荒唐,但问题确实是存在的。具体的两个patch补丁如下: gtk+_2.10.14.bb: require gtk-2.10.inc PR = "r7" SRC_URI = "ftp://ftp.gtk.org/pub/gtk/v2.10/gtk+-${PV}.tar.bz2 \ # check for TARGET_FPU=soft and inform configure of the result so it can disable some floating points # try to squeeze some more performance out of it # this doesn't seem to work gtk+-range-segmentation-fault.patch: --- gtk+-2.10.14/gtk/~gtkrange.c 2007-09-03 13:33:22.000000000 +0800
+++ gtk+-2.10.14/gtk/gtkrange.c 2007-09-03 13:34:37.000000000 +0800 @@ -632,7 +632,9 @@ gtk_range_set_adjustment (GtkRange GtkAdjustment *adjustment) { g_return_if_fail (GTK_IS_RANGE (range)); - + + printf("[QFirefox] gtk_range_set_adjustment.\n"); + if (!adjustment) adjustment = (GtkAdjustment*) gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0); else 2007/9/12 [原创]巧用IISReWrite实现域名解析与静态化这是一些IISReWrite的配置文件,是我以前一直用来配合IIS实现网站的域名解析和目录的绑定,以及网页链接的静态化。 有需要的朋友可以参考着配置一下,主要是一些正则表达式的运用。具体语法可以参考官方手册。 [ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600 RepeatLimit 32
# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP #Fix missing slash char on folders
RewriteCond Host: (.*) RewriteRule ([^.?]+[^.?/]) http\://$1$2/ [I,R] # 泛域名解析 Rewrite规则
############################################################# # afutai.com ############################################################# #Emulate site1 #RewriteCond Host: (?:wap\.|wsrd\.|wsc\.|www\.)?afutai\.com\:8009 #RewriteRule ^/(.*) /asp/domain/$1 [I,L] #Emulate Site www.afutai.com #http://wap.afutai.com:8009/index.html -> http://wap.afutai.com:8009/asp/afutai/afutai/index.html RewriteCond Host: (?:www\.)?(?:afutai|3nuo|nuoji)\.(?:com|net) RewriteRule ^/(.*) /others/root/afutai/$1 [I,L] #Emulate Site wap.afutai.com
#http://wap.afutai.com:8009/index.html -> http://wap.afutai.com:8009/asp/afutai/afutai/index.html RewriteCond Host: (?:wap\.)afutai\.com RewriteRule ^/(.*) /others/root/afutai/$1 [I,L] #Emulate Site wsrd.afutai.com,wsc.afutai.com
#http://wap.afutai.com:8009/index.html -> http://wap.afutai.com:8009/asp/afutai/afutai/index.html #RewriteCond Host: (?:wsrd\.|wsc\.)?afutai\.com #RewriteRule ^/(.*) /others/root/afutai/wsc/$1 [I,L] #RewriteCond Host: (?:blog\.)afutai\.com
#RewriteRule ^/asp/(.*) /others/root/afutai/asp/$1 [I,L] RewriteCond Host: (?:blog\.)afutai\.com
RewriteRule ^/(.*) /others/root/afutai/$1 [I,L] #映射blog.afutai.com的8009端口 RewriteCond Host: (?:blog\.|www\.)afutai\.com\:8009 RewriteRule ^/(.*) /others/root/afutai/$1 [I,L] #RewriteProxy ^/(.*) http\://www.afutai.com/$1 [I,U] #############################################################
# hundsun.net ############################################################# #Emulate Site www.hundsun.net #http://www.hundsu.net/ -> /others/root/timinet/ RewriteCond Host: (?:www\.)?(?:hundsun)\.(?:com|net) RewriteRule ^/(.*) /others/root/$1 [I,L] #############################################################
# 51bishe.com ############################################################# #Emulate Site www.afutai.com #http://wap.afutai.com:8009/index.html -> http://wap.afutai.com:8009/asp/afutai/afutai/index.html RewriteCond Host: (?:www\.)?(?:51bishe|biye120)\.(?:com|net) RewriteRule ^/(.*) /others/root/bullfrog/$1 [I,L] #############################################################
############################################################# #############################################################
############################################################# #RewriteCond Host: (?:wsc\.)afutai\.com #RewriteRule (.+) http\://www.alrzj.com$1 [R] #RewriteRule (.+) http\://192.168.100.100$1 [R] #good ###################################################################### #Emulate site2
#RewriteCond Host: (?:blog\.)?afutai\.com\:8009 #RewriteRule (.*) /asp/afutai/afutai/$1 [I,L] #Emulate site2
#RewriteCond Host: (?:blog\.)?afutai\.com\:8009 #RewriteRule (.*) /asp/afutai/afutai/index.html$1 [I,L] # Afutai Rewrite规则
#RewriteRule ^/index([\.a-zA-Z0-9]*)$ /asp/domain/index\.asp #RewriteRule ^(http://wap.afutai.com:8009)/index([\.a-zA-Z0-9]*)$ $1/asp/domain/index\.asp #RewriteRule ^(wap\.afutai\.com\:8009)/(.*)$ $1/asp/$2 #RewriteRule ^(.*?\.asp) /asp/domain/index\.asp # http://wap.afutai.com:8009/index.htm # Discuz4.10 Rewrite规则
#RewriteRule ^(.*)/archiver/([a-z0-9\-]+\.html)$ $1/archiver/index\.php\?$2
#RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+)\.html$ $1/forumdisplay\.php\?fid=$2&page=$3 #RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/viewthread\.php\?tid=$2&extra=page\%3D$4&page=$3 #RewriteRule ^(.*)/profile-(username|uid)-(.+)\.html$ $1/viewpro\.php\?$2=$3 # SupeSite Rewrite规则
#RewriteRule ^(.*)/bbs/archiver/([a-z0-9\-]+\.html)$ $1/bbs/archiver/index.php?$2
#RewriteRule ^(.*)/bbs/forum-([0-9]+)-([0-9]+)\.html$ $1/bbs/forumdisplay.php?fid=$2&page=$3 #RewriteRule ^(.*)/bbs/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/bbs/viewthread.php?tid=$2&extra=page\%3D$4&page=$3 #RewriteRule ^(.*)/bbs/profile-(username|uid)-(.+)\.html$ $1/bbs/viewpro.php?$2=$3 #RewriteRule ^/([0-9]+)/spacelist(.*)$ /index\.php\?$1/action_spacelist$2
#RewriteRule ^/([0-9]+)/viewspace(.+)$ /index\.php\?$1/action_viewspace_itemid$2 #RewriteRule ^/([0-9]+)/viewbbs(.+)$ /index\.php\?$1/action_viewbbs_tid$2 #RewriteRule ^/([0-9]+)/(.*)$ /index\.php\?$1/$2 #RewriteRule ^/([0-9]+)$ /index\.php\?$1 #RewriteRule ^/action(.+)$ /index\.php\?action$1 #RewriteRule ^/category(.+)$ /index\.php\?action_category_catid$1 #RewriteRule ^/itemlist(.+)$ /index\.php\?action_itemlist_catid$1 #RewriteRule ^/viewnews(.+)$ /index\.php\?action_viewnews_itemid$1 #RewriteRule ^/viewthread(.+)$ /index\.php\?action_viewthread_tid$1 #RewriteRule ^/index([\.a-zA-Z0-9]*)$ /index\.php |
|
|