安装Source Navigator

马和硕
2023-12-01

在安装的过程中,一个重要的技巧是执行指令./configure 时加入执行的参数指令是./configure --prefix=/usr/share/name

上述这样做的好处是在uninstall删除那个目录(You might also remove your ~/.sn directory where settings are saved),即可以完全的删除干净,要不就要到处查找所要删除的文件,这样就变得非常麻烦了。

Source-Navigator的安装:

我用的是现时的6.0版本,下面是安装方法:

从以下地址下载最新的版本:

http://sourceforge.net/projects/sourcenav/

从以下地址下载一个重要的PATCH,tk-lastevent.patch:

http://svn.exactcode.de/t2/trunk/package/develop/sourcenav-ng/

1.解压 tar -xzvf sourcenav-6.0.tar.gz

2.进入解压后目录

$:cd sourcenav-6.0

3.把tk-lastevent.patch拷到sourcenav-6.0的目录下,然后打开sourcenav的文件夹,打补丁

$:patch -p1 < tk-lastevent.patch

我个人按照打补丁时失败了,提示:

patching file -p1 Hunk #1 FAILED at 635. 1 out of 1 hunk FAILED -- saving rejects to file -p1.rej

不管这个提示,继续

4.创建安装目录

$:sudo mkdir /usr/share/sourcenav

5. 执行

$:./configure --prefix=/usr/share/sourcenav

6.安装需求库

$:sudo apt-get install libx11-dev

7.

$:make

8.

$:make install

程序将被安装在:/usr/local/sourcenav/bin

执行./snavigator

提示错误:

Can't find a usable tk.tcl in the following directories:      /usr/share/sourcenav/share/tk8.3  /usr/share/sourcenav/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/share/sourcenav/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/share/sourcenav/share/tk8.3/tk.tcl" line 308)     invoked from within "source /usr/share/sourcenav/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.

解决方法:

将安装目录下的

/usr/share/sourcenav/share/tk8.3/listbox.tcl 第182-184行 /usr/share/sourcenav/share/tk8.3/text.tcl 第457-459行

用"#注释掉"


最后,可以在桌面上生成一个链接:

1、点击右键“创建启动器...”

2、类型是“应用程序”

3、名称是SourceNavigator

4、命令是"/usr/share/sourcenav/bin/snavigator"

确定就可以启动程序了


 类似资料: