Skip to content

Commit

Permalink
add new directory scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
fluxdesignz authored Oct 20, 2024
1 parent a4480c1 commit 5b2b5de
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions Main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,17 @@
import os
import subprocess

def get_username():
if platform.system() == "Windows":
return os.getlogin() # or os.environ['USERNAME']
else:
return os.getenv('USER')

username = get_username()
base_dir = os.path.dirname(__file__)

if platform.system() == "Windows":
cmd_location = rf'C:\Users\{username}\downloads\Sola-1.1\commandline.py'
cmd_location = os.path.join(base_dir, "commandline.py")
else:
cmd_location = f'/home/{username}/downloads/Sola-1.1/commandline.py'
cmd_location = os.path.join(base_dir, "commandline.py")

if platform.system() == "Windows":
ui_location = rf'C:\Users\{username}\downloads\Sola-1.1\ui.py'
ui_location = os.path.join(base_dir, "ui.py")
else:
ui_location = f'/home/{username}/downloads/Sola-1.1/ui.py'
ui_location = os.path.join(base_dir, "ui.py")

option = input("Welcome to Sola! would you like to use the simple command line player or the UI player? [cmd/ui]: ")
if option == "cmd":
Expand Down

0 comments on commit 5b2b5de

Please sign in to comment.