Skip to content

Commit 1b344c9

Browse files
authored
Merge pull request #39 from digitalf0x/ft-0.8.0-stable
[Feat] Prepare v0.8.0 stable release
2 parents d3c7656 + df8aba8 commit 1b344c9

4 files changed

Lines changed: 20 additions & 15 deletions

File tree

BridgeApp/app_gui.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
from app_config import AppConfig, PatternConfig
55
from app_pattern import VibrationPattern
66

7-
WINDOW_NAME = "Haptic Pancake Bridge v0.8.0-beta.4"
7+
import platform_conf
8+
9+
WINDOW_NAME = "Haptic Pancake Bridge v0.8.0"
10+
WINDOW_NAME_UNBUNDLED = WINDOW_NAME + " (unbundled)"
811
WINDOW_ICON = b'iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABhWlDQ1BJQ0MgcHJvZmlsZQAAKJF9kT1Iw0AcxV9TpVIrDhYVcchQnezgB+JYqlgEC6Wt0KqDyaVf0KQhSXFxFFwLDn4sVh1cnHV1cBUEwQ8QZwcnRRcp8X9NoUWMB8f9eHfvcfcOEOplpppdEUDVLCMZi4qZ7Kroe0UvBjEEPyYlZurx1GIaruPrHh6+3oV5lvu5P0efkjMZ4BGJI0w3LOIN4tlNS+e8TxxkRUkhPieeMOiCxI9clx1+41xossAzg0Y6OU8cJBYLHSx3MCsaKvEMcUhRNcoXMg4rnLc4q+Uqa92TvzCQ01ZSXKc5ihiWEEcCImRUUUIZFsK0aqSYSNJ+1MU/0vQnyCWTqwRGjgVUoEJq+sH/4He3Zn56ykkKRIHuF9v+GAN8u0CjZtvfx7bdOAG8z8CV1vZX6sDcJ+m1thY6Avq3gYvrtibvAZc7wPCTLhlSU/LSFPJ54P2MvikLDNwC/jWnt9Y+Th+ANHW1fAMcHALjBcped3l3T2dv/55p9fcD3S9y0apk9h0AAAAGYktHRAD/AP8A/6C9p5MAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfoCxYXCzDoJVaPAAACuElEQVQ4y2WTTW8bdRDGfzO767f1xnGcJiSNVNoKqMoJgRBCwifuIHFFuSDRTwDi2CNfgC/gGxfElV6ockEISAJBiAJ5KVnqxk7idbx+ie39DwcngaqH0Wj0HJ756ZmRjz7940Ym0nCe1DMVnArZRbn/d+85bcMJ6744GqrUzYFimIAamMF5P8GCAC1GqAMDlFk3qItKQ9WsrmaoGd32LjYeMeg0edj4mOP9Hzj4/ku2v77PJO3MtPZj1GYmYlb31c1ch2ct5uZW6XZikpN9Rr02v377BenRNsuvvkfa2sUP5wlKFbJhDy1FmAm+GpiD6XkfRFGDfD7infc/p9XcobTwGbmoRpq2sKBI8VqNXjemUCijAr6YXa2kCL74RHOrEORYufkW5vk4haJlOAQFyDLUAAeqzhBn5IOQwMsxGfUo5MqMBwm++IjLmPQTovk1PFFGyVPCygpqhphdIBiUS4t0zg5ZWrqL84RcWL2KraTgVPEWb5KmLQIvT+bsWYThIKF1+BO9XpPDg+9YufU2raPfqCy/zOnJHvlyFcmVyMhYq65h/yGAOGA64cmjBxzHW/Tbf5Ec/c5Z6xFh+RphtESvfUAn3mFh+Q5yEbuYoZc3oAbVxZc4T2KiuRcYnP7N3dc/JCzVZjpGLiiyv/kVl6bqDPnk3o51ksc0n25SrFwn85TxdIRXiBi7Mc5Tpm5CYX6F5uGP5Mo1BoMON974AK8YzRCycUpn9yHd5i9M0xO6/2xzGm9ynsSEpRrZ8Ixee4+9b+5TrqzSP96buV8ieA5eefMeMh7Re/IzleqLyGSEOkcn3iKJt+i3/qR2612GpzGlcBFPfdSBL8bG/MLtulMhfO06mQoWBLMIRXCesnZn+sxnLtkUTzww2/AxWw+8fMOJ1NUv4Lzn39lXIVOu5kAFJ7rhnK3/C07bcJ2GHOyzAAAAAElFTkSuQmCC'
912

