Permalink
Browse files

Windows support updated.

  • Loading branch information...
1 parent e40ce0c commit 162519282a6fc036e70055aea4583f8b3ccf29af @rambocoder rambocoder committed Apr 5, 2012
Showing with 18 additions and 6 deletions.
  1. +6 −1 README.md
  2. +5 −5 priv/rebar/boss_plugin.erl
  3. +4 −0 rebar.cmd
  4. +3 −0 start-server.bat
View
@@ -13,12 +13,17 @@ Then:
./rebar compile
./init.sh start
+In Windows:
+
+ rebar compile
+ start-server.bat
+
Then visit http://localhost:8001/
Installation with an existing CB server
---------------------------------------
-First "./rebar compile" and add the app config section to the boss.config of your existing CB server.
+First "./rebar compile" or "rebar compile" in Windows, and add the app config section to the boss.config of your existing CB server.
Add something like this to your boss.config:
View
@@ -24,9 +24,9 @@
%% @end
%%--------------------------------------------------------------------
boss(RebarConf, AppFile) ->
- {ok, BossConf} = init(RebarConf, AppFile),
case is_base_dir() of
true ->
+ {ok, BossConf} = init(RebarConf, AppFile),
Command = rebar_config:get_global(c, "help"),
case boss_rebar:run(Command, RebarConf, BossConf, AppFile) of
{error, command_not_found} ->
@@ -95,9 +95,9 @@ init(_RebarConf, AppFile) ->
%% @end
%%--------------------------------------------------------------------
pre_compile(RebarConf, AppFile) ->
- {ok, BossConf} = init(RebarConf, AppFile),
case is_base_dir() of
true ->
+ {ok, BossConf} = init(RebarConf, AppFile),
boss_rebar:run(compile, RebarConf, BossConf, AppFile),
halt(0);
false -> ok
@@ -113,9 +113,9 @@ pre_compile(RebarConf, AppFile) ->
%% @end
%%--------------------------------------------------------------------
pre_eunit(RebarConf, AppFile) ->
- {ok, BossConf} = init(RebarConf, AppFile),
case is_base_dir() of
true ->
+ {ok, BossConf} = init(RebarConf, AppFile),
boss_rebar:run(test_eunit, RebarConf, BossConf, AppFile),
halt(0);
false -> ok
@@ -128,7 +128,7 @@ pre_eunit(RebarConf, AppFile) ->
%% Checks if the current dir (rebar execution) is the base_dir
%% Used to prevent run boss tasks in deps directory
is_base_dir() ->
- rebar_utils:get_cwd() == rebar_config:get_global(base_dir, undefined).
+ filename:absname(rebar_utils:get_cwd()) =:= rebar_config:get_global(base_dir, undefined).
%% Gets the boss.config central configuration file
boss_config() ->
@@ -152,4 +152,4 @@ boss_config_value(App, Key) ->
{Key, KeyConfig} ->
KeyConfig
end
- end.
+ end.
View
@@ -0,0 +1,4 @@
+@echo off
+setlocal
+set rebarscript=%~f0
+escript.exe "%rebarscript:.cmd=%" %*
View
@@ -0,0 +1,3 @@
+@ECHO OFF
+FOR /F "tokens=*" %%i in ('"rebar.cmd boss c=start_dev_cmd ^| findstr werl"') do set myvar=%%i
+START "Erlang Window" %myvar%

0 comments on commit 1625192

Please sign in to comment.