From ab86027defd660e5b89afd41d662681363108830 Mon Sep 17 00:00:00 2001 From: Tomas Srnka Date: Sat, 21 Nov 2026 14:15:52 +0000 Subject: [PATCH] [FEATMGR] Demo image only: offer PowerShell 7 (x86 MSI) and Firefox (32-bit MSI) on i386 --- base/applications/featmgr/CMakeLists.txt | 8 +++ .../featmgr/catalog/components.ini | 7 +- .../featmgr/catalog/x86/powershell-7.ini | 65 +++++++++++++++++++ 3 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 base/applications/featmgr/catalog/x86/powershell-7.ini diff --git a/base/applications/featmgr/CMakeLists.txt b/base/applications/featmgr/CMakeLists.txt index 5b5ca6c5122..2caa5af5e11 100644 --- a/base/applications/featmgr/CMakeLists.txt +++ b/base/applications/featmgr/CMakeLists.txt @@ -102,6 +102,14 @@ if(ARCH STREQUAL "amd64") set_property(GLOBAL APPEND PROPERTY MESA3D_STATUS_LINES "PowerShell 7 amd64: ${_ps7_status}") endif() +# --- demo image (i386): PowerShell 7 (x86 MSI, downloaded at install time) and Firefox (32-bit MSI) are offered on i386 too --- +if(ARCH STREQUAL "i386") + add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/catalog/x86/powershell-7.ini + DESTINATION reactos/Featmgr/Catalog FOR all) + add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/catalog/firefox.ini + DESTINATION reactos/Featmgr/Catalog FOR all) +endif() + # --- Microsoft .NET Framework 4.8: software-tier entry (i386 and amd64) --- # The manifest only; its recipe is the [dotnet-framework-4.8] section of Catalog\components.ini (below). The official offline installer # is downloaded from Microsoft at install time (SHA-256 checked by featmgr) and is never bundled; the application diff --git a/base/applications/featmgr/catalog/components.ini b/base/applications/featmgr/catalog/components.ini index b1df0816fee..a098654b88f 100644 --- a/base/applications/featmgr/catalog/components.ini +++ b/base/applications/featmgr/catalog/components.ini @@ -48,7 +48,7 @@ Uninstall=msiexec.exe /x {5417B253-1A6D-4638-BC94-743A6EC2E6F4} /qn /norestart [firefox] Name=Mozilla Firefox -Arch=amd64 +Arch=x86,amd64 Default=1 ; the official x64 MSI of the current Firefox release from Mozilla's release archive, unmodified and not bundled in the image. ; The SHA-256 is the one in the release's signed SHA256SUMS file (archive.mozilla.org/pub/firefox/releases//SHA256SUMS). @@ -56,6 +56,11 @@ Url=https://archive.mozilla.org/pub/firefox/releases/159.0.1/win64/en-US/Firefox Sha256=5e9e344fcf409d07351c20814b17214d59c39e3669142b8b7267556bb394577b SizeBytes=94740480 FileName=Firefox-Setup-159.0.1.msi +; demo image (i386): the 32-bit MSI of the same release; its SHA-256 is the one in the signed SHA256SUMS of the release (win32/en-US). +Url.x86=https://archive.mozilla.org/pub/firefox/releases/159.0.1/win32/en-US/Firefox%20Setup%20159.0.1.msi +Sha256.x86=8f3d81978a0de36966b06492466a44ffebd792ccf45d2cd25ddc573009db8a89 +SizeBytes.x86=83345408 +FileName.x86=Firefox-Setup-159.0.1-x86.msi DetectFile=%ProgramFiles%\Mozilla Firefox\firefox.exe ; Mozilla's documented MSI properties: no maintenance service (it is only for silent background updates) and no ; default-browser agent scheduled task; the shortcuts stay at their defaults (all-users Desktop and Start menu). diff --git a/base/applications/featmgr/catalog/x86/powershell-7.ini b/base/applications/featmgr/catalog/x86/powershell-7.ini new file mode 100644 index 00000000000..a8ceecf7559 --- /dev/null +++ b/base/applications/featmgr/catalog/x86/powershell-7.ini @@ -0,0 +1,65 @@ +[Feature] +Id=powershell-7 +Name=PowerShell 7 (LTS) +Description=Microsoft's cross-platform PowerShell (pwsh), 7.6 LTS. The default amd64 image installs it during setup from the MSI it carries; The staged MSI is deleted once the install has succeeded (Windows Installer keeps its own copy: repair and uninstall work from that); Install here from that local MSI when still present (works offline), else it downloads the official x64 MSI from the PowerShell GitHub release (about 112 MiB, SHA-256 checked); then runs it silently: adds pwsh to the system PATH and the Start-menu shortcut. PowerShell remoting, the Microsoft Update opt-in and Explorer context-menu entries are left off. x86 (32-bit) package on a 32-bit NitroOS. +Tier=software +Version=7.6.8 +Group=Developer tools +Dependencies= + +; i386 manifest (demo image): v7.6.9 and v7.6.10 x86 MSI assets on GitHub are broken (2003-byte block list, 2026-11-21), so 7.6.8 is pinned here. +[Install] +Provider=native +; Installed iff pwsh.exe exists: setup installs the MSI itself, so the entry is detected, not only recorded. +DetectPath=%ProgramFiles%\PowerShell\7\pwsh.exe + +[Rapps] +; Local-first: when this MSI is in the feature's payload folder (%SystemRoot%\Featmgr\Payload\powershell-7, put there by the +; image under this name) and its SHA-256 matches [Source] ArtifactSHA256, install runs msiexec on it with the MsiProperties below +; and never touches the network; otherwise featmgr downloads the release MSI ([Source]) and checks that same SHA-256. +LocalInstaller=PowerShell-x86.msi +; LocalInstallerDrop=1: after a SUCCESSFUL install (exit code 0, no restart pending, and Windows Installer's own cached copy of +; the package is registered and has the same size) the staged copy is deleted: it would otherwise sit on disk next to +; %SystemRoot%\Installer\.msi (118 MB twice). Repair (msiexec /fa, Programs and Features) and uninstall work from the +; cached copy; an install through this entry after that downloads the MSI again. A failed or deferred install keeps the file. +LocalInstallerDrop=1 +; UninstallName: the MSI's ProductName (Add/Remove Programs name); featmgr finds the installed product by it and runs +; "msiexec /x{ProductCode} /qn", so uninstall needs no stored product code and keeps working across a version bump. +UninstallName=PowerShell 7-x86 +; Public properties of the official MSI, appended to "msiexec /i /qn /norestart": +; PWRSHPLUGIN_VERSION=1 waive the launch condition "WMF 4+ (System32\pwrshplugin.dll) required"; +; that file is the WinRM remoting plugin, which nitro has no use for +; ADD_PATH=1 add the install folder to the system PATH +; ENABLE_PSREMOTING=0 do not enable PowerShell remoting (nitro has no WinRM) +; REGISTER_MANIFEST=0 do not register the ETW/event manifest (wevtutil) +; USE_MU=0 ENABLE_MU=0 no Microsoft Update opt-in +; ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL=0 ADD_FILE_CONTEXT_MENU_RUNPOWERSHELL=0 no shell verbs +; The Start-menu shortcut "PowerShell 7 (x64)" is unconditional in the MSI. +MsiProperties=PWRSHPLUGIN_VERSION=1 ADD_PATH=1 ENABLE_PSREMOTING=0 REGISTER_MANIFEST=0 USE_MU=0 ENABLE_MU=0 ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL=0 ADD_FILE_CONTEXT_MENU_RUNPOWERSHELL=0 + +; Why the MSI is run with PWRSHPLUGIN_VERSION=1 (see the MsiProperties line in powershell-7.txt): +; the stock MSI has a launch condition that looks for %WINDIR%\System32\pwrshplugin.dll (the WSMan +; remoting plugin from WMF 4+). Current images ship a stub pwrshplugin.dll that satisfies it (every entry +; point fails, so remoting is not pretended), and the stock MSI installs without the property. The +; property stays so that this entry also works on images that predate the stub; it only waives a +; prerequisite that matters for PowerShell remoting, which is also kept off (ENABLE_PSREMOTING=0). +; No WSMan plugin is registered and no PowerShellEngine registry key is written. + + +; The MSI is not in git. amd64 images built with the preinstall (stage-powershell7.sh, pinned URL + SHA-256) carry it +; and syssetup installs it through "featmgr /enable powershell-7"; an image without it downloads it from the PowerShell +; release on GitHub at install time (featmgr verifies the SHA-256 below before running it). +; Version bump (manual, no auto-discovery): take the new 7.6.x LTS from +; https://github.com/PowerShell/PowerShell/releases (asset hashes.sha256, or the asset's digest) and change, +; here: Version=, Artifact= (URL carries the version), ArtifactSHA256=, SizeBytes=; in +; Catalog\components.ini [powershell-7]: Url, Sha256, SizeBytes, FileName, the Uninstall ProductCode; and in +; payload\powershell-7\stage-powershell7.sh: VERSION, SHA256 and the +; LICENSE.txt / ThirdPartyNotices.txt of the tag. Keep all of them identical; then re-run the featmgr live install test. +[Source] +Artifact=https://github.com/PowerShell/PowerShell/releases/download/v7.6.8/PowerShell-7.6.8-win-x86.msi +ArtifactSHA256=b07c708f79ceff374f29f25010f4c51c0c6225c1c9f02175784e11574b6dff8a +SizeBytes=110415872 +Arch=x86 +Publisher=Microsoft Corporation +URLSite=https://github.com/PowerShell/PowerShell +License=MIT (PowerShell); LICENSE.txt and ThirdPartyNotices.txt of the release ship with the bundled MSI (Featmgr\Payload\powershell-7). The MSI is the unmodified official x64 package. -- 2.53.0