天天热点评!source navigator安装过程以及问题解决办法。

2022-09-19 10:58:10来源:互联网  

2019独角兽企业重金招聘Python工程师标准>>>

32位的ubuntu系统:(后面会有64位系统上安装方式)


【资料图】

1. 下载最新的source navigator包,URL为:http://sourceforge.net/projects/sourcenav/

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

2.解压之,命令:tar zxvf sourcenav-6.0.tar.gz
3. sudo apt-get install libx11-dev
4. 准备安装咯,首先执行命令:./configure   (这个文件会指点安装目录,要注意!!)

5.编译make

6.s安装sudo make install

7.运行snavigator

但是会出现如下错误:

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

    /usr/local/share/tk8.3 

/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;



转载于:https://my.oschina.net/kangchunhui/blog/74551

相关阅读

精彩推荐

相关词

推荐阅读