-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
175 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# WIP: Build an image capable of producing music-caster App Images# WIP: Build an image capable of producing music-caster App Images | ||
# Base image: Fedora 37 | ||
FROM fedora:37 | ||
|
||
# Install required tools | ||
RUN dnf update -y && \ | ||
dnf install -y python3.12 python3.12-devel python3.12-virtualenv dnf-plugins-core libappindicator-gtk3 && \ | ||
dnf config-manager --set-enabled powertools && \ | ||
dnf install -y python3-tkinter | ||
|
||
# Install pip for Python 3.12 (as it's not included by default) | ||
RUN curl https://bootstrap.pypa.io/get-pip.py | python3.12 | ||
|
||
CMD cd /var/music-caster && \ | ||
python3.12 -m pip install --upgrade -r requirements.txt -r requirements-dev.txt && \ | ||
python3.12 -O -m PyInstaller --onefile build_files/onedir.spec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env bash | ||
echo "arch-based distro detected" | ||
PYTHON=$1 | ||
|
||
# Check for python3.12 | ||
if ! pacman -Q "$PYTHON" &> /dev/null; then | ||
echo "$PYTHON not found. Installing..." | ||
sudo pacman -Sy --noconfirm "$PYTHON" "$PYTHON-dev" "$PYTHON-virtualenv" "$PYTHON-tk" | ||
fi | ||
|
||
# Check for pip | ||
if ! $PYTHON -m pip --version &> /dev/null; then | ||
echo "pip not found. Installing..." | ||
sudo pacman -Sy --noconfirm python-pip | ||
fi | ||
|
||
# Check for tkinter | ||
if ! $PYTHON -c "import tkinter" &> /dev/null; then | ||
echo "tkinter not found. Installing..." | ||
sudo pacman -Sy --noconfirm $PYTHON-tk | ||
fi | ||
|
||
# Check for python3-venv | ||
echo "Ensuring $PYTHON-virtualenv is insalled" | ||
sudo pacman -Sy --noconfirm "$PYTHON-virtualenv" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env bash | ||
echo "debian-based distro detected" | ||
PYTHON=$1 | ||
# sudo apt install -y software-properties-common | ||
# Check for python3.12 | ||
if ! $PYTHON --version &> /dev/null; then | ||
echo "Python 3.12 not found. Installing..." | ||
sudo add-apt-repository -y ppa:deadsnakes/ppa | ||
sudo apt update | ||
sudo apt install -y python3.12 "${PYTHON}-venv" "${PYTHON}-tk" | ||
fi | ||
|
||
# Check for pip | ||
if ! $PYTHON -m pip --version &> /dev/null; then | ||
echo "pip not found. Installing..." | ||
sudo apt update | ||
sudo apt install -y python3-pip | ||
fi | ||
|
||
# Check for tkinter | ||
if ! $PYTHON -c "import tkinter" &> /dev/null; then | ||
echo "tkinter not found. Installing..." | ||
sudo apt update | ||
sudo apt install -y "${PYTHON}-tk" | ||
fi | ||
|
||
echo "Ensuring $PYTHON-venv is insalled" | ||
sudo apt update | ||
sudo apt install -y "${PYTHON}-venv" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env bash | ||
echo "fedora-based distro detected" | ||
PYTHON=$1 | ||
|
||
# Check for $PYTHON | ||
if ! dnf list installed "$PYTHON" &> /dev/null; then | ||
echo "$PYTHON not found. Installing..." | ||
sudo dnf install -y "$PYTHON" "$PYTHON-devel" "$PYTHON-virtualenv" | ||
fi | ||
|
||
# Check for pip | ||
if ! $PYTHON -m pip --version &> /dev/null; then | ||
echo "pip not found. Installing..." | ||
sudo dnf install -y python-pip | ||
fi | ||
|
||
# Check for tkinter | ||
if ! "$PYTHON" -c "import tkinter" &> /dev/null; then | ||
echo "tkinter not found. Installing..." | ||
sudo dnf install -y "$PYTHON-tkinter" | ||
fi | ||
|
||
echo "Ensuring $PYTHON-virtualenv is insalled" | ||
sudo dnf install -y "$PYTHON-virtualenv" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/usr/bin/env bash | ||
# Define script locations (change paths if needed) | ||
DEBIAN_INSTALL="./scripts/debian-install.sh" | ||
ARCH_INSTALL="./scripts/arch-install.sh" | ||
FEDORA_INSTALL="./scripts/fedora-install.sh" | ||
SUSE_INSTALL="./scripts/suse-install.sh" | ||
# Check for /etc/os-release (preferred method) | ||
if [ -f /etc/os-release ]; then | ||
. /etc/os-release | ||
case "$ID" in | ||
debian|ubuntu|mint|linuxmint) | ||
if [ -f "$DEBIAN_INSTALL" ]; then | ||
"$DEBIAN_INSTALL" "$1" | ||
exit 0 | ||
fi | ||
echo "Error: $DEBIAN_INSTALL not found!" | ||
exit 1 | ||
;; | ||
arch) | ||
if [ -f "$ARCH_INSTALL" ]; then | ||
"$ARCH_INSTALL" "$1" | ||
exit 0 | ||
fi | ||
echo "Error: $ARCH_INSTALL not found!" | ||
exit 1 | ||
;; | ||
fedora) | ||
if [ -f "$FEDORA_INSTALL" ]; then | ||
"$FEDORA_INSTALL" "$1" | ||
exit 0 | ||
fi | ||
echo "Error: $FEDORA_INSTALL not found!" | ||
exit 1 | ||
;; | ||
opensuse|sles) | ||
if [ -f "$SUSE_INSTALL" ]; then | ||
"$SUSE_INSTALL" "$1" | ||
exit 0 | ||
fi | ||
echo "Error: $SUSE_INSTALL not found!" | ||
exit 1 | ||
;; | ||
esac | ||
fi | ||
|
||
# No match, display error | ||
echo "Error: Unsupported distribution. Only Debian, Arch, Fedora, and SUSE are supported." | ||
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env bash | ||
echo "suse-based distro detected" | ||
PYTHON=$1 | ||
|
||
# Check for $PYTHON | ||
if ! zypper info "$PYTHON" &> /dev/null; then | ||
echo "$PYTHON not found. Installing..." | ||
sudo zypper install -y "$PYTHON" "$PYTHON-devel" "$PYTHON-virtualenv" | ||
fi | ||
|
||
# Check for pip | ||
if ! $PYTHON -m pip --version &> /dev/null; then | ||
echo "pip not found. Installing..." | ||
sudo zypper install -y "$PYTHON-pip" | ||
fi | ||
|
||
# Check for tkinter | ||
if ! "$PYTHON" -c "import tkinter" &> /dev/null; then | ||
echo "tkinter not found. Installing..." | ||
sudo zypper install -y "$PYTHON-tk" | ||
fi | ||
|
||
echo "Ensuring $PYTHON-virtualenv is insalled" | ||
sudo zypper install -y "$PYTHON-virtualenv" |