-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
83 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# This script assumes you have PowerShell and that execution of scripts is enabled. | ||
# You can enable script execution by running PowerShell as Administrator and typing: | ||
# Set-ExecutionPolicy RemoteSigned | ||
|
||
# Remove the python alias in Windows | ||
Remove-Item $env:LOCALAPPDATA\Microsoft\WindowsApps\python.exe | ||
Remove-Item $env:LOCALAPPDATA\Microsoft\WindowsApps\python3.exe | ||
|
||
|
||
# Install Python | ||
# Define the download URL | ||
$downloadUrl = "https://github.com/winpython/winpython/releases/download/6.1.20230527/Winpython64-3.10.11.1.exe" | ||
|
||
# Define the output path | ||
$outputPath = ".\Winpython64-3.10.11.1.exe" | ||
|
||
# Use WebClient to download WinPython | ||
$webClient = New-Object System.Net.WebClient | ||
$webClient.DownloadFile($downloadUrl, $outputPath) | ||
|
||
# Run the installer non-interactively (silent install) | ||
Start-Process -FilePath $outputPath -ArgumentList "-y" -Wait -NoNewWindow | ||
|
||
# Define the path to the portable Python | ||
$pythonPortablePath = "$(Get-Location)\WPy64-310111\" | ||
|
||
# Add the new directory to the current PATH | ||
$env:PATH += ";$pythonPortablePath;$pythonPortablePath\python-3.10.11.amd64\Scripts;" | ||
|
||
# Verify that the directory has been added | ||
Write-Host "Current PATH: $env:PATH" | ||
|
||
# Setup virtual environment | ||
& "python.exe" -m venv .venv | ||
|
||
& ".venv\Scripts\activate" | ||
|
||
|
||
# Install Node, required for browser automation | ||
# Define the download URL | ||
$nodeDownloadUrl = "https://nodejs.org/dist/v14.18.1/node-v14.18.1-win-x64.zip" | ||
|
||
# Define the output path | ||
$outputPath = ".\node.zip" | ||
|
||
# Use WebClient to download Node.js | ||
$webClient = New-Object System.Net.WebClient | ||
$webClient.DownloadFile($nodeDownloadUrl, $outputPath) | ||
|
||
# Extract Node.js to a portable location | ||
$extractPath = ".\node" | ||
Expand-Archive -Path $outputPath -DestinationPath $extractPath | ||
|
||
# Add Node.js to the PATH | ||
$env:PATH += ";$(Get-Location)\node\node-v14.18.1-win-x64" | ||
|
||
# Install npm packages | ||
& "npm" -v | ||
|
||
# Install Python requirements using the portable pip | ||
& "pip.exe" install -r requirements.txt --no-deps | ||
|
||
# Initialize RF Browser | ||
& "rfbrowser.exe" init | ||
|
||
Write-Host "Installation Done" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# This script assumes you have PowerShell and that execution of scripts is enabled. | ||
# You can enable script execution by running PowerShell as Administrator and typing: | ||
# Set-ExecutionPolicy RemoteSigned | ||
|
||
# Remove the python alias in Windows | ||
Remove-Item $env:LOCALAPPDATA\Microsoft\WindowsApps\python.exe | ||
Remove-Item $env:LOCALAPPDATA\Microsoft\WindowsApps\python3.exe | ||
|
||
& ".venv\Scripts\activate" | ||
& "python.exe" worker.py |