Skip to content

Commit

Permalink
v1.4.20
Browse files Browse the repository at this point in the history
- Bug fixes
  • Loading branch information
Hifumi1337 committed Sep 30, 2022
1 parent 2cf2b90 commit c1f8ea9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function build_droid() {
elif [[ "$OSTYPE" == "darwin"* ]]
then
# macOS
pyinstaller --noconfirm --onefile --add-data "/usr/local/lib/python3.10/site-packages/customtkinter:customtkinter/" "main.py" --name droid-$(uname)
pyinstaller --noconfirm --onefile --add-data "/usr/local/lib/python3.10/site-packages/customtkinter:customtkinter/" "droid-$(uname).spec" --name droid-$(uname)
else
pyinstaller --noconfirm --onefile --add-data "/usr/local/lib/python3.10/site-packages/customtkinter;customtkinter/" "main.py" --name droid-$(echo $current_os)
fi
Expand Down
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
args = parser.parse_args()

author = "Hifumi1337"
version = "1.4.19"
version = "1.4.20"

# Default Android Debug Bridge (adb) location on specific platforms
if platform.system() == 'Darwin':
Expand Down
16 changes: 14 additions & 2 deletions utils/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@
whoami = getoutput("whoami")
adb = f"/home/{whoami}/Android/Sdk/platform-tools/adb"

if platform.system() == 'Darwin':
import sys, os

def import_resources(relative_path):
try:
base_path = sys._MEIPASS
except Exception:
base_path = os.path.abspath(".")

return os.path.join(base_path, relative_path)

INFO_CODE = "[INFO]"

class View(customtkinter.CTk):
Expand All @@ -33,8 +44,9 @@ def __init__(self, version):
self.grid_columnconfigure(1, weight=1)
self.grid_rowconfigure(0, weight=1)

img = PhotoImage(file='assets/droid.png')
self.iconphoto(True, img)
if platform.system() == 'Darwin':
img = PhotoImage(file=f"{import_resources('assets/droid.png')}")
self.iconphoto(True, img)

# Sidebar
self.frame_left = customtkinter.CTkFrame(master=self, width=200, corner_radius=0)
Expand Down

0 comments on commit c1f8ea9

Please sign in to comment.