Merged setup files and some version tweaking

This commit is contained in:
Hydrus Network Developer 2022-11-02 22:09:07 -05:00
parent 880eec5034
commit dd92ba7aa1
14 changed files with 295 additions and 405 deletions

View File

@ -17,6 +17,11 @@ jobs:
id: setup_ffmpeg id: setup_ffmpeg
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
-
name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- -
name: Install mkdocs-material name: Install mkdocs-material
run: python3 -m pip install mkdocs-material run: python3 -m pip install mkdocs-material
@ -74,7 +79,7 @@ jobs:
name: Setup Python name: Setup Python
uses: actions/setup-python@v4 uses: actions/setup-python@v4
with: with:
python-version: 3.8 python-version: 3.9
architecture: x64 architecture: x64
- -
name: APT Install name: APT Install
@ -156,7 +161,7 @@ jobs:
name: Setup Python name: Setup Python
uses: actions/setup-python@v4 uses: actions/setup-python@v4
with: with:
python-version: 3.8 python-version: 3.9
architecture: x64 architecture: x64
- -
name: Pip Install name: Pip Install

View File

@ -1,6 +1,11 @@
@ECHO off @ECHO off
IF NOT EXIST "venv\" goto :missing_venv IF NOT EXIST "venv\" (
SET /P gumpf=You need to set up a venv! Check the running from source help for more info!
EXIT /B 1
)
CALL venv\Scripts\activate.bat CALL venv\Scripts\activate.bat
@ -12,11 +17,3 @@ start "" "pythonw" client.pyw
REM Here is an alternate line that will keep the console open and see live log updates. Useful for boot/live debugging. REM Here is an alternate line that will keep the console open and see live log updates. Useful for boot/live debugging.
REM python client.py REM python client.py
goto :done
:missing_venv
SET /P ready=You need to set up a venv! Check the running from source help for more info!
:done

View File

