Skip to content

Commit 85c698f

Browse files
authored
Merge pull request #744 from luxonis/windows_installer_path_fix
Updated ps1 script
2 parents bf98033 + bbee0ad commit 85c698f

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed
Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
# Create a DepthAI.lnk with icon
2+
$Command = "$PSScriptRoot\venv\Scripts\python.exe"
3+
$Arguments = "`"$PSScriptRoot\depthai\launcher\launcher.py`" --repo `"$PSScriptRoot\depthai`" --git `"$PSScriptRoot\PortableGit\bin\git.exe`""
4+
$Ps1File = "$PSScriptRoot\run.ps1"
5+
26
$WshShell = New-Object -comObject WScript.Shell
37
$Shortcut = $WshShell.CreateShortcut("$PSScriptRoot\DepthAI.lnk")
4-
$Shortcut.TargetPath = "$PSScriptRoot\venv\Scripts\python.exe"
5-
$Shortcut.Arguments = "`"$PSScriptRoot\depthai\launcher\launcher.py`" --repo `"$PSScriptRoot\depthai`" --git `"$PSScriptRoot\PortableGit\bin\git.exe`""
8+
$Shortcut.TargetPath = "powershell"
9+
$Shortcut.Arguments = "-noexit -ExecutionPolicy Bypass -File " + $Ps1File
610
$Shortcut.IconLocation = "$PSScriptRoot\logo_only_EBl_icon.ico"
711
$Shortcut.WorkingDirectory = "$PSScriptRoot"
812
$Shortcut.WindowStyle = 7 # Minimized
9-
$Shortcut.Save()
13+
$Shortcut.Save()
14+
15+
16+
$StartCommand = "$Command $Arguments"
17+
Set-Content -Path $Ps1File -Value $StartCommand -Encoding ASCII

0 commit comments

Comments
 (0)