mirror of
https://github.com/skinnyrad/Lora-Scanner.git
synced 2026-05-18 07:16:05 +02:00
Add Windows Installation Script
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
@echo off
|
||||
|
||||
:: Function to check if Python3 is installed
|
||||
python --version >nul 2>&1
|
||||
IF %ERRORLEVEL% EQU 0 (
|
||||
echo Python3 is already installed.
|
||||
GOTO INSTALL_PACKAGES
|
||||
)
|
||||
|
||||
echo Installing Python 3.12...
|
||||
:: Download the most recent Python 3.12 installer
|
||||
powershell -Command "Invoke-WebRequest -Uri https://www.python.org/ftp/python/3.12.4/python-3.12.4-amd64.exe -OutFile python-installer.exe"
|
||||
:: Install Python silently
|
||||
python-installer.exe /quiet InstallAllUsers=1 PrependPath=1
|
||||
:: Clean up installer
|
||||
del python-installer.exe
|
||||
|
||||
:INSTALL_PACKAGES
|
||||
:: Check if pip is installed
|
||||
pip --version >nul 2>&1
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
echo Installing pip...
|
||||
python -m ensurepip --upgrade
|
||||
)
|
||||
|
||||
:: Install required Python packages
|
||||
pip install flask flask-socketio pyserial beautifulsoup4 requests
|
||||
|
||||
:: Inform the user that the installation is complete
|
||||
echo Installation complete. You can now run your application using: python your_script.py
|
||||
pause
|
||||
Reference in New Issue
Block a user