2022-10-19 20:44:13 +00:00
|
|
|
@ECHO off
|
|
|
|
|
2022-11-23 21:01:41 +00:00
|
|
|
pushd "%~dp0"
|
|
|
|
|
2022-11-03 03:09:07 +00:00
|
|
|
where /q python
|
|
|
|
IF ERRORLEVEL 1 (
|
2023-08-30 16:25:24 +00:00
|
|
|
|
|
|
|
SET /P gumpf="You do not seem to have python installed. Please check the 'running from source' help."
|
|
|
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
EXIT /B 1
|
|
|
|
|
2022-11-03 03:09:07 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
IF EXIST "venv\" (
|
2023-08-30 16:25:24 +00:00
|
|
|
|
|
|
|
SET /P ready="Virtual environment will be reinstalled. Hit Enter to start."
|
|
|
|
|
|
|
|
echo Deleting old venv...
|
|
|
|
|
|
|
|
rmdir /s /q venv
|
|
|
|
|
2022-11-03 03:09:07 +00:00
|
|
|
) ELSE (
|
2023-08-30 16:25:24 +00:00
|
|
|
|
|
|
|
SET /P ready="If you do not know what this is, check the 'running from source' help. Hit Enter to start."
|
|
|
|
|
2022-11-03 03:09:07 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
:questions
|
|
|
|
|
|
|
|
ECHO:
|
2023-08-16 20:46:51 +00:00
|
|
|
ECHO Users on older Windows need the advanced install.
|
2022-11-03 03:09:07 +00:00
|
|
|
ECHO:
|
|
|
|
ECHO Your Python version is:
|
|
|
|
python --version
|
|
|
|
ECHO:
|
2023-08-30 16:25:24 +00:00
|
|
|
SET /P install_type="Do you want the (s)imple or (a)dvanced install? "
|
2022-11-03 03:09:07 +00:00
|
|
|
|
|
|
|
IF "%install_type%" == "s" goto :create
|
|
|
|
IF "%install_type%" == "a" goto :question_qt
|
2023-01-11 21:10:29 +00:00
|
|
|
IF "%install_type%" == "d" goto :create
|
2022-11-03 03:09:07 +00:00
|
|
|
goto :parse_fail
|
|
|
|
|
|
|
|
:question_qt
|
|
|
|
|
|
|
|
ECHO:
|
2023-08-16 20:46:51 +00:00
|
|
|
ECHO Qt is the User Interface library. We are now on Qt6.
|
2023-09-05 20:01:54 +00:00
|
|
|
ECHO If you are on Windows ^<=8.1, choose 5.
|
|
|
|
ECHO If you have multi-monitor menu position bugs with the normal Qt6, try the (o)lder build on Python ^<=3.10 or (m)iddle on Python ^>=3.11.
|
|
|
|
SET /P qt="Do you want Qt(5), Qt(6), Qt6 (o)lder, Qt6 (m)iddle or (t)est? "
|
2022-11-03 03:09:07 +00:00
|
|
|
|
|
|
|
IF "%qt%" == "5" goto :question_mpv
|
|
|
|
IF "%qt%" == "6" goto :question_mpv
|
2023-08-09 21:12:17 +00:00
|
|
|
IF "%qt%" == "o" goto :question_mpv
|
2023-09-05 20:01:54 +00:00
|
|
|
IF "%qt%" == "m" goto :question_mpv
|
2022-12-07 22:41:53 +00:00
|
|
|
IF "%qt%" == "t" goto :question_mpv
|
2022-11-03 03:09:07 +00:00
|
|
|
goto :parse_fail
|
|
|
|
|
|
|
|
:question_mpv
|
|
|
|
|
|
|
|
ECHO:
|
2023-08-16 20:46:51 +00:00
|
|
|
ECHO mpv is the main way to play audio and video. We need to tell hydrus how to talk to your mpv dll.
|
|
|
|
ECHO Try the n first. If it doesn't work, fall back to o.
|
2023-09-05 20:01:54 +00:00
|
|
|
SET /P mpv="Do you want (o)ld mpv, (n)ew mpv, or (t)est mpv? "
|
2022-11-03 03:09:07 +00:00
|
|
|
|
|
|
|
IF "%mpv%" == "o" goto :question_opencv
|
|
|
|
IF "%mpv%" == "n" goto :question_opencv
|
2023-09-05 20:01:54 +00:00
|
|
|
IF "%mpv%" == "t" goto :question_opencv
|
2022-11-03 03:09:07 +00:00
|
|
|
goto :parse_fail
|
|
|
|
|
|
|
|
:question_opencv
|
|
|
|
|
|
|
|
ECHO:
|
2023-08-16 20:46:51 +00:00
|
|
|
ECHO OpenCV is the main image processing library.
|
|
|
|
ECHO Try the n first. If it doesn't work, fall back to o. Very new python versions might need t.
|
2023-08-30 16:25:24 +00:00
|
|
|
SET /P opencv="Do you want (o)ld OpenCV, (n)ew OpenCV, or (t)est OpenCV? "
|
2022-11-03 03:09:07 +00:00
|
|
|
|
|
|
|
IF "%opencv%" == "o" goto :create
|
|
|
|
IF "%opencv%" == "n" goto :create
|
2023-04-24 21:17:07 +00:00
|
|
|
IF "%opencv%" == "t" goto :create
|
2022-11-03 03:09:07 +00:00
|
|
|
goto :parse_fail
|
2022-10-19 20:44:13 +00:00
|
|
|
|
|
|
|
:create
|
|
|
|
|
|
|
|
echo Creating new venv...
|
|
|
|
|
|
|
|
python -m venv venv
|
|
|
|
|
|
|
|
CALL venv\Scripts\activate.bat
|
|
|
|
|
2022-11-16 21:34:30 +00:00
|
|
|
IF ERRORLEVEL 1 (
|
2023-08-30 16:25:24 +00:00
|
|
|
|
|
|
|
SET /P gumpf="The venv failed to activate, stopping now!"
|
|
|
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
EXIT /B 1
|
|
|
|
|
2022-11-16 21:34:30 +00:00
|
|
|
)
|
|
|
|
|
2022-10-19 20:44:13 +00:00
|
|
|
python -m pip install --upgrade pip
|
|
|
|
|
2022-11-16 21:34:30 +00:00
|
|
|
python -m pip install --upgrade wheel
|
2022-10-19 20:44:13 +00:00
|
|
|
|
2022-11-03 03:09:07 +00:00
|
|
|
IF "%install_type%" == "s" (
|
2023-08-30 16:25:24 +00:00
|
|
|
|
|
|
|
python -m pip install -r requirements.txt
|
|
|
|
|
2023-01-11 21:10:29 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
IF "%install_type%" == "d" (
|
|
|
|
|
2023-08-30 16:25:24 +00:00
|
|
|
python -m pip install -r static\requirements\advanced\requirements_core.txt
|
|
|
|
python -m pip install -r static\requirements\advanced\requirements_windows.txt
|
|
|
|
|
|
|
|
python -m pip install -r static\requirements\advanced\requirements_qt6_test.txt
|
|
|
|
python -m pip install pyside2
|
|
|
|
python -m pip install PyQtChart PyQt5
|
|
|
|
python -m pip install PyQt6-Charts PyQt6
|
2023-09-05 20:01:54 +00:00
|
|
|
python -m pip install -r static\requirements\advanced\requirements_mpv_test.txt
|
2023-08-30 16:25:24 +00:00
|
|
|
python -m pip install -r static\requirements\advanced\requirements_opencv_test.txt
|
|
|
|
python -m pip install -r static\requirements\hydev\requirements_windows_build.txt
|
|
|
|
|
2023-01-11 21:10:29 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
IF "%install_type%" == "a" (
|
2023-08-30 16:25:24 +00:00
|
|
|
|
|
|
|
python -m pip install -r static\requirements\advanced\requirements_core.txt
|
|
|
|
python -m pip install -r static\requirements\advanced\requirements_windows.txt
|
|
|
|
|
|
|
|
IF "%qt%" == "5" python -m pip install -r static\requirements\advanced\requirements_qt5.txt
|
|
|
|
IF "%qt%" == "6" python -m pip install -r static\requirements\advanced\requirements_qt6.txt
|
|
|
|
IF "%qt%" == "o" python -m pip install -r static\requirements\advanced\requirements_qt6_older.txt
|
2023-09-05 20:01:54 +00:00
|
|
|
IF "%qt%" == "m" python -m pip install -r static\requirements\advanced\requirements_qt6_middle.txt
|
2023-08-30 16:25:24 +00:00
|
|
|
IF "%qt%" == "t" python -m pip install -r static\requirements\advanced\requirements_qt6_test.txt
|
|
|
|
|
|
|
|
IF "%mpv%" == "o" python -m pip install -r static\requirements\advanced\requirements_mpv_old.txt
|
|
|
|
IF "%mpv%" == "n" python -m pip install -r static\requirements\advanced\requirements_mpv_new.txt
|
2023-09-05 20:01:54 +00:00
|
|
|
IF "%mpv%" == "t" python -m pip install -r static\requirements\advanced\requirements_mpv_test.txt
|
2023-08-30 16:25:24 +00:00
|
|
|
|
|
|
|
IF "%opencv%" == "o" python -m pip install -r static\requirements\advanced\requirements_opencv_old.txt
|
|
|
|
IF "%opencv%" == "n" python -m pip install -r static\requirements\advanced\requirements_opencv_new.txt
|
|
|
|
IF "%opencv%" == "t" python -m pip install -r static\requirements\advanced\requirements_opencv_test.txt
|
|
|
|
|
2022-11-03 03:09:07 +00:00
|
|
|
)
|
2022-10-19 20:44:13 +00:00
|
|
|
|
|
|
|
CALL venv\Scripts\deactivate.bat
|
|
|
|
|
2023-08-30 16:25:24 +00:00
|
|
|
SET /P done="Done!"
|
2022-11-23 21:01:41 +00:00
|
|
|
|
|
|
|
popd
|
|
|
|
|
2022-11-03 03:09:07 +00:00
|
|
|
EXIT /B 0
|
|
|
|
|
|
|
|
:parse_fail
|
2022-11-02 04:17:15 +00:00
|
|
|
|
2023-08-30 16:25:24 +00:00
|
|
|
SET /P done="Sorry, did not understand that input!"
|
2022-11-23 21:01:41 +00:00
|
|
|
|
|
|
|
popd
|
|
|
|
|
2022-11-03 03:09:07 +00:00
|
|
|
EXIT /B 1
|