Fixing build process
This commit is contained in:
parent
0bdbdcbcf7
commit
ac6f60d01d
19
bhl.inc.php
19
bhl.inc.php
|
@ -225,7 +225,6 @@ function bhl_run_ex($bhl_inc_dir, array $bhl_files, $result_file, $debug = true,
|
||||||
|
|
||||||
$postproc_sources = array(
|
$postproc_sources = array(
|
||||||
"$GAME_ROOT/dll_src/bhl/postproc.cs",
|
"$GAME_ROOT/dll_src/bhl/postproc.cs",
|
||||||
"$GAME_ROOT/dll_src/bhl/result.cs"
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$bhl_deps = $bhl_files;
|
$bhl_deps = $bhl_files;
|
||||||
|
@ -245,10 +244,10 @@ function bhl_run_ex($bhl_inc_dir, array $bhl_files, $result_file, $debug = true,
|
||||||
|
|
||||||
$bhl_dir = bhl_dir();
|
$bhl_dir = bhl_dir();
|
||||||
|
|
||||||
bhl_shell("run " .
|
bhl_shell("compile " .
|
||||||
"--user-sources=".implode(",",$user_sources)." --postproc-sources=".implode(",",$postproc_sources)." " .
|
"--user-sources=".implode(",",$user_sources)." --postproc-sources=".implode(",",$postproc_sources)." " .
|
||||||
"--dir=$bhl_inc_dir --files=$bhl_file_list --result=$result_file " .
|
"--dir=$bhl_inc_dir --files=$bhl_file_list --result=$result_file " .
|
||||||
"--cache_dir=$GAME_ROOT/build/bhl/ " .
|
"--tmp-dir=$GAME_ROOT/build/bhl/ " .
|
||||||
"--error=$GAME_ROOT/build/bhl.error " .
|
"--error=$GAME_ROOT/build/bhl.error " .
|
||||||
"--deterministic " .
|
"--deterministic " .
|
||||||
"--threads=" . (is_win() ? 1 : 4) . " " .
|
"--threads=" . (is_win() ? 1 : 4) . " " .
|
||||||
|
@ -294,20 +293,10 @@ function bhl_handle_error_result(array $ret_out, $err_file, $exit = true)
|
||||||
}
|
}
|
||||||
$file = $jerr->file;
|
$file = $jerr->file;
|
||||||
|
|
||||||
$err_line = null;
|
|
||||||
$err_row = null;
|
|
||||||
if(preg_match('~@\((\d+),(\d+)\)~', $jerr->error, $merr))
|
|
||||||
{
|
|
||||||
$err_line = (int)$merr[1];
|
|
||||||
$err_row = (int)$merr[2];
|
|
||||||
}
|
|
||||||
|
|
||||||
stderr("BHL ERROR: \n" .
|
stderr("BHL ERROR: \n" .
|
||||||
$jerr->error .
|
$jerr->error .
|
||||||
//substr($jerr->error, 0, 500) .
|
" \nin '$file', line {$jerr->line}\n");
|
||||||
" \nin '$file'\n");
|
stderr(bhl_show_position($jerr->line, $jerr->column, file($file)) . "\n");
|
||||||
if($err_line !== null && $err_row !== null)
|
|
||||||
stderr(bhl_show_position($err_line, $err_row, file($file)) . "\n");
|
|
||||||
if($exit)
|
if($exit)
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue