diff --git a/install_minimal_xorg.sh b/install_minimal_xorg.sh new file mode 100644 index 0000000..e69de29 diff --git a/install_offline.sh b/install_offline.sh index c212712..1c9f985 100755 --- a/install_offline.sh +++ b/install_offline.sh @@ -1,187 +1,56 @@ #!/bin/bash -# Offline Installation Script for Tkinter Player -# Auto-detects architecture and uses appropriate local libraries ONLY +# Simple Offline Installation Script for Tkinter Player set -e -echo "===================================" -echo " TKINTER PLAYER OFFLINE INSTALLER" -echo "===================================" -echo "" +echo "=================================" +echo " TKINTER PLAYER OFFLINE INSTALL" +echo "=================================" -# Detect system architecture +# 1. Check architecture ARCH=$(uname -m) -echo "🔍 Detected architecture: $ARCH" +echo "Architecture: $ARCH" -# Determine which library folder to use based on architecture +# 2. Select library folder if [ "$ARCH" = "armv7l" ]; then LIBS_FOLDER="req_libraries_32bit" - ARCH_DESC="32-bit ARM (armv7l)" - echo "📦 32-bit ARM system detected" + echo "Using: 32-bit libraries" elif [ "$ARCH" = "aarch64" ]; then LIBS_FOLDER="req_libraries" - ARCH_DESC="64-bit ARM (aarch64)" - echo "📦 64-bit ARM system detected" + echo "Using: 64-bit libraries" else - echo "⚠️ Unknown architecture: $ARCH" - echo " Defaulting to 64-bit libraries..." LIBS_FOLDER="req_libraries" - ARCH_DESC="Unknown ($ARCH) - using 64-bit fallback" + echo "Using: default libraries" fi -echo "� Selected library folder: $LIBS_FOLDER" -echo "🏗️ Architecture: $ARCH_DESC" -echo "" -# Check if the selected library folder exists +# 3. Check folder exists if [ ! -d "$LIBS_FOLDER" ]; then - echo "❌ ERROR: Required library folder not found!" - echo " Missing folder: $LIBS_FOLDER" - echo "" - if [ "$ARCH" = "armv7l" ]; then - echo "💡 For 32-bit ARM systems:" - echo " 1. Run: ./download_32bit_libs.sh" - echo " 2. Make sure req_libraries_32bit/ folder exists" - else - echo "💡 For 64-bit ARM systems:" - echo " 1. Make sure req_libraries/ folder exists" - echo " 2. Run: pip download -r requirements.txt -d req_libraries/" - fi - echo "" + echo "ERROR: $LIBS_FOLDER not found!" exit 1 fi -# Verify we have wheel files in the selected folder -WHEEL_COUNT=$(ls $LIBS_FOLDER/*.whl 2>/dev/null | wc -l) -if [ "$WHEEL_COUNT" -eq 0 ]; then - echo "❌ ERROR: No wheel files found in $LIBS_FOLDER/" - echo " Please download the appropriate libraries first." - exit 1 -fi +echo "Library folder: $LIBS_FOLDER" +WHEEL_COUNT=$(ls $LIBS_FOLDER/*.whl | wc -l) +echo "Wheel files: $WHEEL_COUNT" -echo "✅ Found $WHEEL_COUNT wheel files in $LIBS_FOLDER/" - -# Check Python and pip -if ! command -v python3 &> /dev/null; then - echo "❌ Error: Python 3 is not installed!" - exit 1 -fi - -PIP_CMD="pip3" -if ! command -v pip3 &> /dev/null; then - PIP_CMD="pip" -fi - -echo "�� Environment check:" -echo " Python: $(python3 --version)" -echo " Architecture: $ARCH_DESC" - -# Count wheel files -WHEEL_COUNT=$(ls $LIBS_FOLDER/*.whl 2>/dev/null | wc -l) -echo " Wheel files: $WHEEL_COUNT in $LIBS_FOLDER/" - -# Show architecture-specific packages for verification +# 4. Create .venv echo "" -echo "🔍 Architecture-specific packages detected:" -if ls $LIBS_FOLDER/bcrypt*.whl >/dev/null 2>&1; then - BCRYPT_FILE=$(basename $(ls $LIBS_FOLDER/bcrypt*.whl | head -1)) - echo " 🔐 BCRYPT: $BCRYPT_FILE" - # Show if it's 32-bit or 64-bit specific - if [[ "$BCRYPT_FILE" == *"armv7l"* ]]; then - echo " → 32-bit ARM wheel ✅" - elif [[ "$BCRYPT_FILE" == *"aarch64"* ]]; then - echo " → 64-bit ARM wheel ✅" - fi -fi +echo "Creating .venv..." +python3 -m venv .venv -if ls $LIBS_FOLDER/pillow*.whl >/dev/null 2>&1; then - PILLOW_FILE=$(basename $(ls $LIBS_FOLDER/pillow*.whl | head -1)) - echo " 🖼️ PILLOW: $PILLOW_FILE" - if [[ "$PILLOW_FILE" == *"armv7l"* ]]; then - echo " → 32-bit ARM wheel ✅" - elif [[ "$PILLOW_FILE" == *"aarch64"* ]]; then - echo " → 64-bit ARM wheel ✅" - fi -fi - -if ls $LIBS_FOLDER/psutil*.whl >/dev/null 2>&1; then - PSUTIL_FILE=$(basename $(ls $LIBS_FOLDER/psutil*.whl | head -1)) - echo " 📊 PSUTIL: $PSUTIL_FILE" - if [[ "$PSUTIL_FILE" == *"armv7l"* ]]; then - echo " → 32-bit ARM wheel ✅" - elif [[ "$PSUTIL_FILE" == *"aarch64"* ]]; then - echo " → 64-bit ARM wheel ✅" - fi -fi -echo "" -# Ask for confirmation -read -p "🚀 Ready to install? (y/N): " -n 1 -r -echo "" -if [[ ! $REPLY =~ ^[Yy]$ ]]; then - echo "❌ Installation cancelled." - exit 1 -fi - -# Create and activate virtual environment -if [ ! -d ".venv" ]; then - echo "📁 Creating virtual environment..." - python3 -m venv .venv -fi - -echo "🔄 Activating virtual environment..." +# 5. Activate environment +echo "Activating environment..." source .venv/bin/activate -pip install --upgrade pip -# Install packages COMPLETELY OFFLINE -echo "" -echo "📦 Installing packages from $LIBS_FOLDER/ (OFFLINE ONLY)..." -echo "============================================================" -echo "🚫 Internet access: DISABLED for this installation" -echo "📁 Source: Local wheel files only" -echo "" +# 6. Upgrade pip +#echo "Upgrading pip..." +#pip install --upgrade pip -# Force completely offline installation - no internet access allowed -echo "🔧 Installing architecture-specific wheels..." +# 7. Install packages offline +echo "" +echo "Installing from $LIBS_FOLDER..." pip install --no-index --no-deps --find-links $LIBS_FOLDER/ $LIBS_FOLDER/*.whl -echo "" -echo "🔍 Verifying architecture-specific installation..." -# Test key imports to verify correct architecture packages were installed -python3 -c " -import sys -print(f'✅ Python version: {sys.version}') -print(f'✅ Platform: {sys.platform}') - -try: - import requests - print('✅ requests - Network library installed') -except ImportError as e: - print(f'❌ requests failed: {e}') - -try: - import bcrypt - print('✅ bcrypt - Encryption library installed') -except ImportError as e: - print(f'❌ bcrypt failed: {e}') - -try: - import vlc - print('✅ python-vlc - Media library installed') -except ImportError as e: - print(f'❌ python-vlc failed: {e}') - -try: - import PIL - print('✅ Pillow - Image library installed') -except ImportError as e: - print(f'❌ Pillow failed: {e}') - -try: - import psutil - print('✅ psutil - System library installed') -except ImportError as e: - print(f'❌ psutil failed: {e}') -" - echo "" echo "✅ Installation completed!" echo "" diff --git a/test_complete_offline.py b/test_complete_offline.py new file mode 100644 index 0000000..e69de29 diff --git a/test_feedback.py b/test_feedback.py new file mode 100644 index 0000000..e69de29 diff --git a/test_offline.py b/test_offline.py new file mode 100644 index 0000000..e69de29 diff --git a/test_ui_notification.py b/test_ui_notification.py new file mode 100644 index 0000000..e69de29