Skip to content

Commit 72f69d3

Browse files
committed
feat: creates desktop shortcut for frontend and uses GitHub release tag
1 parent 7d7f577 commit 72f69d3

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

Setup/setup_frontend.ps1

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@
1515
# =============================================================================
1616

1717
$INSTALL_DIR = "C:\Program Files\Speech-to-Cobot"
18-
$ZIP_URL = "https://github.com/Meisdy/Speech-to-Code-Generation-for-Collaborative-Robots/archive/refs/heads/dev.zip"
19-
$ZIP_PATH = "$env:TEMP\speech-to-cobot.zip"
20-
$EXTRACT_PATH = "$env:TEMP\speech-to-cobot-extract"
18+
$RELEASE_TAG = "v0.1.0"
19+
$ZIP_URL = "https://github.com/Meisdy/Speech-to-Code-Generation-for-Collaborative-Robots/releases/download/$RELEASE_TAG/stcgcr-frontend.zip"
20+
$ZIP_PATH = "$env:TEMP\stcgcr-frontend.zip"
21+
$EXTRACT_PATH = "$env:TEMP\stcgcr-frontend-extract"
2122
$LM_STUDIO_URL = "http://localhost:1234/v1/models"
2223
$WHISPER_CACHE = "$env:USERPROFILE\.cache\whisper"
2324

@@ -146,6 +147,21 @@ if ($LASTEXITCODE -ne 0) {
146147
$elapsed = [math]::Round(((Get-Date) - $stepStart).TotalSeconds, 1)
147148
Write-OK "Python 3.12 and all dependencies installed ($elapsed s)"
148149

150+
# --- Desktop shortcut ---------------------------------------------------------
151+
# Creates a shortcut on the current user's Desktop pointing to launch_frontend.bat
152+
# in the install directory. The bat file handles cd and uv run in one click.
153+
154+
Write-Step "Creating Desktop shortcut"
155+
$batPath = "$INSTALL_DIR\launch_frontend.bat"
156+
$shortcutPath = "$env:USERPROFILE\Desktop\Speech-to-Cobot.lnk"
157+
$shell = New-Object -ComObject WScript.Shell
158+
$shortcut = $shell.CreateShortcut($shortcutPath)
159+
$shortcut.TargetPath = $batPath
160+
$shortcut.WorkingDirectory = $INSTALL_DIR
161+
$shortcut.Description = "Launch Speech-to-Cobot Frontend"
162+
$shortcut.Save()
163+
Write-OK "Shortcut created at $shortcutPath"
164+
149165
# --- Whisper model ------------------------------------------------------------
150166
# Pre-downloads the model so the first launch does not stall.
151167
# Saved to %USERPROFILE%\.cache\whisper — outside the project directory.

0 commit comments

Comments
 (0)