Main icon indicating copy to clipboard operation
Main copied to clipboard

[email protected]: update package manifest to correctly handle new installers

Open marovira opened this issue 8 months ago • 12 comments

This PR addresses the following:

  1. Fixes #6805 . The new Vulkan installer does not allow complete extraction of the install tree through 7zip. This changes the logic to instead calling the installer directly. See the note below.
  2. Adds support for arm64 installers and removes 32-bit support. Vulkan deprecated 32-bit years ago, so the code is no longer relevant.
  3. Adds a QoL improvement by linking vkconfig-gui.exe and vulkanCapsViewer.exe to the start menu so users can easily configure validation layers as well as check supported features on their GPUs.

Note

There is a bug in the installer where attempting to run it with the copy_only flag still causes an uninstall entry to be added in the registry. The bug has been logged and can be found here. In order to ensure that the scoop install remains isolated from the registry, I added some code to the post_install node that will automatically scan the registry for the added Vulkan key and remove it. This should be a stop-gap measure until LunarG fixes the installer so that this doesn't happen. Once that occurs, I'll remove the extra code. Hopefully I will also be able to remove the call to run the installer itself as well.

  • [x] Use conventional PR title: <manifest-name[@version]|chore>: <general summary of the pull request>
  • [x] I have read the Contributing Guide

marovira avatar May 09 '25 16:05 marovira

Your changes do not pass checks.

vulkan

  • [x] Description
  • [x] License
  • [x] Hashes
  • [x] Checkver
  • [ ] Autoupdate
  • [ ] Autoupdate Hash Extraction

github-actions[bot] avatar May 09 '25 16:05 github-actions[bot]

/verify

marovira avatar May 09 '25 16:05 marovira

Your changes do not pass checks.

vulkan

  • [x] Description
  • [x] License
  • [x] Hashes
  • [x] Checkver
  • [x] Autoupdate
  • [ ] Autoupdate Hash Extraction

github-actions[bot] avatar May 09 '25 16:05 github-actions[bot]

/verify

marovira avatar May 09 '25 16:05 marovira

Your changes do not pass checks.

Invalid manifests

  • vulkan

github-actions[bot] avatar May 09 '25 16:05 github-actions[bot]

/verify

marovira avatar May 09 '25 17:05 marovira

All changes look good.

Wait for review from human collaborators.

vulkan

  • [x] Description
  • [x] License
  • [x] Hashes
  • [x] Checkver
  • [x] Autoupdate
  • [x] Autoupdate Hash Extraction

github-actions[bot] avatar May 09 '25 17:05 github-actions[bot]

Update: I've opened an issue at LunarG asking whether the loss of the ability to extract the entire SDK tree from the installer was intentional and whether it can be restored. The issue is logged here. Depending on the answer, it may be possible to return to extracting the installer once the next version of the SDK is released.

New update: the ability to extract the installer was an unintended side-effect and there is no plan to support it. The changes I've made to run the installer are required moving forward. The only part that will change once they resolve the uninstall key on the registry is the code to remove the registry entries. I'll do that once the new SDK installer rolls in and I've verified it doesn't do that anymore.

marovira avatar May 11 '25 16:05 marovira

Update: LunarG has decided to not remove the registry entry to uninstall the SDK moving forward. You can see the results of the discussion here. As a result, the code to manually remove the registry entry added by the installer will have to stay there.

I have also manually updated the installer to the latest version (1.4.313.1 at the time of this comment). Please let me know if you need anything from my side to close this PR!

marovira avatar Jun 01 '25 16:06 marovira

@Lutra-Fs @HUMORCE is there anything I can do to help get this merged in?

[!NOTE] The last two commits have been to keep the branch up to date with the latest releases of Vulkan to minimise the impact this could have when it gets merged. Feel free to ignore them and cherry pick the base commits out so the auto-update kicks in.

marovira avatar Jun 17 '25 16:06 marovira

Please provide minimal test case that we can verify it is works on a fresh environment.

HUMORCE avatar Jun 18 '25 12:06 HUMORCE

Please provide minimal test case that we can verify it is works on a fresh environment.

Sure thing! I'll provide two cases: one with the current behaviour, and one with the fix in this branch so you can see the difference and ensure things work.

Base Case

In a clean environment, open a terminal and run

scoop install vulkan

