在Windows上使用Cygwin源码安装tig

喜欢ヅ旅行 2022-01-21 06:05 492阅读 0赞

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

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

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

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

cd git

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

在线安装一些必须包【 git, gcc-core, make, libiconv-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

举例:

  1. apt-cyg install libiconv-devel
  2. Installing libiconv-devel
  3. --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
  4. 正在解析主机 mirrors.ustc.edu.cn (mirrors.ustc.edu.cn)... 202.141.176.110, 202.38.95.110, 2001:da8:d800:95::110
  5. 正在连接 mirrors.ustc.edu.cn (mirrors.ustc.edu.cn)|202.141.176.110|:80... 已连接。
  6. 已发出 HTTP 请求,正在等待回应... 200 OK
  7. 长度:682524 (667K) [application/octet-stream]
  8. 正在保存至: libiconv-devel-1.14-3.tar.xz
  9. libiconv-devel-1.14-3.tar.xz 100%[=======================================================================>] 666.53K 647KB/s 用时 1.0s

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

  1. CUITLLB@Hayashi ~/gitspace/tig
  2. $ make configure
  3. GEN configure

然后安装:

  1. $ ./configure
  2. CUITLLB@Hayashi ~/gitspace/tig
  3. $ ./configure
  4. checking for gcc... gcc
  5. checking whether the C compiler works... yes
  6. checking for C compiler default output file name... a.exe
  7. checking for suffix of executables... .exe
  8. checking whether we are cross compiling... no
  9. checking for suffix of object files... o
  10. checking whether we are using the GNU C compiler... yes
  11. checking whether gcc accepts -g... yes
  12. checking for gcc option to accept ISO C89... none needed
  13. $ make
  14. CUITLLB@Hayashi ~/gitspace/tig
  15. $ make
  16. CC src/tig.o
  17. CC src/types.o
  18. CC src/string.o
  19. CC src/util.o
  20. CC src/map.o
  21. CC src/argv.o
  22. CC src/io.o
  23. CC src/refdb.o
  24. CC src/builtin-config.o
  25. CC src/request.o
  26. CC src/line.o
  27. CC src/keys.o
  28. $ make install
  29. CUITLLB@Hayashi ~/gitspace/tig
  30. $ make install
  31. INSTALL src/tig -> /usr/local/bin
  32. INSTALL tigrc -> /usr/local/etc

发表评论

表情:
评论列表 (有 0 条评论,492人围观)

还没有评论,来说两句吧...

相关阅读

    相关 WindowsCygwin安装

    1.Cygwin安装 在我安装之前,本以为一个简单的软件安装流程,结果碰到了各种坑,还是写个教程吧,给自己和大家一个借鉴。 Cygwin下载网址(windows请选择s