Blender version selector automatically picks the correct Blender version when you double-click a .blend file based on which version of Blender the file was last saved in!
Essentially this is useful for anyone that frequently use different versions of Blender on the same computer & for different projects. For my particular usecase I originally developed this as I use one Blender version for my Armory 3D projects and another more recent version for other projects as I tend to love using alpha/beta releases (of which Armory typically doesnt support).
If the version selector fails to find a version on your system that matches the version of which the blend file was last saved in, it will prompt you which version you wanna use instead
For the time being its Windows only, though it might be relatively easy to port considering the entire application is under 300 lines of code.
Download
Demo video
You can set the video resolution to 1080p at the bottom right
I wrote the code in mind that it should run well on Linux as well or at least be ported with minimal effort. If youre lucky and feel like giving it a go. You could try installing Clang or GCC on your Linux machine and compiling my code using clang main.cpp. My gut tells me it might just work
I dont have Linux installed, so it would be a little more tedious on my end to do this however
Oh, well then I guess it maybe isnt that straight forward
$ clang main.cpp
main.cpp:175:5: warning: expression result unused [-Wunused-value]
versionSelectorExecutableFilePathExcludingExecutableFileName;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:198:5: warning: expression result unused [-Wunused-value]
settingsJsonFilePathIncludingFileName;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:328:1: error: use of undeclared identifier ‘strcpy_s’; did you mean ‘strcpy’?
strcpy_s(textFromBlendFile, “…”);
^~~~~~~~
strcpy
/usr/include/string.h:122:14: note: ‘strcpy’ declared here
extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
^
2 warnings and 1 error generated.
This one is strange. strcpy_s is a function defined in the library string.h, which we are including in the file. However the compiler is telling you that it cant find any “strcpy_s” despite of that.
I might setup a Linux virtual machine and give this a go relatively soon myself, but that last error is suggseting that you would replace strcpy_s with strcpy. But I dont think thats gonna work with the way I used the function so I cant really come up with any super quick solutions to that one
$ clang main.cpp
main.cpp:8:10: fatal error: ‘windows.h’ file not found #include <windows.h>
^~~~~~~~~~~
1 error generated.
That “windows.h” include at the top is def not Linux compatible btw I just realized, it appears to be unused so like you probably already did, just remove the line.