mirror of
https://github.com/outbackdingo/OpCore-Simplify.git
synced 2026-08-25 14:53:06 +00:00
Add GUI Support for OpCore Simplify (#512)
* Refactor OpCore-Simplify to GUI version * New ConfigEditor * Add requirement checks and installation in launchers * Add GitHub Actions workflow to generate manifest.json * Set compression level for asset * Skip .git and __pycache__ folders * Refactor update process to include integrity checker * Add SMBIOS model selection * Update README.md * Update to main branch
This commit is contained in:
@@ -299,9 +299,56 @@ if /i "!just_installing!" == "TRUE" (
|
||||
)
|
||||
exit /b
|
||||
|
||||
:checkrequirements
|
||||
REM Check and install Python requirements
|
||||
set "requirements_file=!thisDir!requirements.txt"
|
||||
if not exist "!requirements_file!" (
|
||||
echo Warning: requirements.txt not found. Skipping dependency check.
|
||||
exit /b 0
|
||||
)
|
||||
echo Checking Python dependencies...
|
||||
"!pypath!" -m pip --version > nul 2>&1
|
||||
set "pip_check_error=!ERRORLEVEL!"
|
||||
if not "!pip_check_error!" == "0" (
|
||||
echo Warning: pip is not available. Attempting to install pip...
|
||||
"!pypath!" -m ensurepip --upgrade > nul 2>&1
|
||||
set "ensurepip_error=!ERRORLEVEL!"
|
||||
if not "!ensurepip_error!" == "0" (
|
||||
echo Error: Could not install pip. Please install pip manually.
|
||||
exit /b 1
|
||||
)
|
||||
)
|
||||
REM Try to import key packages to check if they're installed
|
||||
"!pypath!" -c "import PyQt6; import qfluentwidgets" > nul 2>&1
|
||||
set "import_check_error=!ERRORLEVEL!"
|
||||
if not "!import_check_error!" == "0" (
|
||||
echo Installing required packages from requirements.txt...
|
||||
"!pypath!" -m pip install --upgrade -r "!requirements_file!"
|
||||
set "pip_install_error=!ERRORLEVEL!"
|
||||
if not "!pip_install_error!" == "0" (
|
||||
echo.
|
||||
echo Error: Failed to install requirements. Please install them manually:
|
||||
echo !pypath! -m pip install -r !requirements_file!
|
||||
echo.
|
||||
echo Press [enter] to exit...
|
||||
pause > nul
|
||||
exit /b 1
|
||||
)
|
||||
echo Requirements installed successfully.
|
||||
) else (
|
||||
echo All requirements are already installed.
|
||||
)
|
||||
exit /b 0
|
||||
|
||||
:runscript
|
||||
REM Python found
|
||||
cls
|
||||
REM Check and install requirements before running the script
|
||||
call :checkrequirements
|
||||
set "req_check_error=!ERRORLEVEL!"
|
||||
if not "!req_check_error!" == "0" (
|
||||
exit /b 1
|
||||
)
|
||||
set "args=%*"
|
||||
set "args=!args:"=!"
|
||||
if "!args!"=="" (
|
||||
|
||||
Reference in New Issue
Block a user