繁体   English   中英

如何在Windows 8中安装,编译和使用Rebar

[英]How to install, compile, and utilize Rebar in Windows 8

这可能吗?

我遇到的关于如何构建和使用Rebar的所有教程都涉及到Unix命令,而且我是一个非常不幸的Windows用户。 如果我能帮忙的话,我真的很想避免安装Cygwin。

例如,要构建Rebar,您将获得:

$ git clone git://github.com/rebar/rebar.git
$ cd rebar
$ ./bootstrap
Recompile: src/getopt
...
Recompile: src/rebar_utils
==> rebar (compile)
Congratulations! You now have a self-contained script called "rebar" in
your current working directory. Place this script anywhere in your path
and you can use rebar to build OTP-compliant apps.

什么是windows-cmd等价物?

下面的任何链接或教程提供有关如何在Windows shell中使用钢筋的分步说明将非常感激。

更新:

手动下载并将Rebar解压缩到我的目录后,位于:C:\\ erlang \\ rebar

我转到windows shell并输入:

SET PATH=C:\Program Files\erl5.10.1\bin

这是位于包含erlang.exe的目录内的'bin'文件夹

接下来我输入:

C:\erlang\rebar>bootstrap.bat 

编译了! :)

rebar目录中应该有一个bootstrap.bat脚本。 你不需要使用cygwin就可以了,但是你需要安装Erlang并且在路径上。

我假设你已经有了erlang,并添加到你的路径中。

你可以下载Git并安装它。 然后打开git bash并输入

  • git clone https://github.com/rebar/rebar.git

  • 一旦将其克隆到您想要的位置,您就可以通过进入rebar目录来运行命令。

    ./bootstrap

  • 现在它可以正常工作并告诉您在当前工作目录中编译了rebar文件。

很高兴您可以使用钢筋为您的项目。

您也可以从(Windows)命令shell调用path \\ to \\ erlang-install \\ bin \\ escript.exe bootstrap

bootstrap只是一个e(rlang)脚本。

您可以下载并安装Git for Windows然后,使用它来运行相同的确切说明:

git clone git://github.com/rebar/rebar.git
cd rebar
./bootstrap

一切都应该工作正常。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM