diff --git a/.gitignore b/.gitignore index 64349e7..07c9010 100644 --- a/.gitignore +++ b/.gitignore @@ -182,3 +182,4 @@ cython_debug/ # ed1337x config.ini +Run.ps1 diff --git a/src/app.py b/Program/app.py similarity index 100% rename from src/app.py rename to Program/app.py diff --git a/src/def_config.ini b/Program/def_config.ini similarity index 100% rename from src/def_config.ini rename to Program/def_config.ini diff --git a/Run.cmd b/Run.cmd new file mode 100644 index 0000000..0b8aef2 --- /dev/null +++ b/Run.cmd @@ -0,0 +1,25 @@ +@echo off +setlocal + +REM Define paths +set VENV_DIR=venv +set APP_DIR=Program +set PYTHON=%VENV_DIR%\Scripts\python.exe + +REM Check for venv +if not exist %VENV_DIR% ( + echo Creating virtual environment... + python -m venv %VENV_DIR% + echo Installing dependencies... + %PYTHON% -m pip install --upgrade pip + %PYTHON% -m pip install -r requirements.txt +) else ( + echo Virtual environment found, assuming dependencies are satisfied. +) + +REM Run the app +cd /d %~dp0%APP_DIR% +..\%VENV_DIR%\Scripts\python.exe app.py + +endlocal + diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..89a33e8 Binary files /dev/null and b/requirements.txt differ diff --git a/src/setup_venv.cmd b/src/setup_venv.cmd deleted file mode 100644 index 087af65..0000000 --- a/src/setup_venv.cmd +++ /dev/null @@ -1,13 +0,0 @@ -@echo off -REM Create Python virtual environment named "venv" -python -m venv venv - -REM Activate the virtual environment -call venv\Scripts\activate.bat - -REM Upgrade pip -python -m pip install --upgrade pip - -REM Install dependencies -pip install mutagen - diff --git a/src/setup_venv.ps1 b/src/setup_venv.ps1 deleted file mode 100644 index 97abb4c..0000000 --- a/src/setup_venv.ps1 +++ /dev/null @@ -1,12 +0,0 @@ -# Create Python virtual environment named "venv" -python -m venv venv - -# Activate the virtual environment -& .\venv\Scripts\Activate.ps1 - -# Upgrade pip -python -m pip install --upgrade pip - -# Install dependencies -pip install mutagen -