@ -4,7 +4,7 @@ title: Running From Source
# running from source # running from source
I write the client and server entirely in [python](https://python.org), which can run straight from source. It is getting simpler and simpler to run python programs like this, so don't be afraid of it. If none of the built packages work for you (for instance if you use Windows 7 or 18.04 Ubuntu (or equivalent)), it may be the only way you can get the program to run. Also, if you have a general interest in exploring the code or wish to otherwise modify the program, you will obviously need to do this. I write the client and server entirely in [python](https://python.org), which can run straight from source. It is getting simpler and simpler to run python programs like this, so don't be afraid of it. If none of the built packages work for you (for instance if you use Windows 8.1 or 18.04 Ubuntu (or equivalent)), it may be the only way you can get the program to run. Also, if you have a general interest in exploring the code or wish to otherwise modify the program, you will obviously need to do this.
## Simple Setup Guide ## Simple Setup Guide
@ -32,7 +32,7 @@ There are now setup scripts that make this easy on Windows and Linux. You do not
=== "Linux" === "Linux"
You should already have a fairly new python. Ideally, you want 3.8.x or 3.9.x. If you are on 3.10.x, run the 'advanced' setup script later on and choose the newer OpenCV. You should already have a fairly new python. Ideally, you want 3.8.x or 3.9.x. If you are on 3.10.x, run the 'advanced' setup later on and choose the newer OpenCV.
=== "macOS" === "macOS"
@ -53,8 +53,8 @@ There are three external libraries. You just have to get them and put them in th
1. mpv 1. mpv
1. If you are on Windows 7, get [this](https://sourceforge.net/projects/mpv-player-windows/files/libmpv/mpv-dev-x86_64-20210228-git-d1be8bb.7z). 1. If you are on Windows 8.1 or older, get [this](https://sourceforge.net/projects/mpv-player-windows/files/libmpv/mpv-dev-x86_64-20210228-git-d1be8bb.7z).
2. If you are on Windows 8 or newer, get [this](https://sourceforge.net/projects/mpv-player-windows/files/libmpv/mpv-dev-x86_64-20220501-git-9ffaa6b.7z). 2. If you are on Windows 10 or newer, get [this](https://sourceforge.net/projects/mpv-player-windows/files/libmpv/mpv-dev-x86_64-20220501-git-9ffaa6b.7z).
Then open that archive and place the 'mpv-1.dll' or 'mpv-2.dll' into `install_dir`. Then open that archive and place the 'mpv-1.dll' or 'mpv-2.dll' into `install_dir`.
@ -75,7 +75,7 @@ There are three external libraries. You just have to get them and put them in th
Try running `apt-get install libmpv1` in a new terminal. You can type `apt show libmpv1` to see your current version. Or, if you use a different package manager, try searching `libmpv` or `libmpv1` on that. Try running `apt-get install libmpv1` in a new terminal. You can type `apt show libmpv1` to see your current version. Or, if you use a different package manager, try searching `libmpv` or `libmpv1` on that.
1. If you have earlier than 0.34.1, you will be looking at running the 'advanced' setup script in the next section and selecting the 'old' mpv. 1. If you have earlier than 0.34.1, you will be looking at running the 'advanced' setup in the next section and selecting the 'old' mpv.
2. If you have 0.34.1 or later, you can run the normal setup script. 2. If you have 0.34.1 or later, you can run the normal setup script.
2. SQLite3 2. SQLite3
@ -106,35 +106,30 @@ There are three external libraries. You just have to get them and put them in th
=== "Windows" === "Windows"
1. If you are on Windows 7, you want 'setup_venv_advanced.bat'.
2. Everyone else go for 'setup_venv.bat'.
Just double-click the file. Double-click `setup_venv.bat`.
=== "Linux" === "Linux"
1. If you are on or below Ubuntu 20.04 or equivalent, or are otherwise stuck with an older mpv version, you want 'setup_venv_advanced.sh'.
2. Everyone else go for 'setup_venv.sh'.
You might be able to double-click the file. Otherwise, open a terminal in the folder and type: The file is `setup_venv.sh`. You may be able to double-click it. If not, open a terminal in the folder and type:
`. setup_venv.sh` `. setup_venv.sh`
=== "macOS" === "macOS"
I do not know which versions of macOS are unable to run Qt6, so you probably want to try setup_venv.command, and if that fails, experiment with setup_venv_advanced.command. Try Qt5 and the other older libraries first, then test the newer ones later.
Please let me know what you discover. Double-click `setup_venv.command`.
The setup should take a minute to download its packages and a couple minutes to install them. Do not close it until it is finished installing everything and says 'Done!'. If it seems like it hung, just give it time to finish. I do not know which versions of macOS are unable to run Qt6, so you may need to experiment with the advanced options. Try Qt5 and the other older libraries first, then test the newer ones later.
!!! info "Advanced Setup" Let me know what you discover.
The advanced setup script allows you to choose between old or newer versions of several libraries:
1. Qt: Win 7 and Ubuntu 18.04 equivalents should go for Qt5, everyone else Qt6.
2. mpv: Win 7 and Ubuntu 20.04 equivalents should go for the old one, everyone else the new.
3. OpenCV: Does not matter much, but Python 3.10 users may need the new.
If something messes up, or you want to switch between Qt5/Qt6, just run the setup script again and it will reinstall everything. Everything these scripts do ends up in the 'venv' directory, so you can also just delete that folder to 'uninstall'. It should _just work_ on most normal computers, but let me know if you have any trouble. The setup will ask you some questions. Just type the letters it asks for and hit enter. Most users are looking at the (s)imple setup, but if your situation is unusual, you may need the (a)dvanced. Once ready, it should take a minute to download its packages and a couple minutes to install them. Do not close it until it is finished installing everything and says 'Done!'. If it seems like it hung, just give it time to finish.
If something messes up, or you want to switch between Qt5/Qt6, or you need to try a different version of a library, just run the setup script again and it will reinstall everything. Everything these scripts do ends up in the 'venv' directory, so you can also just delete that folder to 'uninstall'. It should _just work_ on most normal computers, but let me know if you have any trouble.
Then run the 'setup_help' script to build the help. This isn't necessary, but it is nice to have it built locally. You can run this again at any time to rebuild the current help. Then run the 'setup_help' script to build the help. This isn't necessary, but it is nice to have it built locally. You can run this again at any time to rebuild the current help.
@ -190,8 +185,6 @@ Inside the extract should be client.py and server.py. You will be treating these
Hydrus needs a whole bunch of libraries, so let's now set your python up. I **strongly** recommend you create a virtual environment. It is easy and doesn't mess up your system python. Hydrus needs a whole bunch of libraries, so let's now set your python up. I **strongly** recommend you create a virtual environment. It is easy and doesn't mess up your system python.
_Note, if you are on Linux and you have trouble with venv, it may be easier to use your package manager instead. A user has written a great summary with all needed packages [here](running_from_source_linux_packages.txt)._
To create a new venv environment: To create a new venv environment:
* Open a terminal at your hydrus extract folder. * Open a terminal at your hydrus extract folder.
@ -229,7 +222,7 @@ If you want to set QT_API in a batch file, do this:
`set QT_API=pyqt6` `set QT_API=pyqt6`
If you run Windows 7 or Ubuntu 18.04, you cannot run Qt6. Please try PySide2 or PyQt5. If you run Windows 8.1 or Ubuntu 18.04, you cannot run Qt6. Please try PySide2 or PyQt5.
## mpv support { id="mpv" } ## mpv support { id="mpv" }

View File

@ -1,93 +0,0 @@
Why use distro packages instead of pip?
=======================================
* Packages integrate well with the system
* Packages can be installed/updated/removed with the package manager which users probably already know how to use
* No need to learn/use pip and venv, no need to compile anything
The following lists should work for any recent release of the named distros and derivatives. However, for some modules, some distros might ship versions
that are too old. These should be installed through pip until the distro adds/updates the package.
IMPORTANT PySide2 + Python 3.8 compatibility notice
===================================================
This especially applies to Arch and other rolling release distro users.
Slower distros most likely won't upgrade right away to Python 3.8 and thus won't have this problem.
If you are using Python 3.8 or newer, you need at least Qt version 5.14 and the corresponding PySide2 version.
Otherwise you will get a `TypeError: 'Shiboken.ObjectType' object is not iterable` error on startup. To temporarily work around this by using PyQt5,
install PyQt5 instead of PySide2, then either remove PySide2 or set the QT_API environment variable to PyQt5.
Arch Linux, Manjaro
===================
Install from the AUR: https://aur.archlinux.org/packages/hydrus/
(This is what I use personally and it works great - it's basically just a script which installs dependencies, clones the source from the official repo and puts it in the right place.)
Even if not installing from the AUR, the above link has a full and up-to-date list of the required package dependencies.
Note that you can use PyQt5 instead of PySide2 (however PySide2 is recommended). If you choose to use PyQt5, you don't need PySide2 or shiboken2 but have to install python-pyqt5 and python-sip-pyqt5.
Ubuntu, Debian, Linux Mint
==========================
Note: if you are using an older release, the python3-pyside2.* packages listed below might not be available. If that is the case,
install PySide2 with:
pip3 install --user pyside2
Required:
python3-chardet python3-html5lib python3-bs4 python3-lxml
python3-nose python3-numpy python3-opencv python3-six python3-pil
python3-psutil python3-openssl python3-yaml python3-requests
python3-send2trash python3-service-identity python3-twisted
ffmpeg python3-pyside2.qtwidgets python3-pyside2.qtcore python3-pyside2.qtgui python3-pyside2.qtcharts
You also need python3-qtpy, but the version shipped by these distros (as of this writing) is too old. At least version 1.8 is required. Until the distros catch up, it is recommended that you install
this module with pip instead of the package manager, like this:
pip3 install --user qtpy
You might need to install the shiboken2 module from pip since it looks like it is not currently packaged:
pip3 install --user shiboken2
Instead of PySide2 (the python3-pyside2.* packages above and shiboken2), you can also use PyQt5 (python3-pyqt5, python3-sip), though PySide2 is recommended.
Optional:
python3-lz4 python3-pysocks python3-mock python3-httmock
Package search: https://packages.debian.org/, https://packages.ubuntu.com/
Fedora
======
Required packages:
python3-beautifulsoup4 python3-chardet
python3-html5lib python3-lxml python3-nose
python3-numpy python3-opencv python3-six python3-pillow python3-psutil
python3-pyOpenSSL python3-pyyaml python3-requests
python3-send2trash python3-service-identity
python3-twisted
python3-qtpy (1.8 or newer)
python3-pyside2
python3-shiboken2
Instead of PySide2 (python3-pyside2, python3-shiboken2) you can also use PyQt5 (python3-sip, python3-qt5).
The optional stuff:
python3-lz4 python3-pysocks python3-httmock qt5-qtcharts
mock doesn't seem to be packaged, and ffmpeg isn't in the base Fedora repo (due to licensing/patents scare?),
but can be installed from the rpmfusion repo (https://rpmfusion.org/). From these, only ffmpeg is necessary for normal users.
Package search: https://apps.fedoraproject.org/packages/
openSuse
========
Required:
python3-beautifulsoup4 python3-chardet python3-html5lib python3-lxml
python3-nose python3-numpy python3-opencv python3-six
python3-Pillow python3-psutil python3-pyOpenSSL
python3-PyYAML python3-requests python3-Send2Trash
python3-service_identity python3-Twisted
ffmpeg-4
python3-pyside2
python3-QtPy
python3-python-mpv
You might need to install the shiboken2 module from pip since it looks like it is not currently packaged.
Instead of PySide2 (python3-pyside2 and the shiboken2 module) you can also use PyQt5 (python3-sip, python3-qt5).
Optional:
python3-lz4 python3-PySocks
python3-mock python3-httmock libqt5-qtcharts
Package search: https://software.opensuse.org/search

View File

@ -1,5 +1,13 @@
@ECHO off @ECHO off
where /q git
IF ERRORLEVEL 1 (
SET /P gumpf=You do not seem to git installed!
EXIT /B 1
)
git pull git pull
SET /P done=Done! SET /P done=Done!

View File

@ -1,17 +1,10 @@
@ECHO off @ECHO off
IF EXIST "venv\" goto :venv_exists IF NOT EXIST "venv\" (
goto :venv_missing SET /P gumpf=Sorry, you do not seem to have a venv!
EXIT /B 1
:venv_exists
)
start venv\Scripts\activate.bat start venv\Scripts\activate.bat
goto :done
:venv_missing
SET /P done=Sorry, you do not seem to have a venv!
:done

View File

@ -1,16 +1,21 @@
@ECHO off @ECHO off
IF NOT EXIST "venv\" goto :missing_venv IF NOT EXIST "venv\" (
IF EXIST "help\" goto :delete SET /P gumpf=You need to set up a venv! Check the running from source help for more info!
EXIT /B 1
goto :create
)
:delete :delete
echo Deleting old help... IF EXIST "help\" (
rmdir /s /q help echo Deleting old help...
rmdir /s /q help
)
:create :create
@ -25,11 +30,3 @@ mkdocs build -d help
CALL venv\Scripts\deactivate.bat CALL venv\Scripts\deactivate.bat
SET /P done=Done! SET /P done=Done!
goto :done
:missing_venv
SET /P ready=You need to set up a venv! Check the running from source help for more info!
:done

View File

@ -1,18 +1,70 @@
@ECHO off @ECHO off
IF EXIST "venv\" goto :venv_exists where /q python
IF ERRORLEVEL 1 (
SET /P gumpf=You do not seem to have python installed. Please check the 'running from source' help.
EXIT /B 1
)
SET /P ready=If you do not have Python 3 installed yet, check the 'running from source' help. Hit Enter to start. IF EXIST "venv\" (
SET /P ready=Virtual environment will be reinstalled. Hit Enter to start.
echo Deleting old venv...
rmdir /s /q venv
) ELSE (
SET /P ready=If you do not know what this is, check the 'running from source' help. Hit Enter to start.
)
goto :create :questions
:venv_exists ECHO:
ECHO Users on ^<=Windows 8.1 or python ^>=3.10 need the advanced install.
ECHO:
ECHO Your Python version is:
python --version
ECHO:
SET /P install_type=Do you want the (s)imple or (a)dvanced install?
SET /P Virtual environment will be reinstalled. Hit Enter to start. IF "%install_type%" == "s" goto :create
IF "%install_type%" == "a" goto :question_qt
goto :parse_fail
echo Deleting old venv... :question_qt
rmdir /s /q venv ECHO:
ECHO If you are on Windows 7, choose 5.
SET /P qt=Do you want Qt(5) or Qt(6)?
IF "%qt%" == "5" goto :question_mpv
IF "%qt%" == "6" goto :question_mpv
goto :parse_fail
:question_mpv
ECHO:
ECHO If you have mpv-2.dll, choose n.
SET /P mpv=Do you want (o)ld mpv or (n)ew mpv?
IF "%mpv%" == "o" goto :question_opencv
IF "%mpv%" == "n" goto :question_opencv
goto :parse_fail
:question_opencv
ECHO:
ECHO If you are ^>=Python 3.10, choose n.
SET /P opencv=Do you want (o)ld OpenCV or (n)ew OpenCV?
IF "%opencv%" == "o" goto :create
IF "%opencv%" == "n" goto :create
goto :parse_fail
:create :create
@ -26,13 +78,31 @@ python -m pip install --upgrade pip
pip3 install --upgrade wheel pip3 install --upgrade wheel
pip3 install -r requirements.txt IF "%install_type%" == "s" (
pip3 install -r requirements.txt
) ELSE (
pip3 install -r requirements_core.txt
IF "%qt%" == "5" pip3 install -r requirements_qt5.txt
IF "%qt%" == "6" pip3 install -r requirements_qt6.txt
IF "%mpv%" == "o" pip3 install -r requirements_old_mpv.txt
IF "%mpv%" == "n" pip3 install -r requirements_new_mpv.txt
IF "%opencv%" == "o" pip3 install -r requirements_old_opencv.txt
IF "%opencv%" == "n" pip3 install -r requirements_new_opencv.txt
)
CALL venv\Scripts\deactivate.bat CALL venv\Scripts\deactivate.bat
goto :done
:done
SET /P done=Done! SET /P done=Done!
EXIT /B 0
:parse_fail
SET /P done=Sorry, did not understand that input!
EXIT /B 1

View File

@ -10,6 +10,61 @@ else
read read
fi fi
echo "The precise version limits for macOS are not yet fully known. Please try the advanced install and let hydev know what works for you."
echo
echo "Your Python version is:"
python --version
echo
echo "Do you want the (s)imple or (a)dvanced install? "
read install_type
if [ $install_type = "s" ]; then
:
elif [ $install_type = "a" ]; then
echo
echo "If you are <= 10.13 (High Sierra), choose 5."
echo "Do you want Qt(5) or Qt(6)? "
read qt
if [ $qt = "5" ]; then
:
elif [ $qt = "6" ]; then
:
else
echo "Sorry, did not understand that input!"
exit 1
fi
echo
echo "mpv is broken on macOS. As a safe default, choose n."
echo "Do you want (o)ld mpv or (n)ew mpv? "
read mpv
if [ $mpv = "o" ]; then
:
elif [ $mpv = "n" ]; then
:
else
echo "Sorry, did not understand that input!"
exit 1
fi
echo
echo "If you are >=Python 3.10, choose n."
echo "Do you want (o)ld OpenCV or (n)ew OpenCV? "
read opencv
if [ $opencv = "o" ]; then
:
elif [ $opencv = "n" ]; then
:
else
echo "Sorry, did not understand that input!"
exit 1
fi
else
echo "Sorry, did not understand that input!"
exit 1
fi
echo "Creating new venv..." echo "Creating new venv..."
python -m venv venv python -m venv venv
@ -19,7 +74,29 @@ python -m pip install --upgrade pip
pip3 install --upgrade wheel pip3 install --upgrade wheel
pip3 install -r requirements.txt if [ $install_type = "s" ]; then
pip3 install -r requirements.txt
elif [ $install_type = "a" ]; then
pip3 install -r requirements_core.txt
if [ $qt = "5" ]; then
pip3 install -r requirements_qt5.txt
elif [ $qt = "6" ]; then
pip3 install -r requirements_qt6.txt
fi
if [ $mpv = "o" ]; then
pip3 install -r requirements_old_mpv.txt
elif [ $mpv = "n" ]; then
pip3 install -r requirements_new_mpv.txt
fi
if [ $opencv = "o" ]; then
pip3 install -r requirements_old_opencv.txt
elif [ $opencv = "n" ]; then
pip3 install -r requirements_new_opencv.txt
fi
fi
deactivate deactivate

View File

@ -10,6 +10,61 @@ else
read read
fi fi
echo "Users on <=Ubuntu 20.04 equivalents or python >=3.10 need the advanced install."
echo
echo "Your Python version is:"
python --version
echo
echo "Do you want the (s)imple or (a)dvanced install? "
read install_type
if [ $install_type = "s" ]; then
:
elif [ $install_type = "a" ]; then
echo
echo "If you are <=Ubuntu 18.04 or equivalent, choose 5."
echo "Do you want Qt(5) or Qt(6)? "
read qt
if [ $qt = "5" ]; then
:
elif [ $qt = "6" ]; then
:
else
echo "Sorry, did not understand that input!"
exit 1
fi
echo
echo "If you are <=Ubuntu 20.04 or equivalent, you probably do not have libmpv1 0.34.1, so choose o."
echo "Do you want (o)ld mpv or (n)ew mpv? "
read mpv
if [ $mpv = "o" ]; then
:
elif [ $mpv = "n" ]; then
:
else
echo "Sorry, did not understand that input!"
exit 1
fi
echo
echo "If you are >=Python 3.10, choose n."
echo "Do you want (o)ld OpenCV or (n)ew OpenCV? "
read opencv
if [ $opencv = "o" ]; then
:
elif [ $opencv = "n" ]; then
:
else
echo "Sorry, did not understand that input!"
exit 1
fi
else
echo "Sorry, did not understand that input!"
exit 1
fi
echo "Creating new venv..." echo "Creating new venv..."
python -m venv venv python -m venv venv
@ -19,7 +74,29 @@ python -m pip install --upgrade pip
pip3 install --upgrade wheel pip3 install --upgrade wheel
pip3 install -r requirements.txt if [ $install_type = "s" ]; then
pip3 install -r requirements.txt
elif [ $install_type = "a" ]; then
pip3 install -r requirements_core.txt
if [ $qt = "5" ]; then
pip3 install -r requirements_qt5.txt
elif [ $qt = "6" ]; then
pip3 install -r requirements_qt6.txt
fi
if [ $mpv = "o" ]; then
pip3 install -r requirements_old_mpv.txt
elif [ $mpv = "n" ]; then
pip3 install -r requirements_new_mpv.txt
fi
if [ $opencv = "o" ]; then
pip3 install -r requirements_old_opencv.txt
elif [ $opencv = "n" ]; then
pip3 install -r requirements_new_opencv.txt
fi
fi
deactivate deactivate

View File

@ -1,76 +0,0 @@
@ECHO off
IF EXIST "venv\" goto :venv_exists
SET /P ready=If you do not have Python 3 installed yet, check the 'running from source' help. Hit Enter to start.
goto :questions
:venv_exists
SET /P install_type=Virtual environment will be reinstalled. Hit Enter to start.
echo Deleting old venv...
rmdir /s /q venv
:questions
SET /P qt=Do you want Qt(5) or Qt(6)?
IF "%qt%" == "5" goto :qt_ok
IF "%qt%" == "6" goto :qt_ok
goto :parse_fail
:qt_ok
SET /P mpv=Do you want (o)ld mpv or (n)ew mpv?
IF "%mpv%" == "o" goto :mpv_ok
IF "%mpv%" == "n" goto :mpv_ok
goto :parse_fail
:mpv_ok
SET /P opencv=Do you want (o)ld OpenCV or (n)ew OpenCV?
IF "%opencv%" == "o" goto :opencv_ok
IF "%opencv%" == "n" goto :opencv_ok
goto :parse_fail
:opencv_ok
:create
echo Creating new venv...
python -m venv venv
CALL venv\Scripts\activate.bat
python -m pip install --upgrade pip
pip3 install --upgrade wheel
pip3 install -r requirements_core.txt
IF "%qt%" == "5" pip3 install -r requirements_qt5.txt
IF "%qt%" == "6" pip3 install -r requirements_qt6.txt
IF "%mpv%" == "o" pip3 install -r requirements_old_mpv.txt
IF "%mpv%" == "n" pip3 install -r requirements_new_mpv.txt
IF "%opencv%" == "o" pip3 install -r requirements_old_opencv.txt
IF "%opencv%" == "n" pip3 install -r requirements_new_opencv.txt
CALL venv\Scripts\deactivate.bat
goto :done
:parse_fail
echo Sorry, did not understand that input!
:done
SET /P done=Done!

View File

@ -1,79 +0,0 @@
#!/bin/bash
if [ -d "venv" ]; then
echo "Virtual environment will be reinstalled. Hit Enter to start."
read
echo "Deleting old venv..."
rm -rf venv
else
echo "If you do not know what this is, check the 'running from source' help. Hit Enter to start."
read
fi
echo "Do you want Qt(5) or Qt(6)? "
read qt
if [ $qt = "5" ]; then
:
elif [ $qt = "6" ]; then
:
else
echo "Sorry, did not understand that input!"
exit 1
fi
echo "Do you want (o)ld mpv or (n)ew mpv? "
read mpv
if [ $mpv = "o" ]; then
:
elif [ $mpv = "n" ]; then
:
else
echo "Sorry, did not understand that input!"
exit 1
fi
echo "Do you want (o)ld OpenCV or (n)ew OpenCV? "
read opencv
if [ $opencv = "o" ]; then
:
elif [ $opencv = "n" ]; then
:
else
echo "Sorry, did not understand that input!"
exit 1
fi
echo "Creating new venv..."
python -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip
pip3 install --upgrade wheel
pip3 install -r requirements_core.txt
if [ $qt = "5" ]; then
pip3 install -r requirements_qt5.txt
elif [ $qt = "6" ]; then
pip3 install -r requirements_qt6.txt
fi
if [ $mpv = "o" ]; then
pip3 install -r requirements_old_mpv.txt
elif [ $mpv = "n" ]; then
pip3 install -r requirements_new_mpv.txt
fi
if [ $opencv = "o" ]; then
pip3 install -r requirements_old_opencv.txt
elif [ $opencv = "n" ]; then
pip3 install -r requirements_new_opencv.txt
fi
deactivate
echo "Done!"
read

View File

@ -1,79 +0,0 @@
#!/bin/bash
if [ -d "venv" ]; then
echo "Virtual environment will be reinstalled. Hit Enter to start."
read
echo "Deleting old venv..."
rm -rf venv
else
echo "If you do not know what this is, check the 'running from source' help. Hit Enter to start."
read
fi
echo "Do you want Qt(5) or Qt(6)? "
read qt
if [ $qt = "5" ]; then
:
elif [ $qt = "6" ]; then
:
else
echo "Sorry, did not understand that input!"
exit 1
fi
echo "Do you want (o)ld mpv or (n)ew mpv? "
read mpv
if [ $mpv = "o" ]; then
:
elif [ $mpv = "n" ]; then
:
else
echo "Sorry, did not understand that input!"
exit 1
fi
echo "Do you want (o)ld OpenCV or (n)ew OpenCV? "
read opencv
if [ $opencv = "o" ]; then
:
elif [ $opencv = "n" ]; then
:
else
echo "Sorry, did not understand that input!"
exit 1
fi
echo "Creating new venv..."
python -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip
pip3 install --upgrade wheel
pip3 install -r requirements_core.txt
if [ $qt = "5" ]; then
pip3 install -r requirements_qt5.txt
elif [ $qt = "6" ]; then
pip3 install -r requirements_qt6.txt
fi
if [ $mpv = "o" ]; then
pip3 install -r requirements_old_mpv.txt
elif [ $mpv = "n" ]; then
pip3 install -r requirements_new_mpv.txt
fi
if [ $opencv = "o" ]; then
pip3 install -r requirements_old_opencv.txt
elif [ $opencv = "n" ]; then
pip3 install -r requirements_new_opencv.txt
fi
deactivate
echo "Done!"
read

View File

@ -36,7 +36,7 @@ def make_install(client, resources):
static_resources = glob(["./*.py", "./*.md", "./*txt", "./bin/**/*", "./static/**/*", "./help/**/*"], strip_prefix="{}/".format(CWD)) static_resources = glob(["./*.py", "./*.md", "./*txt", "./bin/**/*", "./static/**/*", "./help/**/*"], strip_prefix="{}/".format(CWD))
files.add_manifest(static_resources) files.add_manifest(static_resources)
hydrus_source = glob(["./hydrus/**/*.py"], strip_prefix="{}/".format(CWD)) hydrus_source = glob(["./hydrus/**/*.py"], strip_prefix="{}/".format(CWD))
files.add_manifest(hydrus_source) files.add_manifest(hydrus_source)
@ -60,4 +60,4 @@ resolve_targets()
# to be updated by people. # to be updated by people.
PYOXIDIZER_VERSION = "0.10.3" PYOXIDIZER_VERSION = "0.10.3"
PYOXIDIZER_COMMIT = "UNKNOWN" PYOXIDIZER_COMMIT = "UNKNOWN"