<meter id="pryje"><nav id="pryje"><delect id="pryje"></delect></nav></meter>
          <label id="pryje"></label>

          新聞中心

          Linux下使用aMsn詳解

          作者: 時間:2007-05-21 來源:網(wǎng)絡(luò) 收藏
          amsn這一款在linux下的Msn就不多介紹了,0.95版出來后加入了攝像頭,在加上其文件傳輸功能,你還留戀于gaim么?

          經(jīng)過多天的搜索和嘗試,終于在Fedora Core3里用上amsn了。其實安裝amsn并run起來不難(不過我基本上從不能運行到能運行,不能輸入任何字符到能輸入英文,不能輸入中文到能輸入中文的問題都遇到了,還遇到程序段錯誤等等,也夠衰的了),尤其是中文輸入的問題是有點麻煩,因為開發(fā)amsn的語言是Tcl/tk, 對中文的支持不是太好,加之a(chǎn)msn-0.95需要tcl/tk 8.4以上支持,故以前jserv兄的tcl/tk 8.3 XIM patch不能用了,不過前幾天他推出了一個diff,總算讓偶找到了,活活。ok,閑話不多說了。
          安裝amsn的必要條件:
          1.gcc之類編譯工具必不可少,涉及相應(yīng)類庫,如果你在編譯時出錯,煩請自己上網(wǎng)搜相應(yīng)的包安裝.
          2.tcl8.5a3-src.tar.gz
          3.tk8.5a3-src.tar.gz 以上兩個包都可以在tcl/tk的官方網(wǎng)站下載得到
          4.amsn-0.95.tar.gz 這里需要說明一下,amsn.sourceforge.net上有很多amsn的版本諸如bin,rpm等,甚至有專為Fedora的rpm包,不過鄙人不推薦使用那些,在列表里選取“other”,下載amsn-0.95.tar.gz。
          5. tk-cvs-xim-fixes.diff 下載地址http://jserv.sayya.org/tcl-i18n/tk-cvs-xim-fixes.diff (附言:感謝jserv大大對中文輸入的貢獻(xiàn))

          當(dāng)獲取這些文件后,我們將之放在/home目錄下

          為了造成不必要的困擾,先刪除系統(tǒng)中自帶的tcl和tk

          [root@localhost ~]#rpm -qa|grep tcl
          tcl8.4*****
          [root@localhost ~]#rpm -e tcl
          [root@localhost ~]#rpm -qa|grep tk
          tk8.4*****
          [root@localhost ~]#rpm -e tk


          如果卸載tcl發(fā)現(xiàn)有其他安裝包依賴于tcl,如果那些包不重要,就先刪那些包,當(dāng)然你也可以rpm -e --nodeps tcl卸載。


          [root@localhost home]# tar xvzf tcl8.5a3-src.tar.gz
          [root@localhost home]# tar xvzf tk8.5a3-src.tar.gz



          在安裝它們之前需要先進(jìn)行diff打patch,命令很簡單:patch -p0 tk-cvs-xim-fixes.diff
          不過為大家解析一下jserv大大的這個patch文件內(nèi)容,這樣理解起來大家更容易些,中文輸入都是我說的話(針對菜鳥,汗!其實偶也是菜鳥)

          Index: generic/tkEvent.c
          ===================================================================
          RCS file: /home/tk8.5a3/generic/tkEvent.c,v //遭修改的文件 tkEvent.c
          retrieving revision 1.31
          diff -u -p -r1.31 tkEvent.c
          --- generic/tkEvent.c 4 Nov 2005 11:52:50 -0000 1.31
          +++ generic/tkEvent.c 4 Jan 2006 06:31:19 -0000
          @@ -449,8 +449,10 @@ InvokeInputMethods( //大概在449行左右的位置,在InvokeInputMethods方法里
          XSetICFocus(winPtr->inputContext);
          }
          }
          - if (XFilterEvent(eventPtr, None)) { // 刪
          - return 1; //刪
          + if (eventPtr->type == KeyPress || eventPtr->type == KeyRelease) { //增加的內(nèi)容
          + if (XFilterEvent(eventPtr, None)) { //增加
          + return 1; //增加
          + } //增加
          }
          }
          return 0;
          Index: unix/tkUnixEvent.c
          ===================================================================
          RCS file: /home/tk8.5a3/unix/tkUnixEvent.c,v
          retrieving revision 1.19
          diff -u -p -r1.19 tkUnixEvent.c
          --- unix/tkUnixEvent.c 7 Dec 2005 17:32:52 -0000 1.19
          +++ unix/tkUnixEvent.c 4 Jan 2006 06:31:20 -0000
          @@ -334,19 +334,22 @@ static void
          TransferXEventsToTcl(
          Display *display)
          {
          - int numFound;
          XEvent event;

          - numFound = QLength(display);
          -
          /*
          - * Transfer events from the X event queue to the Tk event queue.
          + * Transfer events from the X event queue to the Tk event queue
          + * after XIM event filtering. KeyPress and KeyRelease events
          + * are filtered in Tk_HandleEvent instead of here, so that Tk's
          + * focus management code can redirect them.
          */
          -
          - while (numFound > 0) {
          + while (QLength(display) > 0) {
          XNextEvent(display, event);
          + if (event.type != KeyPress event.type != KeyRelease) {
          + if (XFilterEvent(event, None)) {
          + continue;
          + }
          + }
          Tk_QueueWindowEvent(event, TCL_QUEUE_TAIL);
          - numFound--;
          }
          }







          下面安裝這些軟件:


          [root@localhost home]# cd tcl8.5a3
          [root@localhost home]# cd unix
          [root@localhost home]# ./configure --prefix=/usr
          --enable-gcc
          --disable-threads
          --disable-shared
          [root@localhost home]# make clean
          [root@localhost home]# make
          [root@localhost home]# make install



          [root@localhost home]# cd tk8.5a3
          [root@localhost home]# cd unix
          [root@localhost home]# ./configure --prefix=/usr
          --enable-gcc
          --disable-threads
          --disable-shared
          --enable-xft
          --disable-symbols
          [root@localhost home]# make clean
          [root@localhost home]# make
          [root@localhost home]# make install



          非常關(guān)鍵的兩個link!??!

          [root@localhost home]#ln -s /usr/bin/wish8.5 /usr/bin/wish
          [root@localhost home]#ln -s /usr/bin/tclsh8.5 /usr/bin/tclsh




          最后解壓amsn-0.95.tar.gz

          [root@localhost home]# tar xvzf amsn-0.95.tar.gz
          [root@localhost home]# cd amsn -0.95
          [root@localhost home]# ./configure --with-tcl=/usr/lib make clean make



          最后運行amsn ,大功告成!
          linux操作系統(tǒng)文章專題:linux操作系統(tǒng)詳解(linux不再難懂)


          關(guān)鍵詞: aMsn Linux

          評論


          相關(guān)推薦

          技術(shù)專區(qū)

          關(guān)閉
          看屁屁www成人影院,亚洲人妻成人图片,亚洲精品成人午夜在线,日韩在线 欧美成人 (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })();