From dae74da39ec16c0abffbfd8eaef1bc3b8761371f Mon Sep 17 00:00:00 2001 From: Frank Conrads Date: Wed, 17 Jun 2026 11:12:56 +0200 Subject: [PATCH] corrected bat files for building dist --- templates/dragdrop.tpl.bat | 13 ++++++++----- templates/run.tpl.bat | 3 +-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/templates/dragdrop.tpl.bat b/templates/dragdrop.tpl.bat index 56c78d7..e12ac41 100644 --- a/templates/dragdrop.tpl.bat +++ b/templates/dragdrop.tpl.bat @@ -5,6 +5,7 @@ if "%~1"=="" goto help set "INPUT=%~1" set "EXT=%~x1" +set "PATH=%PATH%;%~dp0" if /I not "%EXT%"==".pptx" ( echo [ERROR] Only .pptx supported @@ -12,18 +13,20 @@ if /I not "%EXT%"==".pptx" ( exit /b 1 ) -set "OUT=%~dp1%~n1_compressed.pptx" - echo [INFO] Compressing %~n1 -"%~dp0pptx-image-compress.exe" -i "%INPUT%" -o "%OUT%" +rem optional: ensure correct working dir +pushd "%~dp0" + +"%~dp0pptx-image-compress.exe" -i "%INPUT%" set RC=%ERRORLEVEL% +popd + if %RC% neq 0 ( echo [ERROR] Failed (%RC%) ) else ( echo [SUCCESS] Done - echo Output: "%OUT%" ) pause @@ -33,4 +36,4 @@ exit /b %RC% echo. echo Drag ^& Drop a .pptx file onto this script echo. -pause \ No newline at end of file +pause diff --git a/templates/run.tpl.bat b/templates/run.tpl.bat index bb3f840..6412d52 100644 --- a/templates/run.tpl.bat +++ b/templates/run.tpl.bat @@ -5,5 +5,4 @@ if "%~1"=="" ( "%~dp0pptx-image-compress.exe" -h ) else ( "%~dp0pptx-image-compress.exe" %* -) -`` \ No newline at end of file +) \ No newline at end of file