-
Notifications
You must be signed in to change notification settings - Fork 20
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
Add Cli launching, file associations, shortcut generation #127
Conversation
This might be considered inaccurate to some
It'll look weird. But it's allowed
I have this error when clicking
|
On Windows, is the When I did the file association registration, Windows asked me to choose a program to launch the Blender file on the first launch, and instead of the Blender Launcher, it was Python with the Python icon. Also, |
Oh oops, that's an easy fix. I'll do that rn
Are you creating the shortcut outside of a bundled executable? If so it's likely python needs a terminal for whatever reason. For me at least, no terminal shows up when I create a shortcut using the frozen executable.
This is also a symptom of running it directly from Python, from my testing |
It may be a little tricky, but that's what the version matching system is great at :D
Yeah, that could be done. Does that mean it won't launch automatically or it will launch as soon as possible?
|
Oh, okay, I misunderstood how this was working. So yes, the old button description makes more sense. I just feel like it's a bit too technical for a typical user; they might not understand what the button does. Some people might not know what a query is.
Ah, this is not used in English 😅. It's a French expression for "typical user". |
This reverts commit 3c92bf2.
That's true, it could still be rethought
Oh that makes sense lol. I only know There are benefits for both interpretations, but there are also cons Saving the search query for individual files mean if you want to run a specific version of 4.2.0 on a file made in version 4.2.0, you can set it and not have to worry. But on the other hand, every file would have to be configured, and we would have a problem with how to actually save that data; would we open the blendfile and save it somewhere in scene data? would we keep a dictionary of paths and search queries? what happens when those files move? I like this idea but when it comes to actually performing it, I'm sorta stumped Saving the search query for minor versions mean that you can more easily change the default build of every blendfile made in that version. The downside is you can't make special cases that the first strategy is great at making (eg. you can't assign a specific build to a specific file) There is a world where these two strategies are used in combination. Default builds per version, but individual files can specify what build they want. We do sort of allow this in the commandline. It's trivial to set this up yourself with the current method. You're just using a shell/batch script instead of the actual file. This is why I'm hesitant to rewrite the whole system to accomodate this one case
|
yeah that looks about right to me |
So what is left for us to do here before we merge this? I saw you were doing stuff with special file icons. We could probably accomplish that if we extract it from the exe at some point and direct the windows registry to the extracted icon. In Linux, something else handles icons so we don't need to worry about that |
Yes, I think it's the last thing to do. I'm not really sure how to export the icon and link it to the blend file. |
is there some sort of project file you used to make the file icons? might be a good idea to add it for consistency sake, like the launcher logo blendfile |
I remade it in Blender, it's in a new scene in the Blender file |
oh cool, thanks |
Are we ready to merge this pr? |
Everything seems to be in order, the only thing left to do is to let people test it i guess :D |
We will do a pre-release with all of that soon! If possible I want to wait for the request issue to be fixed. |
Add Cli launching, file associations, shortcut generation
This adds methods to launch different versions of blender from the commandline, and using those methods, also adds file associations via .desktop files on linux and registry keys on windows.
New settings
The Create Shortcut button makes a popup dialog to choose where to make the shortcut. Since I started this branch in Linux, I naturally started with making the shortcut option first because I had assumed it would be as similar on windows
(Un)Register File Association options are only available on Windows, as on Linux the shortcut allows the same thing via .desktop application mimetypes.
Launch timer describes how much time you have before a blendfile is opened in the selected blender build. This is only active if there is a good initial guess on which build the user wants to run.
File Association launching
This opens when you launch
.blend
files with Blender Launcher. Every option here controls a query that is sent to a matcher that matches every build available to it.In the list, you can double-click builds to insert the build information to the fields. It's a good choice to quickly choose a specific build.
That prompt
Save query for 4.2.0 blendfiles
will save the current configuration to the settings, and will fill in the fields for every blendfile you launch that was made in 4.2.0. It can remember the configuration for every minor version (2.79, 3.0, 3.1, 4.0, 4.2, etc.)You can use characters ^, *, - to control relevancy.
^
compares the newest/largest version.*
lets anything pass-- it does nothing.-
compares the oldest/smallest version.the characters
^
and-
work on all pieces of the version selection, and the date selection.In my experience, date comparison using hard datetime values are really unreliable, so I only expose the temporal and wildcard options for the date.
The Launch button is enabled when there is only one possible solution to the version query.
Related to #81