Skip to content

Conversation

@SorYoshino
Copy link
Contributor

@SorYoshino SorYoshino commented Oct 17, 2025

Summary

This PR updates the hwinfo manifest to version 8.32 and refactors its structure for better maintainability and compatibility across architectures.

Related Issue

Changes

  • Updated version to 8.32 and adjusted download URL and SHA256 hash.
  • Added structured license field with reference URL.
  • Refactored pre_install logic for each architecture:
    • 64bit: removes unnecessary 32-bit and ARM files, renames executables containing 64.
    • 32bit: removes 64-bit and ARM files, renames executables containing 32.
    • arm64: removes x86/x64 files and renames ARM-specific executables.
  • Replaced static persist entries with dynamic logic in the installer script:
    • Automatically creates or links the correct configuration file (HWiNFO64.INI, HWiNFO32.INI, or HWiNFO_ARM64.INI).
    • Copies license key files (*_KEY.txt) between $persist_dir and $dir.
  • Simplified bin and shortcuts definitions to a single consistent executable name: HWiNFO.exe.
  • Updated checkver and autoupdate rules to match new version and URL patterns.

Testing

# The manifest can be automatically updated as normal
┏[ D:\Software\Scoop\Local\apps\scoop\current\bin][ master ≡]
└─> .\checkver.ps1 -App hwinfo -Dir "D:\Temporary\Software\Microsoft\Windows Sandbox\Repositories\Scoop\Buckets\Extras\bucket" -f
hwinfo: 8.32 (scoop version is 8.32)
Forcing autoupdate!
Autoupdating hwinfo
DEBUG[1760710761] [$updatedProperties] = [url hash] -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:491:5
DEBUG[1760710762] $substitutions (hashtable) -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:221:5
DEBUG[1760710762] $substitutions.$urlNoExt                      https://www.sac.sk/download/utildiag/hwi_832
DEBUG[1760710762] $substitutions.$buildVersion
DEBUG[1760710762] $substitutions.$minorVersion                  32
DEBUG[1760710762] $substitutions.$matchHead                     8.32
DEBUG[1760710762] $substitutions.$majorVersion                  8
DEBUG[1760710762] $substitutions.$url                           https://www.sac.sk/download/utildiag/hwi_832.zip
DEBUG[1760710762] $substitutions.$matchTail
DEBUG[1760710762] $substitutions.$underscoreVersion             8_32
DEBUG[1760710762] $substitutions.$match1                        8.32
DEBUG[1760710762] $substitutions.$dotVersion                    8.32
DEBUG[1760710762] $substitutions.$version                       8.32
DEBUG[1760710762] $substitutions.$basename                      hwi_832.zip
DEBUG[1760710762] $substitutions.$preReleaseVersion             8.32
DEBUG[1760710762] $substitutions.$basenameNoExt                 hwi_832
DEBUG[1760710762] $substitutions.$patchVersion
DEBUG[1760710762] $substitutions.$baseurl                       https://www.sac.sk/download/utildiag
DEBUG[1760710762] $substitutions.$cleanVersion                  832
DEBUG[1760710762] $substitutions.$dashVersion                   8-32
DEBUG[1760710762] $hashfile_url = $null -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:224:5
Downloading hwi_832.zip to compute hashes!
Loading hwi_832.zip from cache
Computed hash: 4405ca101962c367da881985072f70ea9533bd018b51e2d0b0203584fbe437f7
Writing updated hwinfo manifest

# Specify the installation architecture as **ARM64**
┏[ D:\Temporary\Software\Microsoft\Windows Sandbox\Repositories\Scoop\Buckets\Extras\bucket][ hwinfo ≢  ~1]
└─> scoop install .\hwinfo.json --arch arm64
Installing 'hwinfo' (8.32) [arm64] from 'D:\Temporary\Software\Microsoft\Windows Sandbox\Repositories\Scoop\Buckets\Extras\bucket\hwinfo.json'
Loading hwi_832.zip from cache.
Checking hash of hwi_832.zip ... ok.
Extracting hwi_832.zip ... done.
Running pre_install script...done.
Running installer script...Persisting HWiNFO_ARM64.INI
done.
Linking D:\Software\Scoop\Local\apps\hwinfo\current => D:\Software\Scoop\Local\apps\hwinfo\8.32
Creating shim for 'HWiNFO'.
Making D:\Software\Scoop\Local\shims\hwinfo.exe a GUI binary.
Creating shortcut for HWiNFO (HWiNFO.exe)
'hwinfo' (8.32) was installed successfully!

