Skip to content

Draft: Add script to start KDevelop using vswhere

Simon Redman requested to merge work/sredman/kdevelop-use-vswhere into master

Add a script to start KDevelop using vswhere, which allows us to find any version of Visual Studio without needing to manually add more hacks to kdevelop-msvc.bat.

This is posted for early feedback. Some possible discussion points:

  • Is it preferred to have the script download vswhere on the fly (as I have done) or bundle vswhere with kdevelop?
    • I had it download on the fly because it avoids needing to add MIT licensing disclaimers for shipping this .exe.
    • Downloading on the fly also keeps the .exe out of the repository and keeps git happy.
    • There is another option: Since it is included with newer Visual Studio installers, we could rely on the old registry key method and combine those results with the results from using the pre-installed vswhere.exe.
      • IMO, this would be high-effort and low-reward.
  • Preferences for rollout:
    • Keep the .bat in case this new script breaks and allow (power) users to "fall back" manually?
    • Delete the .bat

Tested on various Windows installations with various mixes of Community, Enterprise, and no version of Visual Studio. One machine had versions 2014 through 2019, all of which were picked up.

TODO:

  • Does not successfully launch on my machine. Not sure if this is because the script is doing something wrong or if my kdevelop install is somehow broken.
  • I would appreciate if someone else could test! Just download and run the script from anywhere.
  • Update the .bat file to call this script, or maybe update the start menu shortcut to use this script directly.
    • Is the shortcut created by Craft? Does anyone have a link?

Merge request reports