From 63003cd54fb8cd1a97239e06726387d37ff334e2 Mon Sep 17 00:00:00 2001 From: Brett Mayson Date: Fri, 18 Oct 2024 07:11:22 +0000 Subject: [PATCH] strip tmp_source --- .github/workflows/build.yaml | 4 +++- bin/src/modules/binarize/mod.rs | 10 ++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e6c13a6a..fb7aa6b9 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -123,10 +123,12 @@ jobs: if: startsWith(matrix.os.runner, 'ubuntu') run: | sudo apt-get update - sudo apt-get install -y wine64 + sudo apt-get install -y wine64 xvfb + Xvfb :99 -screen 0 1024x768x16 & - name: Run `hemtt build` on ${{ matrix.mod.repo }} env: HEMTT_BI_TOOLS: /tmp/arma3tools + DISPLAY: :99.0 run: | cd mod && hemtt build - name: Tree diff --git a/bin/src/modules/binarize/mod.rs b/bin/src/modules/binarize/mod.rs index 0c58b325..4568c60e 100644 --- a/bin/src/modules/binarize/mod.rs +++ b/bin/src/modules/binarize/mod.rs @@ -274,8 +274,14 @@ impl Module for Binarize { "-always", "-silent", "-maxProcesses=0", - &target.source.replace('/', "\\"), - &target.output.replace('/', "\\"), + &target + .source + .trim_start_matches(tmp_source.to_str().expect("path is valid utf-8")) + .replace('/', "\\"), + &target + .output + .trim_start_matches(tmp_source.to_str().expect("path is valid utf-8")) + .replace('/', "\\"), &target.entry.replace('/', "\\"), ]) .current_dir(&tmp_source);