Once installation is complete, do the following:

  1. Navigate to %USERPROFILE%/scoop/apps/vulkan/current and see that there is a single folder called Bin and the install-vk-layers.ps1 script. Note that there should be several more folders like Lib, Include, etc.
  2. Navigate to the list of installed apps (Apps > Installed apps in Windows 11, Remove Programs in 10) and verify that Vulkan isn't listed.
  3. Open the start menu and go to the Scoop Apps folder and verify that no entries related to Vulkan are there.

This PR

Either clone this branch or grab bucket/vulkan.json. On a clean environment, run:

scoop install vulkan.json

After installation completes, do the following:

  1. Navigate to %USERPROFILE%/scoop/apps/vulkan/current and verify that the contents now are:
  • Bin
  • Config
  • Helpers
  • Include
  • installerResources
  • Lib
  • Licenses
  • share
  • Source
  • Templates
  • install.json
  • InstallationLog.txt
  • installer.dat
  • install-vk-layers.ps1
  • maintenancetool.dat
  • maintenancetool.exe
  • maintenancetool.ini`
  • manifest.json
  • network.xml
  • README.txt
  1. Navigate to the list of installed apps (Apps > Installed Apps in Win 11, Add or Remove Programs in 10) and verify that there are no entries related to Vulkan.
  2. Open the start menu and go to the Scoop Apps folder and see that two new entries have been added:
    • vkconfig-gui
    • vulkanCapsViewer
  3. Run scoop update vulkan and verify that the update logic runs successfully.
  4. Run scoop uninstall vulkan and ensure that:
    • The vulkan folder is completely removed in the scoop install folder.
    • The start menu items have been removed.

Let me know if you have any questions!

marovira avatar Jun 18 '25 17:06 marovira

@Lutra-Fs is there anything you need to approve this PR?

marovira avatar Jun 25 '25 00:06 marovira

@Lutra-Fs is there anything you need to approve this PR?

Hey @marovira,

Apologies for the delay — last week threw me off a bit, but I’m slowly getting back on track. I’ll test the PR later this week.

Appreciate your patience, Lutra-Fs

Lutra-Fs avatar Jun 25 '25 15:06 Lutra-Fs

I met an issue, using a fresh new Windows Sandbox environment will trigger vcredist install

[11613] Maintenance tool hard restart: false.
[11616] Installation finished!
[11648] vcRedist.install : Install VC++ Redistributables : The application requires the 64-bit Visual C++ redistributables. Please follow the steps to install it now.
[11648] Answer: "Ok"
[267905] perform  operation: Delete
[267905]        - arguments: C:/Users/WDAGUtilityAccount/scoop/apps/vulkan/1.4.313.2/Helpers/VC_redist.x64.exe
[267908] Done
[267911] Components installed successfully.
done.
Linking ~\scoop\apps\vulkan\current => ~\scoop\apps\vulkan\1.4.313.2
Creating shortcut for vkconfig-gui (vkconfig-gui.exe)

Is this intended? It will automatically download the exe and this VC_redist.x64.exe requires manual intervention

Lutra-Fs avatar Jun 25 '25 15:06 Lutra-Fs

I met an issue, using a fresh new Windows Sandbox environment will trigger vcredist install

[11613] Maintenance tool hard restart: false.
[11616] Installation finished!
[11648] vcRedist.install : Install VC++ Redistributables : The application requires the 64-bit Visual C++ redistributables. Please follow the steps to install it now.
[11648] Answer: "Ok"
[267905] perform  operation: Delete
[267905]        - arguments: C:/Users/WDAGUtilityAccount/scoop/apps/vulkan/1.4.313.2/Helpers/VC_redist.x64.exe
[267908] Done
[267911] Components installed successfully.
done.
Linking ~\scoop\apps\vulkan\current => ~\scoop\apps\vulkan\1.4.313.2
Creating shortcut for vkconfig-gui (vkconfig-gui.exe)

Is this intended? It will automatically download the exe and this VC_redist.x64.exe requires manual intervention

In all my testing, I've never had this come up, so I strongly suspect the VC++ Redistributable package is installed as part of another developer tool (likely Visual Studio) that you need to use the Vulkan SDK. In practice it is unlikely users will face this prompt as they will have the VC++ Redist package already installed. I don't think this is "intended" as much as it's a side-effect of having to run the installer itself as opposed to extracting it like we could before. In addition, I also suspect that the implementation of the installer on LunarG's side is not forwarding the "accept all" flag that is passed in to the installer.

marovira avatar Jun 25 '25 16:06 marovira

Yes, agree with your point. Would you mind writing a bug report in vulkan's forum? The PR itself LGTM

Lutra-Fs avatar Jun 26 '25 01:06 Lutra-Fs