1013
# If changing order, also change update_oscquery_state()
@@ -410,13 +413,10 @@ def update_autostart_active(self, autolaunch_enabled):
410413
except Exception as e:
411414
print("[GUI] Failed to update autostart checkbox.")
412415

413-
def update_autostart_status(self, vr_ready, is_bundled):
416+
def update_autostart_status(self, vr_ready):
414417
if not vr_ready:
415418
unavailable = True
416419
message = "SteamVR closed (open to apply changes)"
417-
elif not is_bundled:
418-
unavailable = False
419-
message = "SteamVR running (app unbundled)"
420420
else:
421421
unavailable = False
422422
message = "SteamVR running"
@@ -477,7 +477,11 @@ def refresh(self):
477477

478478

479479
def create_window(self):
480-
self.window = sg.Window(WINDOW_NAME, self.layout, keep_on_top=False, finalize=True, alpha_channel=1, icon=WINDOW_ICON)
480+
final_window_title = WINDOW_NAME
481+
if not platform_conf.GET_IS_APP_BUNDLED():
482+
final_window_title = WINDOW_NAME_UNBUNDLED
483+
484+
self.window = sg.Window(final_window_title, self.layout, keep_on_top=False, finalize=True, alpha_channel=1, icon=WINDOW_ICON)
481485

482486
self.window.set_resizable(False, True)
483487

BridgeApp/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def refresh_autostart_status(quiet_refresh=False):
110110
gui.update_autostart_active(config.start_with_steamvr)
111111

112112
# Always update VR runtime status
113-
gui.update_autostart_status(vr.is_alive, vr.is_app_bundled)
113+
gui.update_autostart_status(vr.is_alive)
114114

115115

116116
def add_external_target(external_type):

BridgeApp/platform_conf.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
from pathlib import Path
22
from platformdirs import PlatformDirs
33

4+
import sys
5+
46
# Load platform-specific directories
57

68
# --- User data ----
@@ -10,3 +12,7 @@
1012
# Ensure all paths exist
1113
# See https://stackoverflow.com/questions/273192/how-do-i-create-a-directory-and-any-missing-parent-directories
1214
Path(PATH_USER_DATA).mkdir(parents=True, exist_ok=True)
15+
16+
def GET_IS_APP_BUNDLED():
17+
"""Gets if the app can be easily launched, e.g. as a PyInstaller bundle"""
18+
return getattr(sys, 'frozen', False)

BridgeApp/vr_manifest.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,6 @@ def app_key(self):
3434
"""Gets unique app ID for VR manifest"""
3535
return self.vrmanifest_app_key
3636

37-
@property
38-
def is_app_bundled(self):
39-
"""Gets if the app can be easily launched, e.g. as a PyInstaller bundle"""
40-
return getattr(sys, 'frozen', False)
41-
4237
@property
4338
def is_recent(self):
4439
"""Gets if VR manifest file has been saved this launch"""
@@ -67,7 +62,7 @@ def prepare(self):
6762
binary_path_type = "binary_path_windows"
6863

6964
launch_path = self.app_path
70-
if not self.is_app_bundled:
65+
if not platform_conf.GET_IS_APP_BUNDLED():
7166
launch_path = self.devlauncher_path
7267

7368
self.vrmanifest_data = {
@@ -92,7 +87,7 @@ def print_json(self):
9287

9388
def save_devlauncher(self):
9489
"""Saves a dev-mode/unbundled launch script based on path"""
95-
if self.is_app_bundled:
90+
if platform_conf.GET_IS_APP_BUNDLED():
9691
print(f"[VRManifest] Not saving dev-mode launch script, app is bundled")
9792
return
9893

@@ -149,7 +144,7 @@ def save(self):
149144
json.dump(self.vrmanifest_data, mvr_file, ensure_ascii=False, sort_keys=True, indent=4)
150145

151146
# Save dev launcher if needed
152-
if not self.is_app_bundled:
147+
if not platform_conf.GET_IS_APP_BUNDLED():
153148
self.save_devlauncher()
154149

155150
self.vrmanifest_recent = True

0 commit comments

Comments
 (0)