Skip to content

Commit

Permalink
Aggiunta Icona
Browse files Browse the repository at this point in the history
  • Loading branch information
marco97pa committed Oct 25, 2024
1 parent 862ea6f commit 18aa8f6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.bat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pyinstaller --onefile --icon=icon.ico --noconsole main.py
pyinstaller --clean -y -n "Rover RB200 Configurator" --add-data=".\icon.ico;." --icon=".\icon.ico" --onefile --noconsole .\main.py
Binary file added icon.ico
Binary file not shown.
6 changes: 5 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import json
import tkinter as tk
from tkinter import ttk
import sys

def get_status(IP):
url = 'http://' + IP + '/data.json'
Expand Down Expand Up @@ -172,7 +173,10 @@ def countdown(time_left):
# Create the main window
root = tk.Tk()
root.title("ROVER RB200 Configurator")
root.iconbitmap("icon.ico")
if getattr(sys, 'frozen', False):
root.iconbitmap(os.path.join(sys._MEIPASS, "icon.ico"))
else:
root.iconbitmap("icon.ico")

# Function to launch webpage
def webpage():
Expand Down

0 comments on commit 18aa8f6

Please sign in to comment.