go开发ide之liteide的安装

2018-04-22  本文已影响284人  nextliving

LiteIDE是国人开发的一款开源免费的Go语言程序开发IDE,本文纪录LiteIDE在Mac上的安装过程。

LiteIDE安装环境要求

首先,要安装Go语言及工具。安装文件及方法参见golang官网的这个页面。需要说明的是,官方的安装教程默认是安装到/usr/local/go目录,此时不需要额外设置GOROOT环境变量(具体原因参考这篇文章),只需要将path添加到.bash_profile:


export PATH=$PATH:/usr/local/go/bin

根据官方说明:


 The Go binary distributions assume they will be installed in /usr/local/go (or c:\Go under Windows), but it is possible to install the Go tools to a different location. In this case you must set the GOROOT environment variable to point to the directory in which it was installed.

如果不是安装在这个默认目录(/usr/local/go),需要另外设置GOROOT环境变量并添加PATH变量。比如把go安装到$HOME下,需要在$HOME/.bash_profile添加以下2行:


export GOROOT=$HOME/go

export PATH=$PATH:$GOROOT/bin

安装LiteIDE

二进制文件安装

首先从http://sourceforge.net/projects/liteide/files 下载二进制文件

windows

下载包文件并解压到C:/

Linux && MacOSX

下载包文件并解压到/usr/local或者$HOME

源文件安装

首先要安装qt

可以从这里https://www.qt.io/download/ 下载二进制文件安装,或者使用homebrew安装:


$ brew update

$ brew install qt

安装过程终端输出以下信息:


==> Downloading https://homebrew.bintray.com/bottles/qt-4.8.7_2.el_capitan.bottl

######################################################################## 100.0%

==> Pouring qt-4.8.7_2.el_capitan.bottle.tar.gz

==> Caveats

We agreed to the Qt opensource license for you.

If this is unacceptable you should uninstall.

Qt Designer no longer picks up changes to the QT_PLUGIN_PATH environment

variable as it was tweaked to search for plug-ins provided by formulae in

 /usr/local/lib/qt4/plugins

.app bundles were installed.

Run `brew linkapps qt` to symlink these to /Applications.

==> Summary

🍺 /usr/local/Cellar/qt/4.8.7_2: 2,815 files, 113.0M

接下来编译安装LiteIDE

依次执行以下命令:


$ git clone https://github.com/visualfc/liteide.git

$ export QTDIR=$HOME/QtSDK/Desktop/Qt/484/gcc #If QT is installed with brew, input: export QTDIR=/usr/local/Cellar/qt/4.8.7_2

$ cd liteide/build

$ ./update_pkg.sh

$ ./build_osx.sh

$ ./deploy_osx_qt4.sh

执行以上最后一行输出:


deploy liteide/LiteIDE.app

QTDIR=/usr/local/Cellar/qt/4.8.7_2

GOROOT=

BUILD_ROOT=/Users/chenxin/Documents/Work/Workspace/liteide/build

LITEIDE_ROOT=/Users/chenxin/Documents/Work/Workspace/liteide/build/../liteidex

接下来就可以启动LiteIDE了:


$ cd ..

$ cd liteidex/liteide/bin

启动LiteIDE.app即可

参考

上一篇下一篇

猜你喜欢

热点阅读