Skip to content

Commit 99c699c

Browse files
committed
fix(prefix,apps): restore _ensure_cacerts; add 600s install timeout; expand DXVK log filter
prefix.sh: _ensure_cacerts was dropped in the user cleanup (commit 44a8d08) but apps.sh still calls it at line 103. Restored stamp-file-guarded cacerts installation using Proton's wine64 binary. apps.sh: add timeout 600 (10 min) before proton run to prevent indefinite stall when a GUI installer fails to exit normally — the process is killed after the timeout and install_app continues. apps.sh awk filter: extend to also collapse DXVK info:/warn: lines and GnuTLS/ProtonFixes messages that come from launchers self-starting after installation (e.g. GOG Galaxy starting up mid-install). These account for thousands of lines of noise in the install output.
1 parent 3035ecc commit 99c699c

2 files changed

Lines changed: 28 additions & 2 deletions

File tree

lib/apps.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,15 @@ install_app() {
9191
;;
9292
esac
9393

94-
"$PROTON_DIR/proton" run "${run_cmd[@]}" 2>&1 \
94+
# timeout prevents indefinite stall if a GUI installer fails to close.
95+
timeout 600 "$PROTON_DIR/proton" run "${run_cmd[@]}" 2>&1 \
9596
| awk '/MonoBtlsPkcs12\.Import|Missing private key/ { c++; next }
97+
/^info: |^warn: |^GnuTLS error:|^ProtonFixes\[/ { dxvk++; next }
9698
{ print }
97-
END { if (c+0>0) printf "[WARN] %d Mono TLS cert exceptions suppressed (run: wig init to install cacerts)\n", c }' \
99+
END {
100+
if (c+0>0) printf "[WARN] %d Mono TLS cert exceptions suppressed\n", c
101+
if (dxvk+0>0) printf "[note] %d DXVK/Proton diagnostic lines suppressed\n", dxvk
102+
}' \
98103
| tee "$install_log" || true
99104

100105
if find_app_exe "$app_key" >/dev/null 2>&1; then

lib/prefix.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,27 @@ _install_winetricks_verbs() {
8484
)
8585
}
8686

87+
# Install CA root certs exactly once via winetricks; stamp prevents re-running.
88+
_ensure_cacerts() {
89+
local _stamp="$WINEPREFIX/pfx/.wg-cacerts"
90+
[ -f "$_stamp" ] && return 0
91+
[ ! -d "$WINEPREFIX/pfx/drive_c/windows/system32" ] && return 0
92+
command -v winetricks &>/dev/null || return 0
93+
print_info "Installing CA certificates (first run — enables HTTPS in launchers)..."
94+
local _wine_bin="wine" _wt_prefix="$WINEPREFIX/pfx" _c
95+
for _c in "$PROTON_DIR/files/bin/wine64" "$PROTON_DIR/files/bin/wine"; do
96+
[ -x "$_c" ] && { _wine_bin="$_c"; break; }
97+
done
98+
(
99+
export WINE="$_wine_bin"
100+
export WINESERVER="$(dirname "$_wine_bin")/wineserver"
101+
export WINEPREFIX="$_wt_prefix"
102+
[ -d "$PROTON_DIR/files/lib64" ] && \
103+
export LD_LIBRARY_PATH="$PROTON_DIR/files/lib:$PROTON_DIR/files/lib64${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
104+
WINETRICKS_LATEST_VERSION_CHECK=disabled winetricks -q --force cacerts >/dev/null 2>&1
105+
) && touch "$_stamp" \
106+
|| print_warning "cacerts failed — HTTPS downloads may fail; run: wig init"
107+
}
87108
# Print the managed prefix paths and env-var exports for manual use.
88109
prefix_info() {
89110
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"

0 commit comments

Comments
 (0)