psu_parser: A few fixes to make it run on Windows.
This commit is contained in:
parent
27b0a8c318
commit
b29b05546a
@ -21,8 +21,6 @@
|
||||
|
||||
-include("include/maps.hrl").
|
||||
|
||||
-define(NBL, "./nbl").
|
||||
|
||||
run() ->
|
||||
List = [{QuestID, parse_quest(QuestID)} || {QuestID, _} <- ?QUESTS],
|
||||
Begin = "%% This file is automatically generated by EGS.
|
||||
@ -61,12 +59,20 @@ parse_zone(NblFilename) ->
|
||||
end.
|
||||
|
||||
nbl_list_files(NblFilename) ->
|
||||
StdOut = os:cmd(io_lib:format("~s -t ~s", [?NBL, NblFilename])),
|
||||
Cmd = case os:type() of
|
||||
win32 -> lists:flatten(io_lib:format("nbl -t ~s", [NblFilename]));
|
||||
_ -> io_lib:format("./nbl -t ~s", [NblFilename])
|
||||
end,
|
||||
StdOut = os:cmd(Cmd),
|
||||
re:split(StdOut, "\n", [{return, list}]).
|
||||
|
||||
nbl_extract_files(NblFilename) ->
|
||||
filelib:ensure_dir("tmp/"),
|
||||
os:cmd(io_lib:format("~s -o tmp/ ~s", [?NBL, NblFilename])),
|
||||
Cmd = case os:type() of
|
||||
win32 -> lists:flatten(io_lib:format("nbl -o tmp/ ~s", [NblFilename]));
|
||||
_ -> io_lib:format("./nbl -o tmp/ ~s", [NblFilename])
|
||||
end,
|
||||
os:cmd(Cmd),
|
||||
ok.
|
||||
|
||||
nbl_cleanup() ->
|
||||
|
Loading…
Reference in New Issue
Block a user