Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
268 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
macOS 下安装 GMT | ||
================ | ||
|
||
macOS 下 GMT 的安装方法有很多,可以直接使用安装包,也可以使用各种软件管理工具。 | ||
|
||
使用 homebrew 安装 | ||
------------------ | ||
|
||
`Homebrew <http://brew.sh/>`_ 是 macOS 下的第三方软件包管理工具。 | ||
|
||
1. 安装 Homebrew:: | ||
|
||
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | ||
2. 安装 GMT:: | ||
|
||
$ brew update && brew upgrade | ||
$ brew tap homebrew/science | ||
$ brew install gmt | ||
|
||
3. 测试安装是否成功:: | ||
|
||
$ gmt --version | ||
5.3.1 | ||
|
||
4. 如果你想要同时安装 GMT4 和 GMT5:: | ||
|
||
$ brew unlink gmt && brew install gmt4 | ||
|
||
5. 从 GMT5 切换至 GMT4:: | ||
|
||
$ brew unlink gmt && brew link gmt4 | ||
|
||
从 GMT4 切换至 GMT5:: | ||
|
||
$ brew unlink gmt4 && brew link gmt5 | ||
|
||
.. warning:: | ||
|
||
以下几种安装方法翻译自官方文档,我们未作验证。 | ||
|
||
使用 GMT 安装包 | ||
--------------- | ||
|
||
1. 到社区主页的 `下载页面 <http://gmt-china.org/download/>`_ 下载安装包。 | ||
|
||
2. 安装完成后,在桌面会出现GMT的图标。点击该图标会启动一个终端,在终端内执行:: | ||
|
||
echo ${PATH%%:*} | ||
|
||
并将输出的目录添加到 ``~/.bashrc`` 中:: | ||
|
||
echo 'PATH=${PATH}:/path/to/gmt' >> ~/.bashrc | ||
|
||
使用 macports 安装 | ||
------------------ | ||
|
||
:: | ||
|
||
sudo port install gdal +curl +geos +hdf5 +netcdf +fftw3 +openmp | ||
sudo port install gmt5 | ||
|
||
|
||
使用fink安装 | ||
------------ | ||
|
||
:: | ||
|
||
sudo fink install gmt5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
Windows 下安装 GMT | ||
================== | ||
|
||
GMT 为 Windows 用户提供了安装包,可以直接安装使用。Windows 下需要安装 GMT、ghostscript 和 gsview。 | ||
|
||
.. warning:: | ||
|
||
从 GMT 5.2.1 开始,GMT 已经不再支持 Windows XP。 | ||
|
||
1. 下载 | ||
|
||
到社区主页的 `下载页面 <http://gmt-china.org/download/>`_ 下载所需要的安装包。 | ||
|
||
2. 安装GMT | ||
|
||
直接双击安装包即可安装,直接点击下一步,使用默认的选项即可,无须做任何修改。在“选择组件”页面,建议将四个选项都勾选上,然后点击下一步安装完成。 | ||
|
||
安装完成后,“开始”->“所有程序”->“附件”->“命令提示符”以启动cmd。在cmd窗口中执行:: | ||
|
||
C:\Users\xxxx> gmt --version | ||
5.3.1 | ||
|
||
即表示安装成功。 | ||
|
||
2. 安装ghostscript | ||
|
||
安装的过程没什么可说的,在最后一步,记得勾选“Generate cidfmap for Windows CJK TrueType fonts”。 | ||
|
||
3. 安装gsview | ||
|
||
双击直接安装即可。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.