Skip to content

Accommodate upstream Windows vulkan_sdk.exe structure changes #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

humbletim
Copy link
Owner

This PR addresses an issue with the Vulkan SDK installation on Windows, where recent changes to the installer's structure broke the existing 7z extraction method and caused FindVulkan to fail in CMake.

Problem

Sometime in the recent past the internal layout of the official Vulkan SDK installers for Windows was modified. As a result, simply extracting the archive with 7z no longer provides the necessary SDK headers (Include/ directory), making the SDK unusable for compilation.

Solution

This PR implements a more robust, "fall-forward" installation strategy for Windows:

  1. It first inspects the vulkan_sdk.exe archive to see if the Include/ directory is present at the top level.
  2. If it is (indicating an older layout), it uses the original, safer 7z extraction method.
  3. If not, it falls forward to invoking the installer in a headless, unattended mode, similar to the method already used for macOS.

The command used for the new unattended installation is:
./vulkan_sdk.exe --root "$VULKAN_SDK" --accept-licenses --default-answer --confirm-command install

Commentary

While invoking the installer directly is a pragmatic solution, the original preference for 7z was intentional. Surgically extracting contents is a security-conscious approach that minimizes the potential for side-effects (e.g., avoids creating system menu shortcuts, modifying the registry, or attempting to install other dependencies). It also aligns with the core principle of this action: providing a self-contained SDK environment without system-wide modifications.

The need for this change highlights a recurring challenge for open-source maintainers who depend on pre-built artifacts. Seemingly arbitrary changes to tooling and packaging can have a cascading effect, creating downstream work for the volunteer community. A more stable and predictable release process from SDK providers would be beneficial for the entire ecosystem..

See also:

@humbletim
Copy link
Owner Author

want to test this a bit more before merging into main and cutting v1.3 release.

to utilize the proposed fix sooner than v1.3, here the commit hash style uses:

-name: Install Vulkan SDK
   uses: humbletim/install-vulkan-sdk@033219e2d69dd4d3e873e217eb385fdd4b4438f4
   with:
     version: 1.4.321.0
     cache: true

@humbletim
Copy link
Owner Author

CC:

@drsnuggles8
Copy link

Nice, I've updated my GitHub Actions to use the specific commit to test it, and it fixed the problems I was having (issue #17). Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants