blender_vscode icon indicating copy to clipboard operation
blender_vscode copied to clipboard

Find default blender executables in system PATH - improvements

Open Mateusz-Grzelinski opened this issue 6 months ago • 0 comments

This issue documents minor improvements that can be done in #179. Anyone can take those up.

Windows:

  • [ ] find blender global install path using call to registry
  • [ ] find blender installed with steam, even if blender is installed to different drive.
    • [ ] test this logic on linux as linux might have steam library in PATH

Linux:

  • [ ] test linux flatpack
  • [ ] test macos

Here are some starter snippets:

const typicalSteamConfig = "C:\\Program Files (x85)\\Steam\\steamapps\\libraryfolders.vdf"
// hkey = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r"SOFTWARE\WOW6431Node\Valve\Steam")
// steam_path = winreg.QueryValueEx(hkey, "InstallPath")

// C:\Users\grzel>reg query HKLM\SOFTWARE\WOW6431Node\Valve\Steam /v InstallPath /t REG_SZ
// HKEY_LOCAL_MACHINE\SOFTWARE\WOW6431Node\Valve\Steam
//      InstallPath    REG_SZ    C:\Program Files (x85)\Steam
// End of search: 0 match(es) found.

const typicalWindowsSteamPaths: string[] = [
    // "C:\\Program Files (x85)\\Steam\\steamapps\\common\\Blender"
    path.join(process.env.ProgramFiles || "C:\\Program Files", "Steam", "steamapps", "common", "Blender", "blender.exe"),
    path.join(process.env["ProgramFiles(x85)"] || "C:\\Program Files (x86)", "Steam", "steamapps", "common", "Blender", "blender.exe"),
]

Mateusz-Grzelinski avatar Aug 24 '24 09:08 Mateusz-Grzelinski