Skip to content
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

[PoC] Rework WinGet guide to make use of configurations #701

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

Conversation

stevapple
Copy link
Contributor

@stevapple stevapple commented Jun 7, 2024

Rework the "Installation via Windows Package Manager" page to include interaction, and simplify all the steps to two winget configure commands. Closes #437.

Motivation:

Installing Swift on Windows requires multiple steps, and some of which cannot be handled (gracefully) by WinGet and other package managers. Luckily, we now have winget configure, a tool that can perform all the desired actions to the system with a single manifest.

Modifications:

  • Replace the description "You may change the Visual Studio edition depending on your usage and team size." with a Visual Studio edition picker;
  • Introduce a Windows SDK version picker to allow selecting the desired SDK version;
  • Use winget configure in the guide, including:
    • Generating and serving configuration files on the website;
    • Allows automating the process of enabling developer mode on Windows.

Result:

The "Installation via Windows Package Manager" page is refreshed with new look (including VS and WinSDK picker) and to use winget configure. All the configuration files will be generated and served via the website.

2024年6月8日 GMT+8 02 39 47

@compnerd
Copy link
Member

compnerd commented Jun 7, 2024

Conceptually this is pretty cool. I assume that we would select defaults for the user (community edition, latest SDK release) and let them alter it? I've not looked at the implementation so I do not feel like I can "approve" it, but I do like the idea.

@stevapple
Copy link
Contributor Author

I assume that we would select defaults for the user (community edition, latest SDK release) and let them alter it?

Good idea! I've updated the default to VS Community and Windows 10.0.22621 SDK (the one shown in the screenshot), which is the default for VS 2022. The latest 10.0.26100 SDK is so new that VS has not officially adopted it yet.

@stevapple
Copy link
Contributor Author

Note: We may need to hold off the change until WinGet v1.9+ has released a stable version, which either enables elevation by default or allows user to toggle it on. Older versions may not have the capability, and stable versions up to 1.8 doesn't support any experimental features.

@stevapple stevapple changed the title Rework WinGet guide to make use of configurations [Hold off for merge, open for review] Rework WinGet guide to make use of configurations Jun 8, 2024
@stevapple stevapple changed the title [Hold off for merge, open for review] Rework WinGet guide to make use of configurations [PoC] Rework WinGet guide to make use of configurations Jun 8, 2024
@stevapple
Copy link
Contributor Author

stevapple commented Jun 8, 2024

So far I've tested the configurations on:

  • A machine with everything set up, where the commands basically do nothing and finish in seconds, as long as the corresponding configuration files are selected.
  • A sandbox with nothing but WinGet, where the commands are capable of setting up all the required stuffs to make Swift available as soon as they're done.

Also proved that the 10.0.26100 SDK (not installed from VS) works with Swift, even on Windows 10.

@timsneath
Copy link
Contributor

Curious: what happens when you run this command from an older version of WinGet (assuming the comment about 1.9 requirement is current)? Does it just fail?

The advantage of the current WinGet commands is that they work on almost any supported Windows machine.

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.

Recommend Windows users to use winget configure
4 participants