在Windows上使用Cygwin源码安装tig

Linux上安装就简单,这里就不介绍了

参考官网:https://github.com/jonas/tig/blob/master/INSTALL.adoc

git clone git@github.com:jonas/tig.git

$ git clone git@github.com:jonas/tig.git
正克隆到 'tig'...
remote: Enumerating objects: 84, done.
remote: Counting objects: 100% (84/84), done.
remote: Compressing objects: 100% (47/47), done.
remote: Total 14010 (delta 38), reused 61 (delta 35), pack-reused 13926
接收对象中: 100% (14010/14010), 6.04 MiB | 1.05 MiB/s, 完成.
处理 delta 中: 100% (9787/9787), 完成.

cd git

CUITLLB@Hayashi ~/gitspace/tig
$ ls
appveyor.yml  book.json  compat          configure.ac  COPYING  include       Makefile   README.adoc  src   tigrc
autogen.sh    book.md    config.make.in  contrib       doc      INSTALL.adoc  NEWS.adoc  snap         test  tools

在线安装一些必须包【 gitgcc-coremakelibiconv-devel and libncurses-devel,源码安装还需安装automake,字符显示相关包ncursesw】,安装前需要安装apt-cyg,类似于Ubuntu的apt-ge和CentOS的yum,地址:https://github.com/transcode-open/apt-cyg ,下载下来后放在Cygwin的bin目录下即可

然后依次按照依赖包 apt-cyg install  XXX

举例:

apt-cyg install libiconv-devel
Installing libiconv-devel
--2019-06-08 15:19:31--  http://mirrors.ustc.edu.cn/cygwin//x86_64/release/libiconv/libiconv-devel/libiconv-devel-1.14-3.tar.xz
正在解析主机 mirrors.ustc.edu.cn (mirrors.ustc.edu.cn)... 202.141.176.110, 202.38.95.110, 2001:da8:d800:95::110
正在连接 mirrors.ustc.edu.cn (mirrors.ustc.edu.cn)|202.141.176.110|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:682524 (667K) [application/octet-stream]
正在保存至: “libiconv-devel-1.14-3.tar.xz”

libiconv-devel-1.14-3.tar.xz          100%[=======================================================================>] 666.53K   647KB/s  用时 1.0s

因为是源码安装需要执行:在安装完automake后

CUITLLB@Hayashi ~/gitspace/tig
$ make configure
       GEN  configure

 

然后安装:

$ ./configure
CUITLLB@Hayashi ~/gitspace/tig
$ ./configure
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
$ make
CUITLLB@Hayashi ~/gitspace/tig
$ make
        CC  src/tig.o
        CC  src/types.o
        CC  src/string.o
        CC  src/util.o
        CC  src/map.o
        CC  src/argv.o
        CC  src/io.o
        CC  src/refdb.o
        CC  src/builtin-config.o
        CC  src/request.o
        CC  src/line.o
        CC  src/keys.o
$ make install
CUITLLB@Hayashi ~/gitspace/tig
$ make install
   INSTALL  src/tig -> /usr/local/bin
   INSTALL  tigrc -> /usr/local/etc

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值