@@ -188,8 +188,9 @@ SpaceTexts "none"
188
188
189
189
InstallDir "`$ {PICO_INSTALL_DIR}"
190
190
191
- ;Get installation folder from registry if available
192
- InstallDirRegKey `$ {PICO_REG_ROOT} "`$ {PICO_REG_KEY}" "InstallPath"
191
+ ; Get installation folder from registry if available
192
+ ; We use a version-specific key here so that multiple versions can be installed side-by-side
193
+ InstallDirRegKey `$ {PICO_REG_ROOT} "`$ {PICO_REG_KEY}\v$version " "InstallPath"
193
194
194
195
!define MUI_ABORTWARNING
195
196
@@ -201,7 +202,7 @@ InstallDirRegKey `${PICO_REG_ROOT} "`${PICO_REG_KEY}" "InstallPath"
201
202
!define MUI_FINISHPAGE_RUN
202
203
!define MUI_FINISHPAGE_RUN_FUNCTION RunBuild
203
204
204
- !define MUI_FINISHPAGE_SHOWREADME "`$ {PICO_REPOS_DIR} \ReadMe.txt"
205
+ !define MUI_FINISHPAGE_SHOWREADME "`$ INSTDIR \ReadMe.txt"
205
206
!define MUI_FINISHPAGE_SHOWREADME_TEXT "Show ReadMe"
206
207
207
208
!define MUI_FINISHPAGE_NOAUTOCLOSE
@@ -224,8 +225,8 @@ Section
224
225
InitPluginsDir
225
226
File /oname=`$ TEMP\RefreshEnv.cmd "packages\pico-setup-windows\RefreshEnv.cmd"
226
227
227
- WriteRegStr `$ {PICO_REG_ROOT} "`$ {PICO_REG_KEY}" "InstallPath" "`$ INSTDIR"
228
228
WriteRegStr `$ {PICO_REG_ROOT} "`$ {PICO_REG_KEY}\v$version " "InstallPath" "`$ INSTDIR"
229
+ WriteRegStr `$ {PICO_REG_ROOT} "`$ {PICO_REG_KEY}\v$version " "ReposPath" "`$ {PICO_REPOS_DIR}"
229
230
230
231
CreateDirectory "`$ {PICO_REPOS_DIR}"
231
232
CreateDirectory "`$ {PICO_SHORTCUTS_DIR}"
@@ -328,7 +329,7 @@ Section "Pico environment" SecPico
328
329
SetOutPath "`$ INSTDIR\picotool"
329
330
File "build\picotool-install\mingw$bitness \*.*"
330
331
331
- SetOutPath "`$ {PICO_REPOS_DIR} "
332
+ SetOutPath "`$ INSTDIR "
332
333
File "version.txt"
333
334
File "packages\pico-setup-windows\pico-code.ps1"
334
335
File "packages\pico-setup-windows\pico-env.ps1"
@@ -338,17 +339,17 @@ Section "Pico environment" SecPico
338
339
339
340
CreateDirectory "`$ {PICO_SHORTCUTS_DIR}\Pico - Documentation"
340
341
341
- CreateShortcut "`$ {PICO_SHORTCUTS_DIR}\Pico - Developer Command Prompt.lnk" "cmd.exe" '/k "`$ {PICO_REPOS_DIR} \pico-env.cmd"'
342
- CreateShortcut "`$ {PICO_SHORTCUTS_DIR}\Pico - Developer PowerShell.lnk" "powershell.exe" '-NoExit -ExecutionPolicy Bypass -File "`$ {PICO_REPOS_DIR} \pico-env.ps1"'
343
- CreateShortcut "`$ {PICO_SHORTCUTS_DIR}\Pico - Visual Studio Code.lnk" "powershell.exe" 'powershell -WindowStyle Hidden -ExecutionPolicy Bypass -File "`$ {PICO_REPOS_DIR} \pico-code.ps1"' "`$ INSTDIR\resources\vscode.ico" "" SW_SHOWMINIMIZED
342
+ CreateShortcut "`$ {PICO_SHORTCUTS_DIR}\Pico - Developer Command Prompt.lnk" "cmd.exe" '/k "`$ INSTDIR \pico-env.cmd"'
343
+ CreateShortcut "`$ {PICO_SHORTCUTS_DIR}\Pico - Developer PowerShell.lnk" "powershell.exe" '-NoExit -ExecutionPolicy Bypass -File "`$ INSTDIR \pico-env.ps1"'
344
+ CreateShortcut "`$ {PICO_SHORTCUTS_DIR}\Pico - Visual Studio Code.lnk" "powershell.exe" '-WindowStyle Hidden -ExecutionPolicy Bypass -File "`$ INSTDIR \pico-code.ps1"' "`$ INSTDIR\resources\vscode.ico" "" SW_SHOWMINIMIZED
344
345
345
346
WriteINIStr "`$ {PICO_SHORTCUTS_DIR}\Pico - Documentation\Pico Datasheet.url" "InternetShortcut" "URL" "https://datasheets.raspberrypi.com/pico/pico-datasheet.pdf"
346
347
WriteINIStr "`$ {PICO_SHORTCUTS_DIR}\Pico - Documentation\Pico W Datasheet.url" "InternetShortcut" "URL" "https://datasheets.raspberrypi.com/picow/pico-w-datasheet.pdf"
347
348
WriteINIStr "`$ {PICO_SHORTCUTS_DIR}\Pico - Documentation\Pico C C++ SDK.url" "InternetShortcut" "URL" "https://datasheets.raspberrypi.com/pico/raspberry-pi-pico-c-sdk.pdf"
348
349
WriteINIStr "`$ {PICO_SHORTCUTS_DIR}\Pico - Documentation\Pico Python SDK.url" "InternetShortcut" "URL" "https://datasheets.raspberrypi.com/pico/raspberry-pi-pico-python-sdk.pdf"
349
350
350
351
; Reset working dir for pico-setup.cmd launched from the finish page
351
- SetOutPath "`$ {PICO_REPOS_DIR} "
352
+ SetOutPath "`$ INSTDIR "
352
353
353
354
SectionEnd
354
355
@@ -357,7 +358,7 @@ LangString DESC_SecPico `${LANG_ENGLISH} "Scripts for cloning the Pico SDK and t
357
358
Function RunBuild
358
359
359
360
ReadEnvStr `$ 0 COMSPEC
360
- Exec '"`$ 0" /k call "`$ TEMP\RefreshEnv.cmd" && del "`$ TEMP\RefreshEnv.cmd" && call "`$ {PICO_REPOS_DIR} \pico-setup.cmd" 1'
361
+ Exec '"`$ 0" /k call "`$ TEMP\RefreshEnv.cmd" && del "`$ TEMP\RefreshEnv.cmd" && call "`$ INSTDIR \pico-setup.cmd" 1'
361
362
362
363
FunctionEnd
363
364
0 commit comments