@@ -196,13 +196,15 @@ ACTION_IF ~%SYSTEM_ARCH%~ STR_EQ ~amd64~ BEGIN
196196 OUTER_SPRINT arch_var ~x86_64%os_slash%~
197197END
198198PRINT ~arch_var = %arch_var%~
199+
199200ACTION_FOR_EACH file IN lua weidu BEGIN
200201 ACTION_IF FILE_EXISTS ~%MOD_FOLDER%/bin/%WEIDU_OS%/%arch_var%%file%%exe%~ BEGIN
201202 OUTER_SPRINT EVAL ~%file%~ ~%bin%%MOD_FOLDER%%os_slash%bin%os_slash%%WEIDU_OS%%os_slash%%arch_var%%file%%exe%~
202203 END ELSE ACTION_IF (NOT ~%arch_var%~ STR_EQ ~~) AND (FILE_EXISTS ~%MOD_FOLDER%/bin/%WEIDU_OS%/%file%%exe%~) BEGIN
203204 OUTER_SPRINT EVAL ~%file%~ ~%bin%%MOD_FOLDER%%os_slash%bin%os_slash%%WEIDU_OS%%os_slash%%file%%exe%~
204205 END ELSE BEGIN
205- FAIL ~%file% not found~
206+ OUTER_SPRINT shell_cmd ~which %file%~
207+ OUTER_SPRINT EVAL ~%file%~ ~%shell_cmd%~
206208 END
207209 OUTER_SPRINT tool EVAL ~%%file%%~
208210 ACTION_IF NOT ~%WEIDU_OS%~ STR_EQ ~win32~ BEGIN
@@ -270,13 +272,13 @@ ACTION_IF NOT ~%log%~ STR_EQ ~~ BEGIN
270272 APPEND_OUTER + ~%MOD_FOLDER%/temp/append.tra~ ~%log%~
271273END
272274
273- OUTER_SPRINT shell_cmd ~% weidu% --noautoupdate --no-auto-tp2 --logapp --log "%MOD_FOLDER%/temp/bash.debug" --game "%bgee_dir%" --use-lang "%LANGUAGE_BG1%" --traify# 200000 --traify-tlk --out "%MOD_FOLDER%/temp/bgee.tra"~
275+ OUTER_SPRINT shell_cmd ~weidu --noautoupdate --no-auto-tp2 --logapp --log "%MOD_FOLDER%/temp/bash.debug" --game "%bgee_dir%" --use-lang "%LANGUAGE_BG1%" --traify# 200000 --traify-tlk --out "%MOD_FOLDER%/temp/bgee.tra"~
274276AT_NOW ret_val ~%shell_cmd%~
275277ACTION_IF (ret_val != 0) BEGIN
276278 WARN ~Shell command failed to execute: %shell_cmd%~
277279END
278280
279- OUTER_SPRINT shell_cmd ~% lua% %MOD_FOLDER%/lib/tlk_cnt.lua~
281+ OUTER_SPRINT shell_cmd ~lua %MOD_FOLDER%/lib/tlk_cnt.lua~
280282AT_NOW ret_val ~%shell_cmd%~
281283ACTION_IF (ret_val != 0) BEGIN
282284 WARN ~Shell command failed to execute: %shell_cmd%~
@@ -285,7 +287,7 @@ COPY + ~%MOD_FOLDER%/temp/tlk_cnt.txt~ ~%MOD_FOLDER%/temp~
285287 READ_LONG 0xa "tlk_end"
286288 SET tlk_end = tlk_end + 200000 - 1
287289
288- OUTER_SPRINT shell_cmd ~% lua% %MOD_FOLDER%/lib/tra_merge.lua~
290+ OUTER_SPRINT shell_cmd ~lua %MOD_FOLDER%/lib/tra_merge.lua~
289291AT_NOW ret_val ~%shell_cmd%~
290292ACTION_IF (ret_val != 0) BEGIN
291293 WARN ~Shell command failed to execute: %shell_cmd%~
@@ -309,7 +311,7 @@ ACTION_FOR_EACH var IN are bcs chr cre dlg eff ini itm pro spl sto vef vvc wed B
309311 PRINT ~~
310312 PRINT ~Preparing %var% files...~
311313 MKDIR ~%patch_dir%/%var%~
312- OUTER_SPRINT shell_cmd ~% weidu% --noautoupdate --no-auto-tp2 --logapp --log "%MOD_FOLDER%/temp/bash.debug" --game "%bgee_dir%" --use-lang "%LANGUAGE_BG1%" --out "%patch_dir%/%var%" --biff-get-rest "^.*\.%var%$"~
314+ OUTER_SPRINT shell_cmd ~weidu --noautoupdate --no-auto-tp2 --logapp --log "%MOD_FOLDER%/temp/bash.debug" --game "%bgee_dir%" --use-lang "%LANGUAGE_BG1%" --out "%patch_dir%/%var%" --biff-get-rest "^.*\.%var%$"~
313315 AT_NOW ret_val ~%shell_cmd%~
314316 LAM bash_log
315317 ACTION_IF (ret_val != 0) BEGIN
@@ -329,7 +331,7 @@ ACTION_FOR_EACH file IN baldur.gam worldmap.wmp bgmap.wmp sodmap.wmp BEGIN
329331 ACTION_IF (FILE_EXISTS ~%bgee_dir%/override/%file%~) BEGIN
330332 COPY_LARGE + ~%bgee_dir%/override/%file%~ ~%patch_dir%~
331333 END ELSE BEGIN
332- OUTER_SPRINT shell_cmd ~% weidu% --noautoupdate --no-auto-tp2 --logapp --log "%MOD_FOLDER%/temp/bash.debug" --game "%bgee_dir%" --use-lang "%LANGUAGE_BG1%" --out "%patch_dir%" --biff-get-rest "%file%"~
334+ OUTER_SPRINT shell_cmd ~weidu --noautoupdate --no-auto-tp2 --logapp --log "%MOD_FOLDER%/temp/bash.debug" --game "%bgee_dir%" --use-lang "%LANGUAGE_BG1%" --out "%patch_dir%" --biff-get-rest "%file%"~
333335 AT_NOW ret_val ~%shell_cmd%~
334336 LAM bash_log
335337 ACTION_IF (ret_val != 0) BEGIN
356358ACTION_FOR_EACH var IN bam bmp mos tis pvrz BEGIN
357359 PRINT ~~
358360 PRINT ~Preparing %var% files...~
359- OUTER_SPRINT shell_cmd ~% weidu% --noautoupdate --no-auto-tp2 --logapp --log "%MOD_FOLDER%/temp/bash.debug" --game "%bgee_dir%" --use-lang "%LANGUAGE_BG1%" --out "%MOD_FOLDER%%os_slash%temp%os_slash%biff" --biff-get-rest "^.*\.%var%$"~
361+ OUTER_SPRINT shell_cmd ~weidu --noautoupdate --no-auto-tp2 --logapp --log "%MOD_FOLDER%/temp/bash.debug" --game "%bgee_dir%" --use-lang "%LANGUAGE_BG1%" --out "%MOD_FOLDER%%os_slash%temp%os_slash%biff" --biff-get-rest "^.*\.%var%$"~
360362 AT_NOW ret_val ~%shell_cmd%~
361363 LAM bash_log
362364 ACTION_IF (ret_val != 0) BEGIN
@@ -376,7 +378,7 @@ ACTION_FOR_EACH var IN 2da /*plt*/ ttf wav wbm wfx BEGIN
376378 PRINT ~~
377379 PRINT ~Preparing %var% files...~
378380 MKDIR ~%MOD_FOLDER%/temp/%var%~
379- OUTER_SPRINT shell_cmd ~% weidu% --noautoupdate --no-auto-tp2 --logapp --log "%MOD_FOLDER%/temp/bash.debug" --game "%bgee_dir%" --use-lang "%LANGUAGE_BG1%" --out "%MOD_FOLDER%/temp/%var%" --biff-get-rest "^.*\.%var%$"~
381+ OUTER_SPRINT shell_cmd ~weidu --noautoupdate --no-auto-tp2 --logapp --log "%MOD_FOLDER%/temp/bash.debug" --game "%bgee_dir%" --use-lang "%LANGUAGE_BG1%" --out "%MOD_FOLDER%/temp/%var%" --biff-get-rest "^.*\.%var%$"~
380382 AT_NOW ret_val ~%shell_cmd%~
381383 LAM bash_log
382384 ACTION_IF (ret_val != 0) BEGIN
@@ -396,7 +398,7 @@ ACTION_FOR_EACH file IN animate.ids anisnd.ids class.ids ea.ids gtimes.ids kit.i
396398 ACTION_IF (FILE_EXISTS ~%bgee_dir%/override/%file%~) BEGIN
397399 COPY_LARGE + ~%bgee_dir%/override/%file%~ ~%MOD_FOLDER%/temp/array~
398400 END ELSE BEGIN
399- OUTER_SPRINT shell_cmd ~% weidu% --noautoupdate --no-auto-tp2 --logapp --log "%MOD_FOLDER%/temp/bash.debug" --game "%bgee_dir%" --use-lang "%LANGUAGE_BG1%" --out "%MOD_FOLDER%/temp/array" --biff-get-rest "%file%"~
401+ OUTER_SPRINT shell_cmd ~weidu --noautoupdate --no-auto-tp2 --logapp --log "%MOD_FOLDER%/temp/bash.debug" --game "%bgee_dir%" --use-lang "%LANGUAGE_BG1%" --out "%MOD_FOLDER%/temp/array" --biff-get-rest "%file%"~
400402 AT_NOW ret_val ~%shell_cmd%~
401403 LAM bash_log
402404 ACTION_IF (ret_val != 0) BEGIN
@@ -1215,7 +1217,7 @@ APPEND_OUTER + ~%MOD_FOLDER%/temp/tables.lua~ ~%tbl_lua%~
12151217OUTER_SPRINT tbl_lua ~~
12161218
12171219//LUA regexp conversion
1218- OUTER_SPRINT shell_cmd ~% lua% %MOD_FOLDER%/lib/main.lua~
1220+ OUTER_SPRINT shell_cmd ~lua %MOD_FOLDER%/lib/main.lua~
12191221AT_NOW ret_val ~%shell_cmd%~
12201222LAM bash_log
12211223ACTION_IF (ret_val != 0) BEGIN
@@ -2772,8 +2774,6 @@ ACTION_FOR_EACH file IN EET_end EET_gui BEGIN
27722774 ACTION_IF ~%WEIDU_OS%~ STR_EQ ~osx~ BEGIN
27732775 COPY ~setup-EET.command~ ~setup-%file%.command~
27742776 REPLACE_TEXTUALLY ~EET/EET.tp2 --log SETUP-EET.DEBUG~ ~%file%/%file%.tp2 --log SETUP-%file%.DEBUG~
2775- END ELSE BEGIN
2776- COPY ~%weidu%~ ~setup-%file%%exe%~
27772777 END
27782778END
27792779
0 commit comments