Skip to content

Commit

Permalink
add method to open in normal mode
Browse files Browse the repository at this point in the history
  • Loading branch information
PetervanLunteren authored Jan 26, 2025
1 parent 452cf7d commit a7d502a
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions open.bat
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
@REM ### Placeholder script to open EcoAssist from inside Timelapse
@REM ### This batch script is redundant since Timelapse can also open it by executing the python command directly,
@REM ### but it is still here so that it mimics the old method. In the old method we needed this batch script to
@REM ### perform some conda operations before opening the python script. With the Jan 2025 install update
@REM ### that is not neccesary anymore. But this script is still here so that Timelapse can run the same command as
@REM ### before and users don't have to update their timelapse version when using a new EcoAssist version.
@REM ### Peter van Lunteren, 16 Jan 2025 (latest edit)
@REM This script opens the EcoAssist program and allows for shortcut creation and execution from within Timelapse.
@REM Timelapse can also open it by executing the python command directly, but it is still here so that it mimics
@REM the old method. In the old method we needed this batch script to perform some conda operations before opening
@REM the python script. With the Jan 2025 install update that is not neccesary anymore. But this script is still
@REM here so that Timelapse can run the same command as before and users don't have to update their Timelapse
@REM version when using a new EcoAssist version.
@REM Peter van Lunteren, 25 Jan 2025 (latest edit)

@REM set echo settings
echo off
@setlocal EnableDelayedExpansion

@REM run script in timelapse mode
"%homedrive%%homepath%\EcoAssist_files\envs\env-base\python.exe" "%homedrive%%homepath%\EcoAssist_files\EcoAssist\EcoAssist_GUI.py" --timelapse-path=%2
@REM set paths
set "ECOASSIST_GUI=%homedrive%%homepath%\EcoAssist_files\EcoAssist\EcoAssist_GUI.py"
set "PYTHON_EXE=%homedrive%%homepath%\EcoAssist_files\envs\env-base\python.exe"

@REM run script in either timelapse or normal mode
if "%1" == "timelapse" (
%PYTHON_EXE% %ECOASSIST_GUI% --timelapse-path=%2
) else (
%PYTHON_EXE% %ECOASSIST_GUI%
)

0 comments on commit a7d502a

Please sign in to comment.