anchor.diff:      halt(1).
   
   uuid() ->
  -    re:replace(os:cmd("uuidgen.exe")
  -              , "\r\n", "", [{return, binary}]).
  +    string:to_upper(re:replace(os:cmd("uuidgen.exe")
  +              , "\r\n", "", [{return, list}])).
   
   get_paths() ->
       case lists:reverse(filename:split(
  
positive.code: 
  make_soft_links(AppPath) ->
      [begin
          Cmd = lists:flatten(io_lib:format("mklink /D ~p ~p", [Link, Target])),
          io:format("~s~n~s~n", [Cmd, os:cmd(Cmd)])
       end
      || {Link, Target} <- [ {filename:join([AppPath, "src"]), "..\\..\\src"}
                            , {filename:join([AppPath, "priv"]), "..\\..\\priv"}]].
  
  rebar_generate(Root) ->
      {ok, CurDir} = file:get_cwd(),
  
negative.code: #!/usr/bin/env escript
  %% -*- erlang -*-
  %%! -smp enable -sname build_msi -mnesia debug verbose
  
  -define(PRODUCT_GUID, "80D1D993-AAAD-4F38-A5EE-84428476E69F").
  -define(UPGRADE_GUID, "C20627C5-BE87-471D-BC11-3F63E6BF09B8").
  -define(COMPANY, "K2 Informatics GmbH").
  -define(PRODUCT, "DDErl").
  -define(VERSION, "1.0.7").
  -define(PKG_COMMENT, "DDErl is a registered trademark of"
                       " K2 Informatics GmbH").
  -define(WXSFILE, "dderl.wxs").
  -define(WIXOBJFILE, "dderl.wixobj").
  -define(TAB, "dderlids").
  -define(TABFILE, "dderlids.dets").
  
  main([]) ->
      {Root, AppPath} = get_paths(),
      io:format("UUID ~s Root ~p AppPath ~p~n", [uuid(), Root, AppPath]),
      %make_soft_links(AppPath),
      %rebar_generate(Root),
      {ok, ?TAB} = dets:open_file(?TAB, [{ram_file, true}]),
      create_wxs(Root),
      true = dets:delete(?TAB);
  main(_) ->
      usage().
  
  