@@ -30,6 +30,8 @@ $version = (Get-Content "$PSScriptRoot\version.txt").Trim()
30
30
$suffix = [io.path ]::GetFileNameWithoutExtension($ConfigFile )
31
31
$outfile = " bin\$basename -$version -$suffix .exe"
32
32
33
+ $programGroupName = ' $SMPROGRAMS\Raspberry Pi Pico SDK 1.4'
34
+
33
35
$tools = (Get-Content ' .\tools.json' | ConvertFrom-Json ).tools
34
36
$config = Get-Content $ConfigFile | ConvertFrom-Json
35
37
$bitness = $config.bitness
@@ -99,23 +101,24 @@ $env:CHERE_INVOKING = 'yes'
99
101
# Start MINGW32/64 environment
100
102
$env: MSYSTEM = " MINGW$bitness "
101
103
102
- if (-not (Test-Path " .\build\openocd-install\mingw$bitness " )) {
103
- # First run setup
104
- msys ' uname -a'
105
- # Core update
106
- msys ' pacman --noconfirm -Syuu'
107
- # Normal update
108
- msys ' pacman --noconfirm -Suu'
104
+ # Disable openocd build for now (using a manually built copy instead)
105
+ # if (-not (Test-Path ".\build\openocd-install\mingw$bitness")) {
106
+ # # First run setup
107
+ # msys 'uname -a'
108
+ # # Core update
109
+ # msys 'pacman --noconfirm -Syuu'
110
+ # # Normal update
111
+ # msys 'pacman --noconfirm -Suu'
109
112
110
- msys " pacman -S --noconfirm --needed autoconf automake git libtool make mingw-w64-${mingw_arch} -toolchain mingw-w64-${mingw_arch} -libusb p7zip pkg-config wget"
113
+ # msys "pacman -S --noconfirm --needed autoconf automake git libtool make mingw-w64-${mingw_arch}-toolchain mingw-w64-${mingw_arch}-libusb mingw-w64-${mingw_arch}-hidapi p7zip pkg-config wget"
111
114
112
- # Keep it clean
113
- if (Test-Path .\build\openocd) {
114
- Remove-Item .\build\openocd - Recurse - Force
115
- }
115
+ # # Keep it clean
116
+ # if (Test-Path .\build\openocd) {
117
+ # Remove-Item .\build\openocd -Recurse -Force
118
+ # }
116
119
117
- msys " cd build && ../build-openocd.sh $bitness $mingw_arch "
118
- }
120
+ # msys "cd build && ../build-openocd.sh $bitness $mingw_arch"
121
+ # }
119
122
120
123
if (-not (Test-Path " .\build\libusb" )) {
121
124
msys ' 7z x -obuild/libusb ./installers/libusb.7z'
@@ -255,15 +258,36 @@ LangString DESC_SecCodeExts `${LANG_ENGLISH} "Recommended extensions for Visual
255
258
256
259
Section "OpenOCD" SecOpenOCD
257
260
258
- SetOutPath "`$ INSTDIR\tools\openocd-picoprobe"
259
- File "build\openocd-install\mingw$bitness \bin\*.*"
260
- File "build\libusb\mingw$bitness \dll\libusb-1.0.dll"
261
+ SetOutPath "`$ INSTDIR\tools\openocd"
262
+ File "build\openocd-package\*.*"
261
263
SetOutPath "`$ INSTDIR\tools\openocd-picoprobe\scripts"
262
264
File /r "build\openocd-install\mingw$bitness \share\openocd\scripts\*.*"
263
265
264
266
SectionEnd
265
267
266
- LangString DESC_SecOpenOCD `$ {LANG_ENGLISH} "Open On-Chip Debugger with picoprobe support"
268
+ LangString DESC_SecOpenOCD `$ {LANG_ENGLISH} "Open On-Chip Debugger"
269
+
270
+ Section "Pico SDK" SecPicoSDK
271
+
272
+ SetOutPath "`$ INSTDIR\pico-sdk"
273
+ File /r "build\pico-sdk\*.*"
274
+
275
+ SetOutPath "`$ INSTDIR\pico-sdk-tools"
276
+ File "build\pico-sdk-tools\*.*"
277
+ WriteRegStr HKCU "Software\Kitware\CMake\Packages\pico-sdk-tools" "v$version " "`$ INSTDIR\pico-sdk-tools"
278
+
279
+ SectionEnd
280
+
281
+ LangString DESC_SecPicoSDK `$ {LANG_ENGLISH} "Pico SDK and pre-compiled tools"
282
+
283
+ Section "Ninja" SecNinja
284
+
285
+ SetOutPath "`$ INSTDIR\tools"
286
+ File "installers\ninja.exe"
287
+
288
+ SectionEnd
289
+
290
+ LangString DESC_SecNinja `$ {LANG_ENGLISH} "Ninja"
267
291
268
292
Section /o "Zadig" SecZadig
269
293
@@ -281,15 +305,17 @@ Section "Pico environment" SecPico
281
305
File "pico-setup.cmd"
282
306
File "docs\ReadMe.txt"
283
307
284
- CreateShortcut "`$ INSTDIR\Developer Command Prompt for Pico.lnk" "cmd.exe" '/k "`$ INSTDIR\pico-env.cmd"'
308
+ CreateDirectory "$programGroupName "
309
+
310
+ CreateShortcut "$programGroupName \Developer Command Prompt for Pico.lnk" "cmd.exe" '/k "`$ INSTDIR\pico-env.cmd"'
285
311
286
312
; Unconditionally create a shortcut for VS Code -- in case the user had it
287
313
; installed already, or if they install it later
288
- CreateShortcut "`$ INSTDIR \Visual Studio Code for Pico.lnk" "cmd.exe" '/c (call "`$ INSTDIR\pico-env.cmd" && code) || pause'
314
+ CreateShortcut "$programGroupName \Visual Studio Code for Pico.lnk" "cmd.exe" '/c (call "`$ INSTDIR\pico-env.cmd" && code) || pause'
289
315
290
316
; SetOutPath is needed here to set the working directory for the shortcut
291
317
SetOutPath "`$ INSTDIR\pico-project-generator"
292
- CreateShortcut "`$ INSTDIR \Pico Project Generator.lnk" "cmd.exe" '/c (call "`$ INSTDIR\pico-env.cmd" && python "`$ INSTDIR\pico-project-generator\pico_project.py" --gui) || pause'
318
+ CreateShortcut "$programGroupName \Pico Project Generator.lnk" "cmd.exe" '/c (call "`$ INSTDIR\pico-env.cmd" && python "`$ INSTDIR\pico-project-generator\pico_project.py" --gui) || pause'
293
319
294
320
; Reset working dir for pico-setup.cmd launched from the finish page
295
321
SetOutPath "`$ INSTDIR"
@@ -318,6 +344,8 @@ LangString DESC_SecDocs `${LANG_ENGLISH} "Adds a script to download the latest P
318
344
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
319
345
!insertmacro MUI_DESCRIPTION_TEXT `$ {SecCodeExts} `$ (DESC_SecCodeExts)
320
346
!insertmacro MUI_DESCRIPTION_TEXT `$ {SecOpenOCD} `$ (DESC_SecOpenOCD)
347
+ !insertmacro MUI_DESCRIPTION_TEXT `$ {SecPicoSDK} `$ (DESC_SecPicoSDK)
348
+ !insertmacro MUI_DESCRIPTION_TEXT `$ {SecNinja} `$ (DESC_SecNinja)
321
349
!insertmacro MUI_DESCRIPTION_TEXT `$ {SecZadig} `$ (DESC_SecZadig)
322
350
!insertmacro MUI_DESCRIPTION_TEXT `$ {SecPico} `$ (DESC_SecPico)
323
351
!insertmacro MUI_DESCRIPTION_TEXT `$ {SecDocs} `$ (DESC_SecDocs)
0 commit comments