From 8210385b4f548ef8646a5ff71b201e9f7b043958 Mon Sep 17 00:00:00 2001 From: Allan Thraen Date: Thu, 3 Sep 2026 15:19:37 +0200 Subject: [PATCH] fix(chocolatey): serve the icon from a CDN and check for WebView2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Moderator feedback on the 0.5.0 submission. Install side was passed as clean (official GitHub MSI with SHA256, silent /qn, proper uninstall, clean scan); one required change and one suggestion. Required: iconUrl was a raw.githubusercontent.com link, which Chocolatey does not permit. Switched to the jsdelivr CDN URL the moderator supplied, still pinned to commit ad0ea186 rather than a branch so the icon cannot change underneath a published package. Verified the CDN serves it: 200, image/png, 2530 bytes — byte-identical to src/CodeShellManager/Assets/app.png. Suggested: the description mentions WebView2 but nothing checked for it. Added a registry probe for the Evergreen Runtime that WARNS rather than fails. It ships with Windows 11 and recent Windows 10, so a detection miss must not block an install that would have worked — but a genuinely missing runtime means blank terminals, which is worth naming at install time rather than leaving the user to discover. Deliberately a check and not a on webview2-runtime: a dependency would pull and install the runtime on every machine, including the majority that already have it. Probes WOW6432Node first, which is where it actually resolved when tested (152.0.4191.53); HKLM and HKCU are fallbacks. Both files verified to parse. Note this needs resubmitting as 0.5.0 per the moderator, and the CHOCO_API_KEY 403 from the v0.6.0 attempt is still unresolved — that has to be sorted before any push succeeds. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01NDsEfog5kVkT5NmX1Ya5be --- .chocolatey/codeshellmanager.nuspec | 5 +++- .chocolatey/tools/chocolateyinstall.ps1 | 36 +++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/.chocolatey/codeshellmanager.nuspec b/.chocolatey/codeshellmanager.nuspec index 71f0439..c794a90 100644 --- a/.chocolatey/codeshellmanager.nuspec +++ b/.chocolatey/codeshellmanager.nuspec @@ -8,7 +8,10 @@ CodeShellManager umage.ai https://umage.ai/products/code-shell-manager/ - https://raw.githubusercontent.com/umage-ai/CodeShellManager/ad0ea186aefc00c4d4494f04d15f5dd5492c774e/src/CodeShellManager/Assets/app.png + + https://cdn.jsdelivr.net/gh/umage-ai/CodeShellManager@ad0ea186aefc00c4d4494f04d15f5dd5492c774e/src/CodeShellManager/Assets/app.png Copyright (c) 2025 umage.ai https://github.com/umage-ai/CodeShellManager/blob/main/LICENSE false diff --git a/.chocolatey/tools/chocolateyinstall.ps1 b/.chocolatey/tools/chocolateyinstall.ps1 index 082db81..5929935 100644 --- a/.chocolatey/tools/chocolateyinstall.ps1 +++ b/.chocolatey/tools/chocolateyinstall.ps1 @@ -10,6 +10,42 @@ $checksum64 = '__CHECKSUM64__' $logPath = "$env:TEMP\$packageName.$env:chocolateyPackageVersion.MsiInstall.log" +# CodeShellManager renders its terminals in WebView2, so the Evergreen Runtime is a hard +# requirement at run time. It ships with Windows 11 and with recent Windows 10, so this +# WARNS rather than fails: a missing runtime is worth telling the user about, but a +# detection miss must not block an install that would have worked. +# +# Deliberately a check and not a on webview2-runtime — that would pull and +# install the runtime on every machine, including the majority that already have it. +$wv2Clients = @( + 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}' + 'HKLM:\SOFTWARE\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}' + 'HKCU:\SOFTWARE\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}' +) +$wv2Version = $null +foreach ($key in $wv2Clients) { + try { + $pv = (Get-ItemProperty -Path $key -Name pv -ErrorAction Stop).pv + if ($pv -and $pv -ne '0.0.0.0') { $wv2Version = $pv; break } + } catch { } +} + +if ($wv2Version) { + Write-Host "Microsoft Edge WebView2 Runtime detected (version $wv2Version)." +} else { + Write-Warning @' +Microsoft Edge WebView2 Runtime was not detected. + +CodeShellManager renders its terminals in WebView2 and will not display them without it. +It is included with Windows 11 and recent Windows 10 builds; if terminals appear blank +after install, get the Evergreen Runtime from: + + https://developer.microsoft.com/en-us/microsoft-edge/webview2/ + +or run: choco install webview2-runtime +'@ +} + $packageArgs = @{ packageName = $packageName unzipLocation = $toolsDir