工具准备
如果需要将ArduBlock导入到Eclipse中,需要一下工具
- Git
- ArduBlock的源代码托管在GitHub上,可以在GitHub上找到在不同操作系统上安装Git工具的教程: https://help.github.com/set-up-git-redirect
- Eclipse
- 当然,要导入Eclipse,那么Eclipse是必需的。可以到Eclipse官网下载:http://www.eclipse.org/
- Maven
- ArduBlock是一个Java开发的工具,我们使用Maven来管理ArduBlock的依赖库。
- M2Eclipse
- 这是个可选项。如果需要开发Openblocks的话,可以在Eclipse中安装Maven的插件,可以提高开发的效率。

准备代码
ArduBlock依赖于Openblocks。所以需要下载两个项目的源代码。首先到代码管理页面下载源代码,两个项目的地址如下:
https://github.com/heqichen/ardublock.git
https://github.com/heqichen/openblocks.git
可以在页面的右侧找到代码克隆的地址。比如,两个项目的地址是 https://github.com/heqichen/ardublock.git Openblocks项目的代码克隆地址是 https://github.com/heqichen/openblocks.git
找到两个源代码克隆之地之后,需要在本机圈定一个开发目录,比如,我的开发目录是~/ardublock/。那么现在,可以打开终端/bash/命令行执行命令来下载源代码。
|
1 2 3 |
$ cd ~/ardublock/ $ git clone git@github.com:heqichen/ardublock.git $ git clone git@github.com:heqichen/openblocks.git |
46,532 total views, 6 views today