# Keep only the files for the **ARM64** architecture
┏[ D:\Software\Scoop\Local\apps\hwinfo\current]
└─> Get-ChildItem -Path .\ -Include '*.exe', '*.ini' -Recurse

        Directory: D:\Software\Scoop\Local\apps\hwinfo\current


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
la---        2025/10/17     22:14             26   HWiNFO_ARM64.INI
-a---        2025/10/14     14:55       13167088 󰣆  HWiNFO.exe

# Persist only the configuration file for the corresponding architecture
┏[ D:\Software\Scoop\Local\apps\hwinfo\current]
└─> (Get-Item .\HWiNFO_ARM64.INI).LinkType
HardLink

┏[ D:\Temporary\Software\Microsoft\Windows Sandbox\Repositories\Scoop\Buckets\Extras\bucket][ hwinfo ≢  ~1]
└─> scoop update hwinfo -f
hwinfo: 8.32 -> 8.32
Updating one outdated app:
Updating 'hwinfo' (8.32 -> 8.32)
Downloading new version
Loading hwi_832.zip from cache.
Checking hash of hwi_832.zip ... ok.
Running pre_uninstall script...done.
Uninstalling 'hwinfo' (8.32)
Unlinking D:\Software\Scoop\Local\apps\hwinfo\current
Installing 'hwinfo' (8.32) [arm64] from 'D:\Temporary\Software\Microsoft\Windows Sandbox\Repositories\Scoop\Buckets\Extras\bucket\hwinfo.json'
Loading hwi_832.zip from cache.
Extracting hwi_832.zip ... done.
Running pre_install script...done.
Running installer script...Persisting HWiNFO_ARM64.INI
done.
Linking D:\Software\Scoop\Local\apps\hwinfo\current => D:\Software\Scoop\Local\apps\hwinfo\8.32
Creating shim for 'HWiNFO'.
Making D:\Software\Scoop\Local\shims\hwinfo.exe a GUI binary.                                                           
Creating shortcut for HWiNFO (HWiNFO.exe)
'hwinfo' (8.32) was installed successfully!
  • Use conventional PR title: <manifest-name[@version]|chore>: <general summary of the pull request>
  • I have read the Contributing Guide

Summary by CodeRabbit

  • New Features

    • License now includes a direct URL to full license terms.
    • Application executable and shortcut are declared centrally for consistent behavior.
  • Refactor

    • Centralized installer and installation scripts for all architectures.
    • Removed per-architecture persistence declarations and unified install flow.
    • Updated version-checking and auto-update references for more reliable update detection.

@coderabbitai
Copy link

coderabbitai bot commented Oct 17, 2025

Walkthrough

The hwinfo.json manifest is updated: version bumped to 8.32, license changed from a string to an object, per-architecture bin/shortcuts removed in favor of a top-level bin and shortcuts, installer scripts centralized under installer.script, and checkver/autoupdate URLs/patterns adjusted to the new upstream version source.

Changes

Cohort / File(s) Summary
hwinfo manifest restructure
bucket/hwinfo.json
Version -> 8.32; license changed from string to { identifier, url }; removed per-arch bin/shortcuts and persist; added top-level bin (HWiNFO.exe) and shortcuts (["HWiNFO.exe","HWiNFO"]); introduced installer.script and per-arch pre_install scripts; updated checkver URL/pattern and adjusted autoupdate URL usage.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant User
    participant Scoop
    participant Manifest as hwinfo.json
    participant ArchBlock
    participant InstallerScript

    User->>Scoop: scoop install hwinfo
    Scoop->>Manifest: read version, bin, shortcuts, checkver, autoupdate
    Manifest->>Scoop: provide top-level installer & per-arch pre_install
    Scoop->>ArchBlock: select architecture block (64/32/arm64)
    ArchBlock->>Scoop: run pre_install (arch-specific)
    Scoop->>InstallerScript: run installer.script (top-level)
    InstallerScript->>Scoop: create bin, shortcuts, perform install steps
    Scoop->>User: installation complete (HWiNFO.exe, shortcut)
    Note right of InstallerScript:#9fdfbf:green
    Note right of InstallerScript: installer.script centralizes install logic
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • z-Fng

Poem

🐇 I hop through JSON, tidy and spry,

License shaped neat, version steps high.
Scripts gathered close, one installer to bind,
Shortcuts and bin now easy to find.
HWiNFO hops on—8.32, so kind!

Pre-merge checks and finishing touches

