Fixing build process

This commit is contained in:
Pavel Shevaev 2022-05-18 13:04:03 +03:00
parent 0bdbdcbcf7
commit ac6f60d01d
1 changed files with 4 additions and 15 deletions

View File

@ -225,7 +225,6 @@ function bhl_run_ex($bhl_inc_dir, array $bhl_files, $result_file, $debug = true,
$postproc_sources = array(
"$GAME_ROOT/dll_src/bhl/postproc.cs",
"$GAME_ROOT/dll_src/bhl/result.cs"
);
$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_shell("run " .
bhl_shell("compile " .
"--user-sources=".implode(",",$user_sources)." --postproc-sources=".implode(",",$postproc_sources)." " .
"--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 " .
"--deterministic " .
"--threads=" . (is_win() ? 1 : 4) . " " .
@ -294,20 +293,10 @@ function bhl_handle_error_result(array $ret_out, $err_file, $exit = true)
}
$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" .
$jerr->error .
//substr($jerr->error, 0, 500) .
" \nin '$file'\n");
if($err_line !== null && $err_row !== null)
stderr(bhl_show_position($err_line, $err_row, file($file)) . "\n");
" \nin '$file', line {$jerr->line}\n");
stderr(bhl_show_position($jerr->line, $jerr->column, file($file)) . "\n");
if($exit)
exit(1);
}