From bded916851f3365b0a8ce9adf82fda219accfc26 Mon Sep 17 00:00:00 2001 From: Yannik Schmidt Date: Sun, 12 May 2024 21:12:22 +0200 Subject: [PATCH] feat: install ps1 script --- dist/run.ps1 | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 dist/run.ps1 diff --git a/dist/run.ps1 b/dist/run.ps1 new file mode 100644 index 0000000..0b0325d --- /dev/null +++ b/dist/run.ps1 @@ -0,0 +1,26 @@ +# Check if Python is installed +$pythonInstalled = Get-Command python -ErrorAction SilentlyContinue + +if (-not $pythonInstalled) { + Write-Host "Python is not installed. Please install Python before running this script." -ForegroundColor Red + pause + exit 1 +} + +# install dependencies +Start-Process python -ArgumentList "-m", "pip", "install", "-r", $requirementsFilePath -Wait + +# Get the directory of the script +$scriptDirectory = Split-Path -Parent $MyInvocation.MyCommand.Path + +# Check if client.exe exists in the script directory +$clientExePath = Join-Path -Path $scriptDirectory -ChildPath "client.exe" + +if (-not (Test-Path $clientExePath)) { + Write-Host "client.exe not found in the script directory." -ForegroundColor Red + pause + exit 1 +} + +# Execute client.exe +Start-Process $clientExePath \ No newline at end of file