#!/bin/bash echo "==========================================" echo " Knoe Installer - Final Verification" echo "==========================================" echo "" # Test suite TESTS_PASSED=0 TESTS_TOTAL=0 run_test() { TESTS_TOTAL=$((TESTS_TOTAL + 1)) echo -n "[$TESTS_TOTAL] $1... " shift if "$@" > /dev/null 2>&1; then echo "✓" TESTS_PASSED=$((TESTS_PASSED + 1)) return 0 else echo "✗" return 1 fi } # Core functionality tests run_test "Installer imports" python3 -c "from knoe.ui.screens import KnoeController, get_resource_path" run_test "Ncurses modules" python3 -c "from knoe.ncurses_installer import run_ncurses_installer" run_test "Command-line interface" python3 -m knoe.ui.screens --help run_test "Makefile" make help # Resource tests run_test "Image resources" python3 -c " from pathlib import Path import sys sys.path.insert(0, str(Path.cwd())) from knoe.ui.screens import get_resource_path for img in ['img/knoeIcon.png', 'img/knoeLogo.png', 'img/knoeLogoSepia.png']: if not get_resource_path(img).exists(): sys.exit(1) " run_test "Binary executable" test -x scan/network-agent run_test "App bundle" test -d "knoe-app/dist/Knoe Tools.app" # Build system tests run_test "Spec generator" python3 scripts/generate_spec.py run_test "Icon conversion" make build/knoe.icns # Verify spec includes everything echo -n "[$((TESTS_TOTAL + 1))] Spec includes all resources... " TESTS_TOTAL=$((TESTS_TOTAL + 1)) if grep -q "knoe-app/dist/Knoe Tools.app" installer.spec && \ grep -q "scan/network-agent" installer.spec && \ grep -q "img.*img" installer.spec; then echo "✓" TESTS_PASSED=$((TESTS_PASSED + 1)) else echo "✗" fi # Summary echo "" echo "==========================================" echo " Test Results: $TESTS_PASSED/$TESTS_TOTAL passed" echo "==========================================" echo "" if [ $TESTS_PASSED -eq $TESTS_TOTAL ]; then echo "✓ All tests passed!" echo "" echo "Features ready:" echo " ✓ Ncurses terminal interface" echo " ✓ Automatic display detection" echo " ✓ Image resources embedded" echo " ✓ Binary executables embedded (network-agent)" echo " ✓ App bundles embedded (Knoe Tools.app)" echo " ✓ Build system configured" echo "" echo "Embedded resources:" echo " • Images: ~11 MB" echo " • network-agent: 6.8 MB (universal)" echo " • Knoe Tools.app: ~12 MB" echo " • Expected final size: ~50-100 MB" echo "" echo "Next steps:" echo " 1. Build: make package" echo " 2. Test: ./dist/Knoe\\ Installer.app/Contents/MacOS/knoe-installer" echo " 3. Install: cp -r 'dist/Knoe Installer.app' /Applications/" echo "" exit 0 else echo "✗ Some tests failed" exit 1 fi