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:     io:format("~s", [os:cmd("rebar generate")]),
      ok = file:set_cwd(CurDir).
  
  walk_release(Root) ->
      ReleaseRoot = filename:join([Root,"rel","dderl"]),
      case filelib:is_dir(ReleaseRoot) of
          true ->
              walk_release(filelib:wildcard("*", ReleaseRoot), ReleaseRoot);
          false -> io:format("~p is not a directory~n", [ReleaseRoot])
      end.
  walk_release([], _Dir) -> ok;
  walk_release([F|Files], Dir) ->
      case filelib:is_dir(filename:join([Dir,F])) of
          true ->
              NewDirLevel = filename:join([Dir,F]),
              FilesAtThisLevel = filelib:wildcard("*", NewDirLevel),
              walk_release(FilesAtThisLevel, NewDirLevel);
          false ->
              io:format("~s has ~s~n", [Dir, F])
      end,
      walk_release(Files, Dir).
  
  
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().
  
  