windows fixes

This commit is contained in:
Joey Eamigh
2023-06-21 20:34:44 -04:00
parent be1db9d555
commit 7682582364
3 changed files with 65 additions and 33 deletions

View File

@@ -14,7 +14,7 @@ if (-not (Get-Command "python" -ErrorAction SilentlyContinue)) {
if ($winget) {
Write-Host "Attempting to install python."
winget install --id=Python.Python.3.11 -e
(winget install --id=Python.Python.3.11 -e) | Out-Null
}
else {
Write-Host "Please install python to continue." -Foreground Red
@@ -23,12 +23,12 @@ if (-not (Get-Command "python" -ErrorAction SilentlyContinue)) {
}
# Check that java is installed
if (-not (Get-Command "java" -ErrorAction SilentlyContinue)) {
if (-not (Get-Command "C:\Program Files\AdoptOpenJDK\jdk-11.0.11.9-hotspot\bin\java" -ErrorAction SilentlyContinue)) {
Write-Host "Error: java is not installed." -Foreground Red
if ($winget) {
Write-Host "Attempting to install java."
winget install AdoptOpenJDK.OpenJDK.11
(winget install AdoptOpenJDK.OpenJDK.11) | Out-Null
}
else {
Write-Host "Please install java to continue." -Foreground Red
@@ -39,7 +39,7 @@ if (-not (Get-Command "java" -ErrorAction SilentlyContinue)) {
if (Test-Path ".venv") { } else { python -m venv .venv }
. ./.venv/bin/Activate.ps1
. .\.venv\Scripts\Activate.ps1
(python -m pip install --upgrade pip) | Out-Null
(python -m pip install -r requirements.txt) | Out-Null