From ac6f60d01d92c81532d81dccaee95fc0780d892f Mon Sep 17 00:00:00 2001 From: Pavel Shevaev Date: Wed, 18 May 2022 13:04:03 +0300 Subject: [PATCH] Fixing build process --- bhl.inc.php | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/bhl.inc.php b/bhl.inc.php index 868da20..6d3d5dc 100644 --- a/bhl.inc.php +++ b/bhl.inc.php @@ -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); }