source navigator安裝過程以及問題解決辦法。

32位的ubuntu系統:(後面會有64位系統上安裝方式)
ubuntu

1. 下載最新的source navigator包,URL爲:http://sourceforge.net/projects/sourcenav/ app

我下的最新的包爲sourcenav-6.0.tar.gz ,大小:18.9MB. 工具

2.解壓之,命令:tar zxvf sourcenav-6.0.tar.gz
3. sudo apt-get install libx11-dev
4. 準備安裝咯,首先執行命令:./configure   (這個文件會指點安裝目錄,要注意!!) spa

5.編譯make .net

6.s安裝sudo make install 命令行

7.運行snavigator orm

可是會出現以下錯誤: ci

Can't find a usable tk.tcl in the following directories:  get

    /usr/local/share/tk8.3  string

/usr/local/share/tk8.3/tk.tcl: no event type or button # or keysym

no event type or button # or keysym

    while executing

"bind Listbox <MouseWheel> {

    %W yview scroll [expr {- (%D / 120) * 4}] units

}"

    (file "/usr/local/share/tk8.3/listbox.tcl" line 182)

    invoked from within

"source [file join $tk_library listbox.tcl]"

    invoked from within

"if {[string compare $tcl_platform(platform) "macintosh"] && \

[string compare {} $tk_library]} {

    source [file join $tk_library button.tcl]

    so..."

    (file "/usr/local/share/tk8.3/tk.tcl" line 308)

    invoked from within

"source /usr/local/share/tk8.3/tk.tcl"

    ("uplevel" body line 1)

    invoked from within

"uplevel \#0 [list source $file]"

This probably means that tk wasn't installed properly.

 

解決方法:到你解壓縮目錄下到 ./tk/ generic/修改tk.h文件!

修改內容:

//#define VirtualEvent        (LASTEvent)
//#define ActivateNotify        (LASTEvent + 1)
//#define DeactivateNotify    (LASTEvent + 2)
//#define MouseWheelEvent     (LASTEvent + 3)
//#define TK_LASTEVENT        (LASTEvent + 4)
#define VirtualEvent        (MappingNotify + 1)
#define ActivateNotify        (MappingNotify + 2)
#define DeactivateNotify    (MappingNotify + 3)
#define MouseWheelEvent     (MappingNotify + 4)
#define TK_LASTEVENT        (MappingNotify + 5)
#define MouseWheelMask        (1L << 28)       // 如下三條語句必需要有(包括本條),若原來沒有,則須要添加!
#define ActivateMask        (1L << 29)               //
#define VirtualEventMask    (1L << 30)            //

//#define TK_LASTEVENT        (LASTEvent + 4)

以後,重複步驟2到7.就能夠了!

64位的ubuntu系統:

http://mirror.lupaworld.com/ubuntu/pool/universe/s/sourcenav/sourcenav_5.1.4-5_amd64.deb

sudo dpkg -i sourcenav_5.1.4-5_amd64.deb

創建快捷方式:
安裝好以後的source navigator可從終端用命令行啓動。如果不習慣,而喜歡從應用菜單開始,能夠建立一個項目到應用菜單中。執行:sudo gedit /usr/share/applications/source-navigator.desktop

將下面文本複製,並保存退出,即可在應用菜單中看到source navigator了。注意:除了Icon那一行以外,每行的後面不能有空格,不然有可能在應用菜單中沒法顯示source navigator項。
[Desktop Entry]
Name=Source-Navigator
Comment=看代碼的工具
Exec=/usr/local/bin/snavigator    (confirgure指點到目錄!)
Icon=
Terminal=false
Type=Application
Categories=Application;Development;
相關文章
相關標籤/搜索