Added Steam for x86_64 systems.

This commit is contained in:
Storm Dragon
2025-07-17 12:49:20 -04:00
parent 99821e3fbf
commit 964ebe0f90
3 changed files with 50 additions and 2 deletions
+4
View File
@@ -302,6 +302,10 @@ case "$GAME" in
"SoundRTS")
run_native "SoundRTS" "soundrts.py"
;;
"Steam")
orca &
exec steam -bigpicture
;;
"Super Egg Hunt")
run_wine "super egg hunt" "superegghunt.exe"
;;
+41 -2
View File
@@ -832,6 +832,10 @@ if __name__ == "__main__":
menu.add_item("Emulators", "Dosbox", "GAME=Dosbox startx")
menu.add_item("Emulators", "Game Console Menu", "/usr/local/bin/rom_launcher.py")
menu.add_item("Emulators", "Retro Arch", "GAME='Retro Arch' startx")
# Add Steam only on x86_64
if platform.machine() == "x86_64":
menu.add_item("Emulators", "Steam", "GAME='Steam' startx")
# Add MUD section
menu.add_section("MUDs")
@@ -911,9 +915,44 @@ if __name__ == "__main__":
# Add system section
menu.add_section("System")
# Add installer only on x86_64
# Add installer only on x86_64 and when running from USB
import platform
if platform.machine() == "x86_64":
import subprocess
import re
def is_running_from_usb():
try:
# Get the root device
result = subprocess.run(['findmnt', '-n', '-o', 'SOURCE', '/'],
capture_output=True, text=True)
if result.returncode != 0:
return False
root_device = result.stdout.strip()
# Extract device name without partition number
device_match = re.match(r'^(/dev/(?:sd[a-z]|nvme[0-9]n[0-9]|mmcblk[0-9]))', root_device)
if not device_match:
return False
device_name = device_match.group(1)
# Check if device is removable (USB/SD card)
try:
with open(f'/sys/block/{device_name.split("/")[-1]}/removable', 'r') as f:
removable = f.read().strip()
return removable == '1'
except:
# Fallback: check for STORMUX label (live USB indicator)
result = subprocess.run(['lsblk', '-no', 'NAME,LABEL'],
capture_output=True, text=True)
if result.returncode == 0:
return 'STORMUX' in result.stdout.upper()
return False
except:
return False
if platform.machine() == "x86_64" and is_running_from_usb():
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")
+5
View File
@@ -178,6 +178,11 @@ if sudo mount "$TARGET_ROOT_PART" "$TEMP_MOUNT" 2>/dev/null; then
# Remove any USB-specific markers
sudo rm -f "$TEMP_MOUNT/home/stormux/.firstboot" 2>/dev/null || true
# Remove STORMUX label from filesystem to prevent false USB detection
if command -v tune2fs >/dev/null 2>&1; then
sudo tune2fs -L "" "$TARGET_ROOT_PART" 2>/dev/null || true
fi
# Update any USB-specific configurations if needed
sudo umount "$TEMP_MOUNT"