More files added. Updated game_launcher and apple launcher.
This commit is contained in:
@@ -152,8 +152,17 @@ class VoicedDiskMenu:
|
||||
# Clean up resources before executing the command
|
||||
self.cleanup(full_cleanup=True)
|
||||
|
||||
# Execute the command to launch the disk file
|
||||
os.system(f'export GAME="{path}" && startx')
|
||||
# Handle special boot options
|
||||
if path == "TEXTALKER_ONLY":
|
||||
# Boot with TextTalker only (original Apple 2e option)
|
||||
os.system('export GAME="Apple 2e" && startx')
|
||||
elif path.startswith("DISK_ONLY:"):
|
||||
# Boot with disk only, no TextTalker
|
||||
os.system(f'export GAME="{path}" && startx')
|
||||
else:
|
||||
# Boot with TextTalker + specified disk (default behavior)
|
||||
os.system(f'export GAME="{path}" && startx')
|
||||
|
||||
sys.exit(0) # Exit after launching
|
||||
|
||||
def speak_help(self):
|
||||
@@ -259,6 +268,9 @@ class VoicedDiskMenu:
|
||||
|
||||
def load_disks_from_directory(self, directory_path):
|
||||
"""Load disk files from the specified directory"""
|
||||
# Add special boot options first
|
||||
self.menu_items.append(("Boot with TextTalker only", "TEXTALKER_ONLY"))
|
||||
|
||||
# Expand the path (in case it contains ~)
|
||||
directory_path = os.path.expanduser(directory_path)
|
||||
|
||||
@@ -275,7 +287,7 @@ class VoicedDiskMenu:
|
||||
# Sort files alphabetically
|
||||
files.sort()
|
||||
|
||||
# Create menu items
|
||||
# Create menu items for disk files
|
||||
for file in files:
|
||||
# Get full path to the file
|
||||
file_path = os.path.join(directory_path, file)
|
||||
@@ -286,8 +298,9 @@ class VoicedDiskMenu:
|
||||
# Replace underscores with spaces for better readability
|
||||
display_name = display_name.replace('_', ' ')
|
||||
|
||||
# Add to menu items list
|
||||
self.menu_items.append((display_name, file_path))
|
||||
# Add both TextTalker + disk and disk-only options
|
||||
self.menu_items.append((f"{display_name} (with TextTalker)", file_path))
|
||||
self.menu_items.append((f"{display_name} (disk only)", f"DISK_ONLY:{file_path}"))
|
||||
|
||||
except Exception as e:
|
||||
print(f"Error loading disk directory: {e}")
|
||||
|
||||
@@ -827,8 +827,7 @@ if __name__ == "__main__":
|
||||
|
||||
# Add emulators section
|
||||
menu.add_section("Emulators")
|
||||
menu.add_item("Emulators", "Apple 2e", "GAME='Apple 2e' startx")
|
||||
menu.add_item("Emulators", "Apple 2e with disk", "/usr/local/bin/apple_2e.py")
|
||||
menu.add_item("Emulators", "Apple 2e", "/usr/local/bin/apple_2e.py")
|
||||
menu.add_item("Emulators", "Bop It", "GAME='Bop It' startx")
|
||||
menu.add_item("Emulators", "Dosbox", "GAME=Dosbox startx")
|
||||
menu.add_item("Emulators", "Game Console Menu", "/usr/local/bin/rom_launcher.py")
|
||||
|
||||
Reference in New Issue
Block a user