diff --git a/tools/chatgui/build.sh b/tools/chatgui/build.sh index 6bf227bc..5a1889a1 100755 --- a/tools/chatgui/build.sh +++ b/tools/chatgui/build.sh @@ -94,7 +94,18 @@ for ((i = 0; i < ${#todo[@]}; i++)); do SYSTEM_COUNT=0 FILE_COPIED=0 FILE_MISSING=0 + PARSE_STARTED=$SECONDS + log " Parsing import table: $src (awk starting)" + if import_list=$(awk '/DLL Name:/ {print $3}' <<< "$imports" 2>&1); then + log " Import table parsed: $src (elapsed=$((SECONDS - PARSE_STARTED))s, names=${#import_list} chars)" + else + RC=$? + log " ERROR: cannot parse imports for $src (exit=$RC, elapsed=$((SECONDS - PARSE_STARTED))s): $import_list" + MISSING=$((MISSING + 1)) + continue + fi while read -r dep; do + [ -z "$dep" ] && continue IMPORT_COUNT=$((IMPORT_COUNT + 1)) case "$dep" in kernel32.dll|msvcrt.dll|msvcp140.dll|vcruntime140.dll|ucrtbase.dll|\ @@ -108,9 +119,12 @@ for ((i = 0; i < ${#todo[@]}; i++)); do SYSTEM_COUNT=$((SYSTEM_COUNT + 1)) continue ;; esac + DEP_STARTED=$SECONDS + log " Resolving import $IMPORT_COUNT: $dep (checking $BUILD_DIR/$dep)" if [ ! -f "$BUILD_DIR/$dep" ]; then dep_src="" for dir in "$FFMPEG_BIN" /ucrt64/bin "$SRC_DIR/rlottie_build"; do + log " Searching: $dir/$dep" if [ -f "$dir/$dep" ]; then dep_src="$dir/$dep" break @@ -129,7 +143,8 @@ for ((i = 0; i < ${#todo[@]}; i++)); do log " OK: $dep (from $dep_src; required by $src)" fi todo+=("$BUILD_DIR/$dep") - done < <(awk '/DLL Name:/ {print $3}' <<< "$imports") + log " Dependency ready: $dep (elapsed=$((SECONDS - DEP_STARTED))s, queue entries=${#todo[@]})" + done <<< "$import_list" log " Checked: $src (elapsed=$((SECONDS - CHECK_STARTED))s, imports=$IMPORT_COUNT, system=$SYSTEM_COUNT)" log " copied=$FILE_COPIED, missing=$FILE_MISSING, pending entries=$((${#todo[@]} - i - 1))" done