16

这可能吗?

我遇到的所有关于如何构建和使用 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 

编译!:)

4

4 回答 4

13

rebar 目录中应该有一个bootstrap.bat脚本。你不需要 cygwin 来工作,但你需要安装 Erlang 并在路径上。

于 2013-04-03T21:37:51.023 回答
2

我假设您已经安装了erlang并将其添加到您的路径中。

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

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

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

    ./bootstrap

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

很好,您可以在项目中使用钢筋。

于 2017-10-11T18:13:42.857 回答
0

您也可以从 (Windows) 命令 shell调用path\to\erlang-install\bin \escript.exe引导程序。

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

于 2015-03-09T23:56:19.543 回答
0

您可以下载并安装适用于 Windows 的 Git 然后,使用它来运行相同的确切指令:

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

一切都应该正常。

于 2017-09-04T12:52:34.280 回答