For now, I suggest to move forward with approach (1)
Steps
Manually craft such script for windows (as this is your platform of development). Content would be similar to the following:
@echo off
setlocal enabledelayedexpansion
set argCount=0
for %%x in (%*) do (
set /A argCount+=1
set "argVec[!argCount!]=%%~x"
)
@set Path=C:\path\to\Qt\5.15.2\msvc2019_64\bin;%Path%
echo [%*]
if %argCount% gtr 0 (
echo "Starting %1"
%*
) else (
echo Usage: %0 \path\to\executable [argument1 [...]] 1>&2
)
Once you have the script working, add CMake/autoscoper_set_env.bat.in and replace the text @set Path=C:\path\to\Qt\5.15.2\msvc2019_64\bin;%Path% with @PATHS_CONFIG@ and add the call
Updating the environment on Linux and macOS is similar to Windows (expect the variables to set are
LD_LIBRARY_PATH
andDYLD_LIBRARY_PATH
).Considering the idea is to support the development workflow, we should avoid updating the registry as this could introduce some hard to track issues.
There are few approaches to address this:
Generate
.bat. and
.sh` scripts acting as proxy that would be used like this:Integrate commontk/AppLauncher like it is done in Slicer
Integrate the forward launcher (see kwsys/SharedForward)
For now, I suggest to move forward with approach (1)
Steps
Manually craft such script for windows (as this is your platform of development). Content would be similar to the following:
Once you have the script working, add
CMake/autoscoper_set_env.bat.in
and replace the text@set Path=C:\path\to\Qt\5.15.2\msvc2019_64\bin;%Path%
with@PATHS_CONFIG@
and add the call