✅ Passed checks (4 passed)
Check name Status Explanation
Title Check ✅ Passed The pull request title "hwinfo: Update to version 8.32, fix checkver, refactor manifest" directly and accurately summarizes the primary changes in the changeset. The title is concise, specific, and follows a conventional format that clearly communicates the three main objectives: version update, checkver fix, and manifest refactoring. It avoids vague terminology and noise, making it easy for reviewers scanning the history to understand the purpose of the changes. The title correctly reflects all major components present in the actual code modifications.
Out of Scope Changes Check ✅ Passed All code changes are directly aligned with the scope defined by issue #16361 and the PR objectives. The version update to 8.32, checkver/autoupdate fixes, and license field restructuring are necessary components of resolving the update detection failure. The refactoring of per-architecture pre_install logic and replacement of static persist entries with installer scripts are explicitly mentioned in the PR description as part of the manifest improvement strategy. The simplified bin/shortcuts declarations support consistent multi-architecture deployment. No extraneous changes, unrelated refactoring, or feature additions are present outside the stated objectives of fixing version detection and updating to 8.32.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Description Check ✅ Passed The pull request description is comprehensive and well-structured, following the template requirements. It includes a clear summary of changes, properly formatted issue references (Closes #16361 and Relates to #16379), detailed explanations of all modifications organized by category, and extensive testing evidence demonstrating successful version updates and multi-architecture installation. Both required checkboxes are checked, confirming the use of a conventional PR title and adherence to the contributing guide. All mandatory sections from the template are present and appropriately filled out.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

All changes look good.

Wait for review from human collaborators.

hwinfo

  • Lint
  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate

Check the full log for details.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2f02697 and 32c65a9.

📒 Files selected for processing (1)
  • bucket/hwinfo.json (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: WindowsPowerShell
🔇 Additional comments (5)
bucket/hwinfo.json (5)

2-2: Version, license, and download URL updated correctly.

Version bumped to 8.32 with matching download URL (hwi_832.zip) and hash. License modernized to structured object format with identifier and reference URL.

Also applies to: 5-10


13-28: Architecture-specific pre_install scripts correctly target relevant files.

Each architecture branch appropriately removes irrelevant binaries (32, 64, ARM) and renames architecture-specific executables by stripping version/architecture suffixes (e.g., hwinfo64.exehwinfo.exe). The rename patterns align with the unified bin: "HWiNFO.exe" declaration at line 41.


41-47: Top-level bin and shortcuts unified correctly.

Consolidating architecture-specific bin/shortcuts into a single top-level declaration (pointing to HWiNFO.exe) is clean after the pre_install scripts rename executables to a common name.


48-52: pre_uninstall mirrors installer logic symmetrically.

License key files are backed up and persist data is unlinked during uninstall, mirroring the installer's creation and linking of INI and key files. Consistent use of architecture-based INI naming.


57-59: No action required — autoupdate URL formula is correct.

For version "8.32", Scoop parses it as $majorVersion = "8" and $minorVersion = "32", so the placeholder expansion hwi_$majorVersion$minorVersion.zip correctly produces hwi_832.zip as intended. The code is working as expected.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (1)
bucket/hwinfo.json (1)

48-51: Duplicate: unlink_persist_data also uses incorrect syntax.

Line 51's unlink_persist_data @{ persist = "$setting_name" } $dir has the same issue as line 37—passing a hashtable instead of the manifest object. Both function calls must be corrected together.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 32c65a9 and 4425a86.

📒 Files selected for processing (1)
  • bucket/hwinfo.json (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: WindowsPowerShell
🔇 Additional comments (4)
bucket/hwinfo.json (4)

2-2: Version, license, and URL updates look correct.

The manifest now targets v8.32 with the updated download URL and hash. The license structure follows Scoop's object format, improving metadata clarity.

Also applies to: 5-10


13-29: Architecture-specific pre_install scripts are well-structured.

Each architecture correctly filters and removes irrelevant binaries, then normalizes the naming of the active architecture's executable. The PowerShell logic is sound.


41-47: Top-level bin and shortcuts consolidation is clean.

By normalizing architecture-specific executables to HWiNFO.exe via the pre_install scripts, the unified bin/shortcuts declaration improves maintainability without redundancy.


57-59: Autoupdate URL template is correctly formatted.

The version templating $majorVersion$minorVersion correctly maps to the download pattern (e.g., 8.32 → hwi_832.zip). This will work once checkver is fixed to properly detect new versions.

@SorYoshino
Copy link
Contributor Author

/verify

@github-actions
Copy link
Contributor

All changes look good.

Wait for review from human collaborators.

hwinfo

  • Lint
  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate

Check the full log for details.

@brian6932 brian6932 mentioned this pull request Oct 24, 2025
2 tasks
brian6932 added a commit to brian6932/Extras that referenced this pull request Oct 24, 2025
brian6932 added a commit to brian6932/Extras that referenced this pull request Oct 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: hwinfo stopped updating

1 participant