How to install, compile, and utilize Rebar in Windows 8
Asked Answered
B

4

16

Is this possible?

All tutorials I've come across on how to build and use Rebar involve Unix commands, and I'm a most unfortunate Windows user. I'd really like to avoid installing Cygwin if I can help it.

For example, to build Rebar you get:

$ 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.

What is the windows-cmd equivalent?

Any links or tutorial below to offer step by step instructions on how to utilize rebar in windows shell would be greatly appreciated.

UPDATE:

After manually downloading and extracting Rebar to my directory located at: C:\erlang\rebar

I go to the windows shell and enter:

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

This is the 'bin' folder located inside the directory holding erlang.exe

Next I enter:

C:\erlang\rebar>bootstrap.bat 

Compiled! :)

Brython answered 3/4, 2013 at 19:27 Comment(0)
I
13

There should be a bootstrap.bat script in the rebar directory. You don't need cygwin for this to work, but you will need Erlang installed and on the path.

Industrials answered 3/4, 2013 at 21:37 Comment(1)
You do, however, need everything to compile the rebar dependencies. Bootstrap will only give you the rebar script - which will then fetch and try to compile (often linux) dependencies. This is where I got stuck. sighWomanize
F
2

I assume you have erlang istalled already and added to your path.

You can just download the Git and install it. Then open the git bash and type

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

  • once cloned it to your desired location then you can run the command by going inside the rebar directory.

    ./bootstrap

  • Now it will work just fine and tell you that you have the rebar file compiled in your current working directory.

Nice you are good to go with using rebar for your project.

Flitter answered 11/10, 2017 at 18:13 Comment(1)
This wasn't even an option -- or an otherwise unknown option -- when I asked this question in 2013... Good to know!Brython
H
0

You can also just invoke path\to\erlang-install\bin\escript.exe bootstrap from a (Windows) command shell.

bootstrap is just an e(rlang) script.

Hanger answered 9/3, 2015 at 23:56 Comment(0)
Y
0

You can download and install Git for Windows Then, use it to run the same exact instructions:

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

and everything should work fine.

Yacov answered 4/9, 2017 at 12:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.