Skip to content

Commit

Permalink
modified: ufade_gui.py
Browse files Browse the repository at this point in the history
  • Loading branch information
prosch88 committed Sep 4, 2024
1 parent 21302e4 commit f6b8834
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions ufade_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,10 @@ def show_cwd(self):
for widget in self.dynamic_frame.winfo_children():
widget.destroy()
global dir
dir = os.getcwd()
if getattr(sys, 'frozen', False):
dir = os.path.join(os.path.expanduser('~'), "ufade_out")
else:
dir = os.getcwd()
ctk.CTkLabel(self.dynamic_frame, text="UFADE by Christian Peter", text_color="#3f3f3f", height=40, padx=40, font=self.stfont).pack(anchor="center")
ctk.CTkLabel(self.dynamic_frame, text="Choose Output Directory:", height=30, width=585, font=("standard",24), justify="left").pack(pady=20)
self.browsebutton = ctk.CTkButton(self.dynamic_frame, text="Browse", font=self.stfont, command=lambda: self.browse_cwd(self.outputbox), width=60, fg_color="#2d2d35")
Expand Down Expand Up @@ -2620,16 +2623,6 @@ def macos_dev17(self, change):
script_path = create_mac_tunnel_script()
print(script_path)
run(["osascript", "-e", f'do shell script \"{sys.executable} tunnel\" with administrator privileges'])
#run(["osascript", "-e", f'do shell script \"{python_executable} {script_path}\" with administrator privileges'])
"""
while True:
try:
tun = get_tunneld_devices()
except:
tun = []
if tun != []:
break
"""
except:
raise exceptions.AccessDeniedError()
else:
Expand Down Expand Up @@ -3491,14 +3484,19 @@ def create_mac_tunnel_script():
bu_pass = "12345"
developer = False
filedict = {}

tunnel = False
try:
if sys.argv[1] == "tunnel":
tunnel = True
cli_tunneld(["-d"])
else:
pass
except:
pass
if tunnel == True:
sys.exit(0)
else:
pass

# Start the app
if __name__ == "__main__":
Expand Down

0 comments on commit f6b8834

Please sign in to comment.