Obtimizations for run-install.sh and install ffmpeg funcion
Changes
Shebang Change: This now reflects #!/bin/bash for better compatibility with different systems. Error Handling: Added set -e to the beginning to make sure the script exits if any of the commands fail. Logging Function: I have implemented log_message() to log messages including their timestamps. Python Version Detection: I used the function find_python() which searches in order for python3.10, then python3, and finally python.
• FFmpeg Installation: Improved install_ffmpeg() with command -v instead of which; improved Flatpak fallback mechanism.
• Flatpak Installation: Improved install_ffmpeg_flatpak() to be able to install Flatpak if not present. Handling more package managers.
• Virtual Environment Handling: The logic in prepare_install() and create_venv() has been improved to better create and activate the virtual environment.
• Package Installation: Simplified logic around installing the dependencies; several verification steps were added to finish().
How has this been tested?
Tested on Ubuntu Cinnamon
Screenshots (if appropriate):
Types of changes
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
Checklist:
[x] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
Description
Obtimizations for
run-install.sh
and install ffmpeg funcionChanges
Shebang Change: This now reflects
#!/bin/bash
for better compatibility with different systems. Error Handling: Addedset -e
to the beginning to make sure the script exits if any of the commands fail. Logging Function: I have implementedlog_message()
to log messages including their timestamps. Python Version Detection: I used the functionfind_python()
which searches in order forpython3.10
, thenpython3
, and finallypython
. • FFmpeg Installation: Improved install_ffmpeg() with command -v instead of which; improved Flatpak fallback mechanism. • Flatpak Installation: Improved install_ffmpeg_flatpak() to be able to install Flatpak if not present. Handling more package managers. • Virtual Environment Handling: The logic in prepare_install() and create_venv() has been improved to better create and activate the virtual environment. • Package Installation: Simplified logic around installing the dependencies; several verification steps were added to finish().How has this been tested?
Tested on Ubuntu Cinnamon
Screenshots (if appropriate):
Types of changes
Checklist: