Fix: Harte Pfade zu setenv.bat in Batch-Skripten entfernt

getexdraw.bat, ioconverter.bat und tr2txt.bat riefen setenv.bat über
einen fest kodierten Pfad (C:\kabellaengen\bin\setenv.bat) auf, der bei
jeder Installation per dropItem_create.bat ins Repo zurückgeschrieben
wurde. Jetzt wie in tr2dxf*.bat über %~dp0 aufgelöst, damit die
Skripte unabhängig vom Installationsort funktionieren. Der dafür
nötige PowerShell-Replace-Hack in dropItem_create.bat entfällt damit.
This commit is contained in:
2026-07-30 12:13:51 +02:00
parent 2bf3bd410c
commit 11cc91866d
4 changed files with 3 additions and 14 deletions
-11
View File
@@ -36,17 +36,6 @@ set SHORTCUT_ES=%INSTALL_DIR%\tr_dxf2ES.lnk
set TARGET_ES=%PROJECT_BIN%\tr2dxf_es.bat
set ICON_ES=%PROJECT_DOC%\img\Icons\dxfES.ico
REM ersetze die Zeile mit setenv.bat durch die mit dem neuen Pfad
powershell -Command "(Get-Content getexdraw.bat) -replace '^.*setenv.bat$', 'call %PROJECT_BIN%\setenv.bat' | Set-Content getexdraw.bat"
powershell -Command "(Get-Content ioconverter.bat) -replace '^.*setenv.bat$', 'call %PROJECT_BIN%\setenv.bat' | Set-Content ioconverter.bat"
powershell -Command "(Get-Content tr2txt.bat) -replace '^.*setenv.bat$', 'call %PROJECT_BIN%\setenv.bat' | Set-Content tr2txt.bat"
powershell -Command "(Get-Content tr2dxf_cs.bat) -replace '^.*setenv.bat$', 'call %PROJECT_BIN%\setenv.bat' | Set-Content tr2dxf_cs.bat"
powershell -Command "(Get-Content tr2dxf_en.bat) -replace '^.*setenv.bat$', 'call %PROJECT_BIN%\setenv.bat' | Set-Content tr2dxf_en.bat"
powershell -Command "(Get-Content tr2dxf_fr.bat) -replace '^.*setenv.bat$', 'call %PROJECT_BIN%\setenv.bat' | Set-Content tr2dxf_fr.bat"
powershell -Command "(Get-Content tr2dxf_it.bat) -replace '^.*setenv.bat$', 'call %PROJECT_BIN%\setenv.bat' | Set-Content tr2dxf_it.bat"
powershell -Command "(Get-Content tr2dxf_es.bat) -replace '^.*setenv.bat$', 'call %PROJECT_BIN%\setenv.bat' | Set-Content tr2dxf_es.bat"
REM Icon1 anlegen für getexdraw
powershell -Command "$s=(New-Object -COM WScript.Shell).CreateShortcut('%SHORTCUT1%');$s.TargetPath='%TARGET1%';$s.IconLocation='%ICON1%';$s.Save()"
REM Icon2 anlegen für Ioconverter
+1 -1
View File
@@ -6,7 +6,7 @@ for %%i in ("%~1") do (
set "EXT=%%~xi"
set "DIR=%%~dpi"
)
call C:\kabellaengen\bin\setenv.bat
call "%~dp0setenv.bat"
REM echo Dateiname ohne Erweiterung: %FILENAME%
REM echo Erweiterung: %EXT%
+1 -1
View File
@@ -6,7 +6,7 @@ for %%i in ("%~1") do (
set "EXT=%%~xi"
set "DIR=%%~dpi"
)
call C:\kabellaengen\bin\setenv.bat
call "%~dp0setenv.bat"
REM echo Dateiname ohne Erweiterung: %FILENAME%
REM echo Erweiterung: %EXT%
+1 -1
View File
@@ -6,7 +6,7 @@ for %%i in ("%~1") do (
set "EXT=%%~xi"
set "DIR=%%~dpi"
)
call C:\kabellaengen\bin\setenv.bat
call "%~dp0setenv.bat"
REM echo Dateiname ohne Erweiterung: %FILENAME%
REM echo Erweiterung: %EXT%