Skip to content

Commit a7d502a

Browse files
add method to open in normal mode
1 parent 452cf7d commit a7d502a

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

open.bat

+17-9
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
1-
@REM ### Placeholder script to open EcoAssist from inside Timelapse
2-
@REM ### This batch script is redundant since Timelapse can also open it by executing the python command directly,
3-
@REM ### but it is still here so that it mimics the old method. In the old method we needed this batch script to
4-
@REM ### perform some conda operations before opening the python script. With the Jan 2025 install update
5-
@REM ### that is not neccesary anymore. But this script is still here so that Timelapse can run the same command as
6-
@REM ### before and users don't have to update their timelapse version when using a new EcoAssist version.
7-
@REM ### Peter van Lunteren, 16 Jan 2025 (latest edit)
1+
@REM This script opens the EcoAssist program and allows for shortcut creation and execution from within Timelapse.
2+
@REM Timelapse can also open it by executing the python command directly, but it is still here so that it mimics
3+
@REM the old method. In the old method we needed this batch script to perform some conda operations before opening
4+
@REM the python script. With the Jan 2025 install update that is not neccesary anymore. But this script is still
5+
@REM here so that Timelapse can run the same command as before and users don't have to update their Timelapse
6+
@REM version when using a new EcoAssist version.
7+
@REM Peter van Lunteren, 25 Jan 2025 (latest edit)
88

99
@REM set echo settings
1010
echo off
1111
@setlocal EnableDelayedExpansion
1212

13-
@REM run script in timelapse mode
14-
"%homedrive%%homepath%\EcoAssist_files\envs\env-base\python.exe" "%homedrive%%homepath%\EcoAssist_files\EcoAssist\EcoAssist_GUI.py" --timelapse-path=%2
13+
@REM set paths
14+
set "ECOASSIST_GUI=%homedrive%%homepath%\EcoAssist_files\EcoAssist\EcoAssist_GUI.py"
15+
set "PYTHON_EXE=%homedrive%%homepath%\EcoAssist_files\envs\env-base\python.exe"
16+
17+
@REM run script in either timelapse or normal mode
18+
if "%1" == "timelapse" (
19+
%PYTHON_EXE% %ECOASSIST_GUI% --timelapse-path=%2
20+
) else (
21+
%PYTHON_EXE% %ECOASSIST_GUI%
22+
)

0 commit comments

Comments
 (0)