From 3df50177665a780b46db059a150d4c9b8bd2f99a Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Mon, 24 Nov 2025 01:48:18 -0500 Subject: [PATCH] Lots of improvements to the installer for x86_64. --- x86_64/airootfs/usr/local/bin/install-stormux | 497 ++++++++++-------- 1 file changed, 278 insertions(+), 219 deletions(-) diff --git a/x86_64/airootfs/usr/local/bin/install-stormux b/x86_64/airootfs/usr/local/bin/install-stormux index 73e23f2..1024f7c 100755 --- a/x86_64/airootfs/usr/local/bin/install-stormux +++ b/x86_64/airootfs/usr/local/bin/install-stormux @@ -19,6 +19,9 @@ declare -a userPasswords=() declare -a userIsAdmin=() desktopEnvironment="" # "none", "i3", "mate" timezone="" +enableSsh="no" # "yes" or "no" +installLinuxGameManager="no" # "yes" or "no" +installAudiogameManager="no" # "yes" or "no" # @@ -41,24 +44,9 @@ log_info() { # Audio feedback functions # -play_sound() { - local soundType="$1" - case "$soundType" in - error) - play -qV0 "|sox -n -p synth saw E2 fade 0 0.25 0.05" "|sox -n -p synth saw E2 fade 0 0.25 0.05" norm -15 2>/dev/null || true - ;; - question) - play -qnV0 synth 3 pluck D3 pluck A3 pluck D4 pluck F4 pluck A4 delay 0 .1 .2 .3 .4 remix - chorus 0.9 0.9 38 0.75 0.3 0.5 -t 2>/dev/null || true - ;; - *) - ;; - esac -} - -speak() { - if command -v espeak-ng >/dev/null 2>&1; then - espeak-ng "$*" 2>/dev/null || true - fi +play_success_sound() { + # Play a pleasant sound when installation completes successfully + play -qnV0 synth 3 pluck D3 pluck A3 pluck D4 pluck F4 pluck A4 delay 0 .1 .2 .3 .4 remix - chorus 0.9 0.9 38 0.75 0.3 0.5 -t 2>/dev/null || true } # @@ -69,38 +57,29 @@ check_root() { log_info "Checking for root privileges..." if [[ $EUID -ne 0 ]]; then log_error "This script must be run as root" - echo "ERROR: This script must be run as root. Please use: sudo install-stormux" - play_sound error exit 1 fi log_info "Root check passed" } detect_boot_mode() { - log_info "Detecting boot mode..." if [[ -d /sys/firmware/efi ]]; then bootMode="uefi" log_info "Detected UEFI boot mode" - echo "Detected UEFI boot mode" else bootMode="bios" log_info "Detected BIOS boot mode" - echo "Detected BIOS boot mode" fi } check_internet() { log_info "Checking internet connectivity..." - echo "Checking internet connectivity..." if ping -c 1 -W 5 archlinux.org >/dev/null 2>&1; then log_info "Internet connection verified" - echo "Internet connection: OK" return 0 else log_error "No internet connection detected" - echo "ERROR: No internet connection detected." - echo "Please configure network (use 'nmtui' for NetworkManager) and try again." - play_sound error + log_error "Please configure network (use 'nmtui' for NetworkManager) and try again" return 1 fi } @@ -118,19 +97,15 @@ check_required_tools() { if [[ ${#missing[@]} -gt 0 ]]; then log_error "Missing required tools: ${missing[*]}" - echo "ERROR: Missing required tools: ${missing[*]}" - play_sound error return 1 fi log_info "All required tools present" - echo "All required tools: OK" return 0 } preflight_checks() { - echo "=== Stormux Installer - Pre-flight Checks ===" - echo "" + log_info "=== Stormux Installer - Pre-flight Checks ===" check_root detect_boot_mode @@ -140,9 +115,7 @@ preflight_checks() { return 1 fi - echo "" - echo "All pre-flight checks passed!" - echo "" + log_info "All pre-flight checks passed" return 0 } @@ -160,23 +133,18 @@ select_disk() { local prompt="$2" echo "$prompt" - echo "" mapfile -t disks < <(list_available_disks | awk '{print $1}') if [[ ${#disks[@]} -eq 0 ]]; then log_error "No suitable disks found for installation" - echo "ERROR: No suitable disks found for installation" - play_sound error return 1 fi # Display disk information - echo "Available disks:" + log "Available disks:" lsblk -dno NAME,SIZE,TYPE,MODEL | grep -E "^($(IFS='|'; echo "${disks[*]}")).*disk" || true - echo "" - play_sound question PS3="Enter disk number: " select diskChoice in "${disks[@]}" "Cancel"; do if [[ "$diskChoice" == "Cancel" ]]; then @@ -185,7 +153,6 @@ select_disk() { elif [[ -n "$diskChoice" ]]; then eval "$diskVar=\"/dev/$diskChoice\"" log_info "Selected disk: /dev/$diskChoice" - echo "Selected: /dev/$diskChoice" return 0 fi done @@ -193,16 +160,14 @@ select_disk() { confirm_disk_destruction() { local disk="$1" - echo "" - echo "WARNING: ALL DATA ON $disk WILL BE DESTROYED!" - echo "" + log "" + log "WARNING: ALL DATA ON $disk WILL BE DESTROYED!" + log "" # Show current partition layout - echo "Current partition layout:" + log "Current partition layout:" lsblk "$disk" || true - echo "" - play_sound error echo "Type 'YES' (in capital letters) to confirm destruction of $disk:" read -r confirmation @@ -211,7 +176,6 @@ confirm_disk_destruction() { return 0 else log_info "Disk destruction not confirmed" - echo "Operation cancelled." return 1 fi } @@ -221,11 +185,10 @@ confirm_disk_destruction() { # select_partition_layout() { - echo "" - echo "=== Partition Layout Selection ===" - echo "" - echo "Choose your partition layout:" - echo "" + log "" + log "=== Partition Layout Selection ===" + log "" + log "Choose your partition layout:" local layouts=( "Single partition (root only, /home in root partition)" @@ -234,7 +197,6 @@ select_partition_layout() { "Cancel" ) - play_sound question PS3="Enter layout number: " select layout in "${layouts[@]}"; do case "$layout" in @@ -438,9 +400,7 @@ partition_disk_bios_home_only() { } partition_disks() { - echo "" - echo "=== Partitioning Disks ===" - echo "" + log_info "=== Partitioning Disks ===" # Wait for kernel to update device nodes sleep 2 @@ -481,7 +441,6 @@ partition_disks() { fi sleep 2 - echo "Partitioning complete!" log_info "Partitioning complete" } @@ -502,9 +461,7 @@ get_partition_device() { } create_filesystems() { - echo "" - echo "=== Creating Filesystems ===" - echo "" + log_info "=== Creating Filesystems ===" local rootPart local homePart @@ -515,39 +472,32 @@ create_filesystems() { rootPart=$(get_partition_device "$targetDisk" 2) log_info "Creating EFI filesystem on $efiPart" - echo "Creating EFI filesystem..." mkfs.vfat -F32 "$efiPart" else rootPart=$(get_partition_device "$targetDisk" 1) fi log_info "Creating root filesystem on $rootPart" - echo "Creating root filesystem..." mkfs.ext4 -F "$rootPart" case "$partitionLayout" in separate_home) homePart=$(get_partition_device "$targetDisk" 3) log_info "Creating home filesystem on $homePart" - echo "Creating home filesystem..." mkfs.ext4 -F "$homePart" ;; separate_disk) homePart=$(get_partition_device "$homeDisk" 1) log_info "Creating home filesystem on $homePart" - echo "Creating home filesystem..." mkfs.ext4 -F "$homePart" ;; esac - echo "Filesystems created!" log_info "Filesystems created successfully" } mount_filesystems() { - echo "" - echo "=== Mounting Filesystems ===" - echo "" + log_info "=== Mounting Filesystems ===" local rootPart local homePart @@ -563,14 +513,12 @@ mount_filesystems() { # Mount root log_info "Mounting root partition $rootPart to $mountPoint" - echo "Mounting root partition..." mkdir -p "$mountPoint" mount "$rootPart" "$mountPoint" # Mount EFI if UEFI if [[ "$bootMode" == "uefi" ]]; then log_info "Mounting EFI partition $efiPart to $mountPoint/boot" - echo "Mounting EFI partition..." mkdir -p "$mountPoint/boot" mount "$efiPart" "$mountPoint/boot" fi @@ -580,20 +528,17 @@ mount_filesystems() { separate_home) homePart=$(get_partition_device "$targetDisk" 3) log_info "Mounting home partition $homePart to $mountPoint/home" - echo "Mounting home partition..." mkdir -p "$mountPoint/home" mount "$homePart" "$mountPoint/home" ;; separate_disk) homePart=$(get_partition_device "$homeDisk" 1) log_info "Mounting home partition $homePart to $mountPoint/home" - echo "Mounting home partition..." mkdir -p "$mountPoint/home" mount "$homePart" "$mountPoint/home" ;; esac - echo "Filesystems mounted!" log_info "Filesystems mounted successfully" } @@ -602,49 +547,37 @@ mount_filesystems() { # gather_system_info() { - echo "" - echo "=== System Configuration ===" - echo "" + log_info "=== System Configuration ===" # Hostname - play_sound question read -rp "Enter hostname for the new system: " hostname log_info "Hostname set to: $hostname" # Root password - echo "" while true; do - play_sound question read -rsp "Enter root password: " rootPassword - echo "" read -rsp "Confirm root password: " rootPasswordConfirm - echo "" if [[ "$rootPassword" == "$rootPasswordConfirm" ]]; then log_info "Root password set" break else echo "Passwords do not match. Please try again." - play_sound error fi done # User accounts (loop until empty username) - echo "" - echo "=== User Account Setup ===" + log_info "=== User Account Setup ===" echo "Press Enter without typing a username when done adding users." - echo "" local userCount=0 while true; do - play_sound question read -rp "Enter username (or press Enter to finish): " currentUser # If empty, break out of loop if [[ -z "$currentUser" ]]; then if [[ $userCount -eq 0 ]]; then echo "ERROR: You must create at least one user account." - play_sound error continue else log_info "Finished adding users. Total: $userCount" @@ -657,7 +590,6 @@ gather_system_info() { for existingUser in "${userNames[@]}"; do if [[ "$existingUser" == "$currentUser" ]]; then echo "ERROR: Username '$currentUser' already added." - play_sound error userExists=true break fi @@ -672,15 +604,12 @@ gather_system_info() { local currentPasswordConfirm while true; do read -rsp "Enter password for $currentUser: " currentPassword - echo "" read -rsp "Confirm password for $currentUser: " currentPasswordConfirm - echo "" if [[ "$currentPassword" == "$currentPasswordConfirm" ]]; then break else echo "Passwords do not match. Please try again." - play_sound error fi done @@ -704,18 +633,14 @@ gather_system_info() { userCount=$((userCount + 1)) log_info "Added user: $currentUser" - echo "" done - echo "" echo "Users to be created: ${userNames[*]}" - echo "" # Desktop environment echo "Select desktop environment:" local desktops=("Console only (Fenrir screen reader)" "i3 (tiling window manager)" "MATE (traditional desktop)") - play_sound question PS3="Enter desktop number: " select desktop in "${desktops[@]}"; do case "$desktop" in @@ -737,8 +662,40 @@ gather_system_info() { esac done + # Game manager installation (only if desktop environment selected) + if [[ "$desktopEnvironment" != "none" ]]; then + echo "=== Optional Game Managers ===" + + read -rp "Install linux-game-manager (native Linux games)? [y/N]: " lgmChoice + if [[ "$lgmChoice" =~ ^[Yy]$ ]]; then + installLinuxGameManager="yes" + log_info "Linux Game Manager will be installed" + else + installLinuxGameManager="no" + log_info "Linux Game Manager will not be installed" + fi + + read -rp "Install audiogame-manager (Windows games via Wine)? [y/N]: " agmChoice + if [[ "$agmChoice" =~ ^[Yy]$ ]]; then + installAudiogameManager="yes" + log_info "Audiogame Manager will be installed" + else + installAudiogameManager="no" + log_info "Audiogame Manager will not be installed" + fi + fi + + # SSH configuration + read -rp "Enable SSH server (sshd) on boot? [y/N]: " sshChoice + if [[ "$sshChoice" =~ ^[Yy]$ ]]; then + enableSsh="yes" + log_info "SSH server will be enabled" + else + enableSsh="no" + log_info "SSH server will not be enabled" + fi + # Timezone detection - echo "" # Try to get current timezone from timedatectl if command -v timedatectl >/dev/null 2>&1; then @@ -760,15 +717,13 @@ gather_system_info() { log_info "Timezone set to: $timezone" - echo "" echo "Configuration summary:" echo " Hostname: $hostname" echo " Users: ${userNames[*]}" echo " Desktop: $desktopEnvironment" + echo " SSH enabled: $enableSsh" echo " Timezone: $timezone" - echo "" - play_sound question read -rp "Press Enter to continue with installation..." } @@ -777,13 +732,11 @@ gather_system_info() { # install_base_system() { - echo "" - echo "=== Installing Base System ===" - echo "" + log_info "=== Installing Base System ===" # Copy pacman config with Stormux repo log_info "Configuring pacman with Stormux repository" - echo "Configuring package manager..." + log_info "Configuring package manager" # Copy pacman.conf from live system if [[ -f /etc/pacman.conf ]]; then @@ -801,6 +754,7 @@ install_base_system() { local basePackages=( base base-devel linux linux-firmware networkmanager sudo dialog git rsync wget + bash-completion cronie openssh ) local audioPackages=( @@ -815,22 +769,46 @@ install_base_system() { ) local utilityPackages=( - vim nano htop - arch-install-scripts + vim nano screen magic-wormhole + man man-pages + xdg-user-dirs xdg-utils + poppler socat parted + realtime-privileges + ) + + # Stormux-specific packages (installed later in chroot after keyring setup) + # Note: NOT local so it's available in configure_system() + stormuxPackages=( + yay w3m-git ) # Combine all packages local allPackages=("${basePackages[@]}" "${audioPackages[@]}" "${accessibilityPackages[@]}" "${utilityPackages[@]}") + # Add wine packages for audiogame-manager + if [[ "$installAudiogameManager" == "yes" ]]; then + local winePackages=( + wine winetricks wine_gecko wine-mono + cabextract dos2unix translate-shell + gst-plugins-bad gst-plugins-good gst-plugins-ugly gst-libav + ) + allPackages+=("${winePackages[@]}") + log_info "Adding wine packages for audiogame-manager" + fi + # Add desktop-specific packages case "$desktopEnvironment" in i3) - allPackages+=(i3-wm xlibre-server xlibre-input-libinput nodm-dgw xclip) - allPackages+=(clipster discount jq libnotify xfce4-notifyd pamixer playerctl) + allPackages+=(i3-wm xclip) + allPackages+=(discount jq libnotify xfce4-notifyd pamixer playerctl) allPackages+=(python-i3ipc python-wxpython sox yad) + # Add Stormux-specific i3 packages + stormuxPackages+=(xlibre-server xlibre-input-libinput nodm-dgw) ;; mate) - allPackages+=(mate mate-extra orca xlibre-server xlibre-input-libinput lightdm lightdm-gtk-greeter) + allPackages+=(mate mate-extra orca lightdm lightdm-gtk-greeter) + # Add Stormux-specific MATE packages + stormuxPackages+=(xlibre-server xlibre-input-libinput) ;; esac @@ -840,24 +818,21 @@ install_base_system() { fi log_info "Installing packages: ${allPackages[*]}" - echo "Installing packages (this may take several minutes)..." - echo "" + log_info "Installing packages (this may take several minutes)" # Run pacstrap if ! pacstrap "$mountPoint" "${allPackages[@]}"; then log_error "pacstrap failed" - echo "ERROR: Package installation failed" - play_sound error + log_error "Package installation failed" return 1 fi # Generate fstab log_info "Generating fstab" - echo "Generating fstab..." + log_info "Generating fstab" genfstab -U "$mountPoint" > "$mountPoint/etc/fstab" - echo "" - echo "Base system installed!" + log_info "Base system installed" log_info "Base system installation complete" } @@ -866,9 +841,7 @@ install_base_system() { # install_audio_configs() { - echo "" - echo "=== Configuring Audio for Accessibility ===" - echo "" + log_info "=== Configuring Audio for Accessibility ===" # System-wide wireplumber configs log_info "Installing wireplumber system configs" @@ -987,7 +960,6 @@ default-server = unix:/tmp/pulse.sock autospawn = no EOF - echo "Audio configuration complete!" log_info "Audio configuration installed" } @@ -996,21 +968,61 @@ EOF # configure_system() { - echo "" - echo "=== Configuring System ===" - echo "" + log_info "=== Configuring System ===" log_info "Entering chroot to configure system" - # Create configuration script to run in chroot - cat > "$mountPoint/tmp/configure.sh" </dev/null || true +" + fi + + # Run configuration in chroot using heredoc (like pi4 script) + if ! arch-chroot "$mountPoint" /bin/bash < /etc/locale.conf echo "${hostname}" > /etc/hostname # Configure hosts file -cat > /etc/hosts < /etc/hosts < /etc/vconsole.conf # Configure environment variables for accessibility -cat > /etc/environment < /etc/environment </dev/null || true +# Note: realtime group is created by realtime-privileges package -# Create users -for i in "\${!userNames[@]}"; do - username="\${userNames[\$i]}" - password="\${userPasswords[\$i]}" - admin="\${userIsAdmin[\$i]}" - - # Determine groups based on admin status - if [[ "\$admin" == "yes" ]]; then - useradd -m -g users -G wheel,realtime,audio,video,network,brlapi -s /bin/bash "\$username" - else - useradd -m -g users -G realtime,audio,video,network,brlapi -s /bin/bash "\$username" - fi - - # Set password - echo "\$username:\$password" | chpasswd - - # Enable linger for user (critical for pipewire) - mkdir -p /var/lib/systemd/linger - touch /var/lib/systemd/linger/\$username - - echo "Created user: \$username" -done +# Create users (commands built dynamically before chroot) +$userCreationCommands # Set root password echo "root:${rootPassword}" | chpasswd @@ -1079,14 +1070,29 @@ chmod 440 /etc/sudoers.d/wheel # Enable pipewire globally systemctl --global enable pipewire.service pipewire-pulse.service +# Configure pipewire for Fenrir screen reader +if [[ -x /usr/share/fenrirscreenreader/tools/configure_pipewire.sh ]]; then + /usr/share/fenrirscreenreader/tools/configure_pipewire.sh +fi + +# Disable systemd-networkd in favor of NetworkManager +systemctl disable systemd-networkd.service systemd-networkd.socket 2>/dev/null || true + # Enable system services systemctl enable NetworkManager.service systemctl enable brltty.path systemctl enable fenrirscreenreader.service +systemctl enable cronie.service # Enable bluetooth if present systemctl enable bluetooth.service 2>/dev/null || true +# Enable SSH if requested +if [[ "${enableSsh}" == "yes" ]]; then + systemctl enable sshd.service + echo "SSH server enabled" +fi + # Enable display manager based on desktop environment if [[ "${desktopEnvironment}" == "i3" ]] || [[ "${desktopEnvironment}" == "mate" ]]; then # Configure nodm for automatic login @@ -1193,6 +1199,9 @@ fi pacman-key --recv-keys 73580DE2EDDFA6D6 2>/dev/null || true pacman-key --lsign-key 73580DE2EDDFA6D6 2>/dev/null || true +# Install Stormux-specific packages (built dynamically before chroot) +$stormuxPackagesCmd + # Create system-wide accessibility configuration cat > /etc/profile.d/stormux-accessibility.sh <<'PROFILE_EOF' #!/bin/sh @@ -1211,24 +1220,13 @@ export DIALOGOPTS='--no-lines --visit-items' PROFILE_EOF chmod 755 /etc/profile.d/stormux-accessibility.sh -echo "System configuration complete!" -CHROOT_SCRIPT - - chmod +x "$mountPoint/tmp/configure.sh" - - # Run configuration in chroot - echo "Configuring system (this may take a moment)..." - if ! arch-chroot "$mountPoint" /tmp/configure.sh; then +echo "System configuration complete" +EOF + then log_error "System configuration failed" - echo "ERROR: System configuration failed" - play_sound error return 1 fi - # Clean up - rm "$mountPoint/tmp/configure.sh" - - echo "System configuration complete!" log_info "System configuration complete" } @@ -1237,13 +1235,11 @@ CHROOT_SCRIPT # install_bootloader() { - echo "" - echo "=== Installing Bootloader ===" - echo "" + log_info "=== Installing Bootloader ===" if [[ "$bootMode" == "uefi" ]]; then log_info "Installing systemd-boot for UEFI" - echo "Installing systemd-boot..." + log_info "Installing systemd-boot" # Install systemd-boot arch-chroot "$mountPoint" bootctl install @@ -1275,7 +1271,7 @@ EOF else log_info "Installing GRUB for BIOS" - echo "Installing GRUB..." + log_info "Installing GRUB" # Install GRUB to disk arch-chroot "$mountPoint" grub-install --target=i386-pc "$targetDisk" @@ -1294,9 +1290,7 @@ EOF # install_helper_scripts() { - echo "" - echo "=== Installing Helper Scripts ===" - echo "" + log_info "=== Installing Helper Scripts ===" log_info "Installing configure-stormux script" @@ -1321,43 +1315,109 @@ EOF log_info "configure-stormux stub created" fi - echo "Helper scripts installed!" + log_info "Helper scripts installed" log_info "Helper scripts installation complete" } +install_game_managers() { + # Only run if at least one game manager is selected + if [[ "$installLinuxGameManager" == "no" && "$installAudiogameManager" == "no" ]]; then + return 0 + fi + + log_info "=== Installing Game Managers ===" + + # Create games group if it doesn't exist + log_info "Creating games group in chroot" + arch-chroot "$mountPoint" groupadd -f games + + # Install linux-game-manager + if [[ "$installLinuxGameManager" == "yes" ]]; then + log_info "Installing linux-game-manager to /opt" + log_info "Installing linux-game-manager" + + # Clone repository + git clone https://git.stormux.org/storm/linux-game-manager "$mountPoint/opt/linux-game-manager" + + # Set ownership to root:games with group-writable permissions + chown -R root:games "$mountPoint/opt/linux-game-manager" + chmod -R 775 "$mountPoint/opt/linux-game-manager" + # Set setgid bit so new files inherit games group + find "$mountPoint/opt/linux-game-manager" -type d -exec chmod g+s {} \; + + # Create launcher script + cat > "$mountPoint/usr/local/bin/linux-game-manager" <<'EOF' +#!/usr/bin/env bash +cd /opt/linux-game-manager || exit 1 +git pull --quiet 2>/dev/null || true +./linux-game-manager.sh "$@" +EOF + chmod 755 "$mountPoint/usr/local/bin/linux-game-manager" + + log_info "linux-game-manager installed successfully" + echo "linux-game-manager installed to /opt/linux-game-manager" + fi + + # Install audiogame-manager + if [[ "$installAudiogameManager" == "yes" ]]; then + log_info "Installing audiogame-manager to /opt" + log_info "Installing audiogame-manager" + + # Clone repository + git clone https://git.stormux.org/storm/audiogame-manager "$mountPoint/opt/audiogame-manager" + + # Set ownership to root:games with group-writable permissions + chown -R root:games "$mountPoint/opt/audiogame-manager" + chmod -R 775 "$mountPoint/opt/audiogame-manager" + # Set setgid bit so new files inherit games group + find "$mountPoint/opt/audiogame-manager" -type d -exec chmod g+s {} \; + + # Create launcher script + cat > "$mountPoint/usr/local/bin/audiogame-manager" <<'EOF' +#!/usr/bin/env bash +cd /opt/audiogame-manager || exit 1 +git pull --quiet 2>/dev/null || true +./audiogame-manager.sh "$@" +EOF + chmod 755 "$mountPoint/usr/local/bin/audiogame-manager" + + log_info "audiogame-manager installed successfully" + echo "audiogame-manager installed to /opt/audiogame-manager" + fi + + log_info "Game managers installed" + log_info "Game manager installation complete" +} + # # Cleanup and finalization # cleanup_and_unmount() { - echo "" - echo "=== Finalizing Installation ===" - echo "" + log_info "=== Finalizing Installation ===" log_info "Syncing filesystems" - echo "Syncing filesystems..." + log_info "Syncing filesystems" sync log_info "Unmounting filesystems" - echo "Unmounting filesystems..." + log_info "Unmounting filesystems" # Unmount in reverse order umount -R "$mountPoint" 2>/dev/null || true log_info "Installation cleanup complete" - echo "Cleanup complete!" + log_info "Cleanup complete" } # # Main installation flow # -echo "" echo "╔════════════════════════════════════════════╗" echo "║ Stormux Installer for Arch Linux ║" echo "║ Accessibility-First System Installation ║" echo "╚════════════════════════════════════════════╝" -echo "" log_info "=== Stormux Installer Started ===" log_info "Installation log: $logFile" @@ -1369,11 +1429,9 @@ if ! preflight_checks; then fi # Disk selection -echo "=== Disk Selection ===" -echo "" +log_info "=== Disk Selection ===" if ! select_disk targetDisk "Select target disk for Stormux installation:"; then log_error "Target disk selection cancelled" - echo "Installation cancelled." exit 1 fi @@ -1386,16 +1444,13 @@ fi # Partition layout selection if ! select_partition_layout; then log_error "Partition layout selection cancelled" - echo "Installation cancelled." exit 1 fi # If separate disk layout, select home disk if [[ "$partitionLayout" == "separate_disk" ]]; then - echo "" if ! select_disk homeDisk "Select disk for /home partition:"; then log_error "Home disk selection cancelled" - echo "Installation cancelled." exit 1 fi @@ -1416,7 +1471,6 @@ fi if ! partition_disks; then log_error "Disk partitioning failed" echo "ERROR: Disk partitioning failed" - play_sound error exit 1 fi @@ -1424,7 +1478,6 @@ fi if ! create_filesystems; then log_error "Filesystem creation failed" echo "ERROR: Filesystem creation failed" - play_sound error exit 1 fi @@ -1432,7 +1485,6 @@ fi if ! mount_filesystems; then log_error "Filesystem mounting failed" echo "ERROR: Filesystem mounting failed" - play_sound error exit 1 fi @@ -1469,33 +1521,40 @@ if ! install_helper_scripts; then log_warning "Helper script installation had issues (non-fatal)" fi +# Install game managers +if ! install_game_managers; then + log_warning "Game manager installation had issues (non-fatal)" +fi + # Cleanup and unmount cleanup_and_unmount # Success message -echo "" -echo "╔════════════════════════════════════════════╗" -echo "║ Installation Complete Successfully! ║" -echo "╚════════════════════════════════════════════╝" -echo "" -echo "Next steps:" -echo " 1. Remove the installation media" -echo " 2. Reboot your system" -echo " 3. Log in with one of your user accounts: ${userNames[*]}" +log_info "=== Stormux Installer Completed Successfully ===" +log "" +log "╔════════════════════════════════════════════╗" +log "║ Installation Complete Successfully! ║" +log "╚════════════════════════════════════════════╝" +log "" +log "Next steps:" +log " 1. Remove the installation media" +log " 2. Reboot your system" +log " 3. Log in with one of your user accounts: ${userNames[*]}" if [[ "$desktopEnvironment" == "i3" ]]; then - echo " 4. Your i3 desktop is configured with I38 for accessibility" - echo " - I38 source is available in ~/git/I38 for customization" - echo " - Press Alt+Shift+F1 for I38 help after login" - echo " 5. Run 'configure-stormux' for additional setup" + log " 4. Your i3 desktop is configured with I38 for accessibility" + log " - I38 source is available in ~/git/I38 for customization" + log " - Press Alt+Shift+F1 for I38 help after login" + log " 5. Run 'configure-stormux' for additional setup" else - echo " 4. Run 'configure-stormux' for additional setup" + log " 4. Run 'configure-stormux' for additional setup" fi -echo "" -echo "Installation log saved to: $logFile" -echo "" +log "" +log "Installation log saved to: $logFile" +log "" -log_info "=== Stormux Installer Completed Successfully ===" +# Play success sound +play_success_sound read -rp "Press Enter to exit..."