21 lines
575 B
PowerShell
21 lines
575 B
PowerShell
$run_path = Get-Location
|
|
|
|
Push-Location C:/SWTools
|
|
|
|
if (Get-Command "./python/python.exe" -ErrorAction SilentlyContinue) {
|
|
echo "Python already installed."
|
|
} else {
|
|
if (Get-Command "./python.zip" -ErrorAction SilentlyContinue) {
|
|
} else {
|
|
curl -Uri "https://www.python.org/ftp/python/3.10.5/python-3.10.5-embed-amd64.zip" -OutFile ./python.zip
|
|
}
|
|
|
|
if (Get-Command "./python" -ErrorAction SilentlyContinue) {
|
|
Remove-Item -Recurse -ErrorAction:Stop "./python"
|
|
}
|
|
|
|
tar -xf ./python.zip
|
|
}
|
|
|
|
./python/python.exe $run_path/main.py $run_path
|