diff --git a/launch.bat b/launch.bat new file mode 100644 index 0000000..277e8fe --- /dev/null +++ b/launch.bat @@ -0,0 +1,15 @@ +@echo off +echo Starting Python Learning App... +echo Syncing dependencies... +call uv sync --group dev +if %errorlevel% neq 0 ( + echo Error syncing dependencies. Make sure 'uv' is installed. + pause + goto :eof +) + +echo Launching app... +call uv run python-learning session +if %errorlevel% neq 0 ( + pause +) diff --git a/launch.ps1 b/launch.ps1 new file mode 100644 index 0000000..9efb393 --- /dev/null +++ b/launch.ps1 @@ -0,0 +1,20 @@ +Write-Host "Starting Python Learning App..." -ForegroundColor Cyan + +Write-Host "Syncing dependencies..." -ForegroundColor Yellow +try { + uv sync --group dev + if ($LASTEXITCODE -ne 0) { + throw "uv sync failed with exit code $LASTEXITCODE" + } +} catch { + Write-Host "Error syncing dependencies. Make sure 'uv' is installed." -ForegroundColor Red + Write-Host $_.Exception.Message -ForegroundColor Red + Read-Host "Press Enter to quit..." + return +} + +Write-Host "Launching app..." -ForegroundColor Green +uv run python-learning session +if ($LASTEXITCODE -ne 0) { + Read-Host "Press Enter to quit..." +} diff --git a/launch.sh b/launch.sh new file mode 100755 index 0000000..89f271c --- /dev/null +++ b/launch.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +# Text formatting +CYAN="\033[0;36m" +YELLOW="\033[1;33m" +GREEN="\033[0;32m" +RED="\033[0;31m" +NC="\033[0m" # No Color + +echo -e "${CYAN}Starting Python Learning App...${NC}" + +echo -e "${YELLOW}Syncing dependencies...${NC}" +if ! uv sync --group dev; then + echo -e "${RED}Error syncing dependencies. Make sure 'uv' is installed.${NC}" + read -p "Press Enter to quit..." + kill -INT $$ +fi + +echo -e "${GREEN}Launching app...${NC}" +if ! uv run python-learning session; then + read -p "Press Enter to quit..." + kill -INT $$ +fi