Skip to content

Commit f703016

Browse files
committed
fixes for windows build
1 parent 754f811 commit f703016

File tree

5 files changed

+12
-9
lines changed

5 files changed

+12
-9
lines changed

build.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ def build_executable():
2828
print("Building the application...")
2929
if sys.platform == 'darwin':
3030
run_command('export PYTHONOPTIMIZE=1')
31+
windows_only_1 = ""
3132
else:
3233
run_command('set PYTHONOPTIMIZE=1')
34+
windows_only_1 = '--collect-all pywinauto'
3335
run_command(
3436
f'{python_executable} -m PyInstaller -D --clean --name {PROJECT_NAME} '
3537
f'--noconfirm '
@@ -42,6 +44,7 @@ def build_executable():
4244
f'--collect-all pynput '
4345
f'--collect-all requests '
4446
f'--collect-all PIL '
47+
f'{windows_only_1} '
4548
f'--icon={icon_file} '
4649
f'--add-data "src/_version.py:." '
4750
f'--add-data "src/_path.py:." '

src/core/screens/main_window.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@ def __init__(self, parent, controller, logic_controller):
1818
label.pack(side="top", fill="x", pady=10)
1919

2020
button1 = tk.Button(self, text="Start new session",
21-
command=lambda: controller.show_frame("SelectAppWindow"), width=20)
21+
command=lambda: controller.show_frame("SelectAppWindow"), width=25)
2222
button1 = tk.Button(self, text="Start new session",
23-
command=lambda: controller.show_frame("SelectAppWindow"), width=20)
23+
command=lambda: controller.show_frame("SelectAppWindow"), width=25)
2424
button1.pack(pady=3)
2525

2626
if label_text == "What would you like to do?":
2727
button2 = tk.Button(self, text="Continue previous session",
28-
command=lambda: controller.show_frame("SessionsWindow"), width=20)
28+
command=lambda: controller.show_frame("SessionsWindow"), width=25)
2929
button2.pack(pady=3)
3030

3131
button3 = tk.Button(self, text="Configure custom rules",
3232
command=lambda: controller.show_frame("TrackerSettingsWindow"),
33-
width=20)
33+
width=25)
3434
button3.pack(pady=3)
3535

3636
exit_button = tk.Button(self, text=" Exit ", command=lambda: controller.on_close())

src/core/screens/select_app_window.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def __init__(self, parent, controller, logic_controller):
4848
self.refresh_apps() # Populate list initially
4949

5050
# Button to make selection
51-
select_button = tk.Button(self, text="Select", command=self.select_app, width=20)
51+
select_button = tk.Button(self, text="Select", command=self.select_app)
5252
select_button.pack(pady=10)
5353

5454
back_button = tk.Button(self, text="Main Menu", command=lambda: (self.controller.reset_frames(), self.controller.show_frame("MainWindow")))

src/core/screens/sessions_window.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ def __init__(self, parent, controller, logic_controller):
3232
self.load_sessions()
3333

3434
# button to make the selection
35-
select_button = tk.Button(self, text="Continue from selected session", command=self.select_session, width=20)
35+
select_button = tk.Button(self, text="Continue from selected session", command=self.select_session, width=25)
3636
select_button.pack(pady=5)
3737

3838
# button to analyze the session
39-
analyze_button = tk.Button(self, text="Analyze selected session", command=self.analyze_session, width=20)
39+
analyze_button = tk.Button(self, text="Analyze selected session", command=self.analyze_session, width=25)
4040
analyze_button.pack(pady=5)
4141

4242
# button to delete the session
43-
delete_button = tk.Button(self, text="Delete selected session", command=self.delete_session, width=20)
43+
delete_button = tk.Button(self, text="Delete selected session", command=self.delete_session, width=25)
4444
delete_button.pack(pady=5)
4545

4646
back_button = tk.Button(self, text="Main Menu", command=lambda: (self.controller.reset_frames(), self.controller.show_frame("MainWindow")))

src/core/screens/tracker_settings_window.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def __init__(self, parent, controller, logic_controller):
4747
self.mouse_tracker_time_text.set(str(self.logic.mouse_tracker.get_idle_time_limit()))
4848

4949
# Toggle Button
50-
self.mouse_tracker_enable_button = tk.Button(self, textvariable=self.mouse_toggle_text, command=self.toggle_mouse_tracker, width=20)
50+
self.mouse_tracker_enable_button = tk.Button(self, textvariable=self.mouse_toggle_text, command=self.toggle_mouse_tracker, width=25)
5151
self.mouse_tracker_enable_button.pack()
5252

5353
mouse_tracker_time_label = tk.Label(self, text="\nMouse idle time limit: ")

0 commit comments

Comments
 (0)