Skip to content
This repository was archived by the owner on Apr 18, 2026. It is now read-only.

Commit 2bdf70d

Browse files
committed
✨ enhanced intelligence
1 parent ac7cf64 commit 2bdf70d

3 files changed

Lines changed: 30 additions & 1 deletion

File tree

src/main.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -801,8 +801,28 @@ def run_first_time_setup() -> str:
801801
# Main Loop
802802
# ═══════════════════════════════════════════════════════════════════════════════
803803

804+
def _cleanup_bin_exe():
805+
"""Remove exe from bin directory if it exists (Windows only).
806+
The bin directory should only have .bat/.cmd files that point to the main exe.
807+
Having an exe in bin causes issues because .exe has priority in PATHEXT.
808+
"""
809+
if sys.platform != "win32":
810+
return
811+
try:
812+
app_data = Path(os.environ.get('LOCALAPPDATA', ''))
813+
if app_data:
814+
bin_exe = app_data / "Dymo-Code" / "bin" / "dymo-code.exe"
815+
if bin_exe.exists():
816+
bin_exe.unlink()
817+
except Exception:
818+
pass # Silent fail
819+
820+
804821
def main():
805822
"""Main entry point"""
823+
# Cleanup old exe in bin directory (Windows PATH fix)
824+
_cleanup_bin_exe()
825+
806826
# Check for automatic updates before anything else
807827
# This runs silently and restarts if an update is available
808828
if perform_silent_auto_update():

src/setup_command.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,15 @@ def setup_windows() -> Tuple[bool, str]:
8383
exe_path = get_executable_path()
8484
bat_content = f'@echo off\n"{python_exe}" "{exe_path}" %*'
8585

86+
# Remove any exe in bin directory (should only have bat/cmd)
87+
# This prevents conflicts where .exe takes priority over .bat/.cmd in PATHEXT
88+
bin_exe = bin_dir / "dymo-code.exe"
89+
if bin_exe.exists():
90+
try:
91+
bin_exe.unlink()
92+
except Exception:
93+
pass # May be in use, will be cleaned up next time
94+
8695
# Create batch file
8796
bat_path = bin_dir / "dymo-code.bat"
8897
bat_path.write_text(bat_content, encoding='utf-8')

static-api/version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"version": "0.0.0.38"
2+
"version": "0.0.0.39"
33
}

0 commit comments

Comments
 (0)