Files updated.
This commit is contained in:
@@ -108,6 +108,9 @@ case "$GAME" in
|
||||
done
|
||||
nmtui-connect
|
||||
;;
|
||||
"Install to Disk")
|
||||
/usr/local/bin/install_to_disk.sh
|
||||
;;
|
||||
*".md") /usr/bin/markdown -toc "$GAME" | /usr/bin/w3m -T text/html ;;
|
||||
"/usr/bin/"*) $GAME ;;
|
||||
esac
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1 @@
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+43
-18
@@ -4,11 +4,16 @@
|
||||
fex_load() {
|
||||
local gameDir="$1"
|
||||
local exeName="$2"
|
||||
export FEX_NO_SANDBOX=1
|
||||
export MESA_GL_VERSION_OVERRIDE=3.2
|
||||
export SPD_SOCKET=/run/user/1000/speech-dispatcher/speechd.sock
|
||||
pushd "$HOME/.local/games/$gameDir"
|
||||
FEX_NO_SANDBOX=1 MESA_GL_VERSION_OVERRIDE=3.2 BOX64_DYNAREC_STRONGMEM=1 DISPLAY=:0 FEXLoader ./$exeName
|
||||
if [[ "$(uname -m)" != "x86_64" ]]; then
|
||||
export FEX_NO_SANDBOX=1
|
||||
export MESA_GL_VERSION_OVERRIDE=3.2
|
||||
FEX_NO_SANDBOX=1 MESA_GL_VERSION_OVERRIDE=3.2 BOX64_DYNAREC_STRONGMEM=1 DISPLAY=:0 FEXLoader ./$exeName
|
||||
else
|
||||
export MESA_GL_VERSION_OVERRIDE=3.2
|
||||
MESA_GL_VERSION_OVERRIDE=3.2 DISPLAY=:0 ./$exeName
|
||||
fi
|
||||
popd
|
||||
}
|
||||
|
||||
@@ -18,12 +23,22 @@ run_wine() {
|
||||
local exeName="$2"
|
||||
local needNvda="${3:-}"
|
||||
pushd "$HOME/.local/games/$gameDir"
|
||||
if [[ ${#needNvda} > 1 ]]; then
|
||||
systemctl --user start ${needNvda}.service
|
||||
FEXBash -c "wine \"$exeName\""
|
||||
systemctl --user stop ${needNvda}.service
|
||||
if [[ "$(uname -m)" != "x86_64" ]]; then
|
||||
if [[ ${#needNvda} > 1 ]]; then
|
||||
systemctl --user start ${needNvda}.service
|
||||
FEXBash -c "wine \"$exeName\""
|
||||
systemctl --user stop ${needNvda}.service
|
||||
else
|
||||
FEXBash -c "wine $exeName"
|
||||
fi
|
||||
else
|
||||
FEXBash -c "wine $exeName"
|
||||
if [[ ${#needNvda} > 1 ]]; then
|
||||
systemctl --user start ${needNvda}.service
|
||||
wine "$exeName"
|
||||
systemctl --user stop ${needNvda}.service
|
||||
else
|
||||
wine "$exeName"
|
||||
fi
|
||||
fi
|
||||
popd
|
||||
}
|
||||
@@ -123,10 +138,12 @@ fi
|
||||
|
||||
[ -f /etc/xprofile ] && . /etc/xprofile
|
||||
[ -f ~/.xprofile ] && . ~/.xprofile
|
||||
export BOX64_PATH="$HOME/.fex-emu/RootFS/ArchLinux/usr/bin"
|
||||
export BOX64_NOBANNER=1
|
||||
if [[ "$(uname -m)" != "x86_64" ]]; then
|
||||
export BOX64_PATH="$HOME/.fex-emu/RootFS/ArchLinux/usr/bin"
|
||||
export BOX64_NOBANNER=1
|
||||
export BOX64_DYNAREC_STRONGMEM=1
|
||||
fi
|
||||
export MESA_GL_VERSION_OVERRIDE=3.2
|
||||
export BOX64_DYNAREC_STRONGMEM=1
|
||||
export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
|
||||
export DBUS_SESSION_BUS_PID
|
||||
exec dwm &
|
||||
@@ -178,10 +195,6 @@ case "$GAME" in
|
||||
"Brave")
|
||||
run_web "" # Runs brave without a specific URL
|
||||
;;
|
||||
"Calamares")
|
||||
orca &
|
||||
exec calamares
|
||||
;;
|
||||
"Challenge of the Horse")
|
||||
run_wine "Challenge of the Horse" "game.exe" "nvda2speechd"
|
||||
;;
|
||||
@@ -206,7 +219,11 @@ case "$GAME" in
|
||||
;;
|
||||
"Fantasy Story 2")
|
||||
pushd "/home/stormux/.local/games/Fantasy Story 2/FS2_3.0_Linux"
|
||||
FEXBash './fs2.x86_64'
|
||||
if [[ "$(uname -m)" != "x86_64" ]]; then
|
||||
FEXBash './fs2.x86_64'
|
||||
else
|
||||
'./fs2.x86_64'
|
||||
fi
|
||||
popd
|
||||
;;
|
||||
"Golf")
|
||||
@@ -287,7 +304,11 @@ case "$GAME" in
|
||||
run_wine "Super Liam" "sl.exe"
|
||||
;;
|
||||
"The Blind Swordsman")
|
||||
FEXBash -c 'wine ~/.local/games/TheBlindSwordsman.exe'
|
||||
if [[ "$(uname -m)" != "x86_64" ]]; then
|
||||
FEXBash -c 'wine ~/.local/games/TheBlindSwordsman.exe'
|
||||
else
|
||||
wine ~/.local/games/TheBlindSwordsman.exe
|
||||
fi
|
||||
;;
|
||||
"The Tornado Chicken")
|
||||
fex_load "The Tornado Chicken" "Ttc"
|
||||
@@ -306,7 +327,11 @@ case "$GAME" in
|
||||
cp ~/.local/games/nvda/nvdaControllerClient64.dll ~/.local/games/ToyMania/lib/nvdaControllerClient64.dll
|
||||
systemctl --user start nvda2speechd-important.service
|
||||
pushd ~/.local/games/ToyMania
|
||||
exec FEXBash -c 'wine ./tm.exe'
|
||||
if [[ "$(uname -m)" != "x86_64" ]]; then
|
||||
exec FEXBash -c 'wine ./tm.exe'
|
||||
else
|
||||
exec wine ./tm.exe
|
||||
fi
|
||||
popd
|
||||
systemctl --user stop nvda2speechd-important.service
|
||||
else
|
||||
|
||||
@@ -913,7 +913,7 @@ if __name__ == "__main__":
|
||||
# Add installer only on x86_64
|
||||
import platform
|
||||
if platform.machine() == "x86_64":
|
||||
menu.add_item("System", "Install System to Hard Drive", "GAME=Calamares startx")
|
||||
menu.add_item("System", "Install System to Hard Drive", "GAME='Install to Disk' /home/stormux/.clirc")
|
||||
|
||||
menu.add_item("System", "Internet Configuration", "GAME=\"Network Configuration\" /home/stormux/.clirc")
|
||||
menu.add_item("System", "Use HDMI Screen", lambda: menu.toggle_screen("screen"))
|
||||
|
||||
@@ -0,0 +1,194 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Stormux Gaming Image Disk Installer
|
||||
# WARNING: This will completely wipe the selected disk!
|
||||
|
||||
set -e
|
||||
|
||||
# Function to print messages
|
||||
print_message() {
|
||||
echo "$1"
|
||||
}
|
||||
|
||||
# Function to get user confirmation
|
||||
get_confirmation() {
|
||||
local prompt="$1"
|
||||
local required_response="$2"
|
||||
local response
|
||||
|
||||
while true; do
|
||||
print_message "$prompt"
|
||||
read -r response
|
||||
if [[ "$response" == "$required_response" ]]; then
|
||||
return 0
|
||||
else
|
||||
print_message "Response must be exactly: $required_response"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# Function to detect available disks
|
||||
detect_disks() {
|
||||
local disks=()
|
||||
|
||||
# Find all block devices that are disks (not partitions)
|
||||
while IFS= read -r disk; do
|
||||
# Skip if it's a partition, loop device, or CD-ROM
|
||||
if [[ ! "$disk" =~ [0-9]$ ]] && [[ ! "$disk" =~ ^/dev/loop ]] && [[ ! "$disk" =~ ^/dev/sr ]]; then
|
||||
# Check if it's actually a disk
|
||||
if [[ -b "$disk" ]]; then
|
||||
disks+=("$disk")
|
||||
fi
|
||||
fi
|
||||
done < <(lsblk -dpno NAME 2>/dev/null)
|
||||
|
||||
printf '%s\n' "${disks[@]}"
|
||||
}
|
||||
|
||||
# Function to get disk size
|
||||
get_disk_size() {
|
||||
local disk="$1"
|
||||
lsblk -dpno SIZE "$disk" 2>/dev/null | tr -d ' '
|
||||
}
|
||||
|
||||
# Function to get disk model
|
||||
get_disk_model() {
|
||||
local disk="$1"
|
||||
lsblk -dpno MODEL "$disk" 2>/dev/null | tr -d ' ' || echo "Unknown"
|
||||
}
|
||||
|
||||
# Check if running as root
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
print_message "This script must be run as root."
|
||||
print_message "Please run: sudo $0"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Welcome message
|
||||
print_message ""
|
||||
print_message "=== Stormux Gaming Image Installer ==="
|
||||
print_message "WARNING: This installer will COMPLETELY WIPE the selected disk!"
|
||||
print_message "All data on the target disk will be permanently lost."
|
||||
|
||||
# Detect available disks
|
||||
print_message ""
|
||||
print_message "Detecting available disks..."
|
||||
mapfile -t available_disks < <(detect_disks)
|
||||
|
||||
if [[ ${#available_disks[@]} -eq 0 ]]; then
|
||||
print_message "No suitable disks found!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Display available disks
|
||||
print_message ""
|
||||
print_message "Available disks:"
|
||||
for i in "${!available_disks[@]}"; do
|
||||
disk="${available_disks[$i]}"
|
||||
size=$(get_disk_size "$disk")
|
||||
model=$(get_disk_model "$disk")
|
||||
print_message "$((i+1)). $disk - $size - $model" "$((i+1)). $disk - $size - $model"
|
||||
done
|
||||
|
||||
# Get disk selection
|
||||
while true; do
|
||||
print_message ""
|
||||
print_message "Enter the number of the disk to install to:"
|
||||
read -r selection
|
||||
|
||||
if [[ "$selection" =~ ^[0-9]+$ ]] && [[ "$selection" -ge 1 ]] && [[ "$selection" -le ${#available_disks[@]} ]]; then
|
||||
selected_disk="${available_disks[$((selection-1))]}"
|
||||
break
|
||||
else
|
||||
print_message "Invalid selection. Please enter a number between 1 and ${#available_disks[@]}."
|
||||
fi
|
||||
done
|
||||
|
||||
# Final confirmation
|
||||
selected_size=$(get_disk_size "$selected_disk")
|
||||
selected_model=$(get_disk_model "$selected_disk")
|
||||
|
||||
print_message ""
|
||||
print_message "FINAL WARNING:"
|
||||
print_message "You have selected: $selected_disk ($selected_size, $selected_model)"
|
||||
print_message "ALL DATA ON THIS DISK WILL BE PERMANENTLY DESTROYED!"
|
||||
|
||||
get_confirmation "Type 'DESTROY ALL DATA' to continue (case sensitive): " "DESTROY ALL DATA"
|
||||
|
||||
print_message ""
|
||||
print_message "Starting installation to $selected_disk..."
|
||||
|
||||
# Unmount any existing partitions on the target disk
|
||||
print_message "Unmounting any existing partitions..."
|
||||
umount "${selected_disk}"* 2>/dev/null || true
|
||||
|
||||
# Create partition table and partitions
|
||||
print_message "Creating partition table..."
|
||||
parted -s "$selected_disk" mklabel gpt
|
||||
parted -s "$selected_disk" mkpart primary fat32 1MiB 513MiB
|
||||
parted -s "$selected_disk" set 1 esp on
|
||||
parted -s "$selected_disk" mkpart primary ext4 513MiB 100%
|
||||
|
||||
# Get partition names
|
||||
if [[ "$selected_disk" =~ nvme|mmcblk ]]; then
|
||||
boot_partition="${selected_disk}p1"
|
||||
root_partition="${selected_disk}p2"
|
||||
else
|
||||
boot_partition="${selected_disk}1"
|
||||
root_partition="${selected_disk}2"
|
||||
fi
|
||||
|
||||
# Format partitions
|
||||
print_message "Formatting partitions..."
|
||||
mkfs.fat -F32 "$boot_partition"
|
||||
mkfs.ext4 -F "$root_partition"
|
||||
|
||||
# Create mount points and mount
|
||||
mkdir -p /mnt/stormux-install
|
||||
mount "$root_partition" /mnt/stormux-install
|
||||
mkdir -p /mnt/stormux-install/boot
|
||||
mount "$boot_partition" /mnt/stormux-install/boot
|
||||
|
||||
# Copy system files
|
||||
print_message "Copying system files... This may take several minutes."
|
||||
if [[ -f /run/archiso/img_dev ]]; then
|
||||
# Extract from squashfs
|
||||
unsquashfs -f -d /mnt/stormux-install /run/archiso/sfs/airootfs/airootfs.sfs
|
||||
else
|
||||
# Fallback: copy from live system
|
||||
rsync -aHAXS --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} / /mnt/stormux-install/
|
||||
fi
|
||||
|
||||
# Configure for installed system
|
||||
print_message "Configuring system for installed boot..."
|
||||
|
||||
# Remove live-specific files and services
|
||||
rm -f /mnt/stormux-install/etc/systemd/system/getty@tty1.service.d/autologin.conf
|
||||
rm -f /mnt/stormux-install/etc/systemd/system/multi-user.target.wants/choose-mirror.service
|
||||
rm -rf /mnt/stormux-install/etc/systemd/system/etc-pacman.d-gnupg.mount
|
||||
|
||||
# Generate fstab
|
||||
genfstab -U /mnt/stormux-install >> /mnt/stormux-install/etc/fstab
|
||||
|
||||
# Install and configure GRUB
|
||||
print_message "Installing bootloader..."
|
||||
arch-chroot /mnt/stormux-install grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=stormux
|
||||
arch-chroot /mnt/stormux-install grub-mkconfig -o /boot/grub/grub.cfg
|
||||
|
||||
# Set hostname
|
||||
echo "stormux-gaming" > /mnt/stormux-install/etc/hostname
|
||||
|
||||
# Enable necessary services
|
||||
arch-chroot /mnt/stormux-install systemctl enable NetworkManager
|
||||
arch-chroot /mnt/stormux-install systemctl enable pipewire pipewire-pulse
|
||||
arch-chroot /mnt/stormux-install systemctl enable speech-dispatcher
|
||||
arch-chroot /mnt/stormux-install systemctl enable fenrirscreenreader
|
||||
|
||||
# Cleanup
|
||||
umount -R /mnt/stormux-install
|
||||
rmdir /mnt/stormux-install
|
||||
|
||||
print_message ""
|
||||
print_message "Installation completed successfully!"
|
||||
print_message "You can now reboot and remove the installation media."
|
||||
print_message "The system will boot directly into the Stormux Gaming environment."
|
||||
Reference in New Issue
Block a user