-
-
Notifications
You must be signed in to change notification settings - Fork 183
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
Write the 'open' command and LaunchServices 🚀⭐️ #37
Comments
Would that imply writing something along the lines of Launch Services to find out what to open something with? We are in desperate need for something like it. |
Yes it would! |
Consider me super interested. |
Status update:
Next up:
|
Is there a spec/schema for |
It's mostly a blob store for the serialized LSAppRecord objects with columns for things that are searched (app URLs, extensions). The main table is
I also still need to write the |
For helloSystem we are trying to implement the core concept in a way as simple as possible. So I am not sure we want to start dealing with UTIs when everyone but Apple is using MIME types. What would be the arguments to rethink this? |
TBH I am not sure if I will stick with UTI internally or convert them to MIME. :) But anyway, I don't think you need to start dealing with UTIs unless you are writing an Info.plist. I can read the MimeTypes field from a XDG .desktop file to see what it opens, then manage that internally with whatever schema I use. Would that work for you? |
My view on desktop files is that they are a leagcy technology to be used as a fallback if we don't get a suitable application from the LS database. I imagine simplified application bundles to supply a list of supported MIME types, like GNUstep does (but most likely in somehting more modern/simpler than XML/plists). When encountering such an application bundle, Filer could add the information to the database.
Why a daemon? |
OK. I also consider them legacy but wasn't sure what your plans were. A bundle's Info.plist can contain a list of extensions and MIME types using the keys What did you have in mind for an alternative plist format?
The |
A simple format that one would use today and that is well supported by Qt.
Couldn't Filer maintain the database? Then no daemon would be needed. The watching never works properly anyway (at least not as the only measure) because applications can be at random paths. One of the original Mac OS X authors wrote:
|
If you're OK with Filer being responsible for calling LSRegisterURL under certain conditions, I am happy to go that way! You're right about that being how macOS really does it. JSON plists would be perfect. Reading them from a |
Looks like we have a plan then. The only thing I am not too keen on is to introduce non-Qt dependencies in Filer. Hence I am asking for how the database looks, so that Filer can use Qt to edit the SQLite database... |
There are quite a few non-Qt dependencies already - libfm, glib, menu-cache :) |
* Start on command * Add schema migration code * Expose a few functions for open cmd. Add bundle ID to database. * Implement -a, -b, -f and help output * More work on open command * Implement various launch options * Fix -j, -g options to launch hidden or inactive. * Stub -h option
How can the |
It will build as part of the LS framework, so you just type You may need to adjust some of the Makefiles if you don't have the Airyx clang and ld, which understand |
Thanks. That sounds straightforward enough! :+1 Running into
Easy,
seems to fix this. But then:
Wondering whether it has to do with things like |
Ooooo.. yeah. Your stuff is probably in |
That would be great, yes. Thanks! |
The
It would have to use |
Ah, shoot! I missed that one. Can you just change it for now and I'll come up with some kind of conditional check later? |
With
in place as a workaround, But
|
I moved |
Looks like |
This is so much easier with my patched I forgot the transitive dependencies of Foundation. Add |
There, I just pushed the change to |
It is in
How would one get it onto a FreeBSD/helloSystem machine? |
Have you actually installed the frameworks into /System/Library with
Grab https://dl.cloudsmith.io/public/airyx/core/raw/files/base.txz and extract the clang-related files from /usr/bin and /usr/lib/clang. It might be enough to just extract /usr/bin/clang and /usr/bin/ld. They're built against the FreeBSD stable/12 git branch. |
Doing now...
Still getting
Just my 2 cents here, isn't this approach unnecesarily holding back Airyx and fragmenting the landscape? I mean, don't you want any of your work to land in helloSystem and/or FreeBSD proper in some form or thoe other one day? (In helloSystem, we want to stay close to FreeBSD wherever possible for this exact reason - so, no custom kernels etc.) |
libobjc2 isn't in the Frameworks folder so you would still need to install that into /usr/lib and /usr/include. Look under ${BUILDROOT}/usr for those.
I'd be delighted for this to all end up in FreeBSD and other projects upstream, but it's the opposite case with respect to "holding Airyx back". If I constrained it to being 100% FreeBSD, I would be compromising on what airyxOS is and making it harder to develop. I'm not going to do that. Also I really doubt many "unix purists" would want these changes :) |
|
Add |
|
This isn't going to work with the unmodified compiler :( You might be able to make it work by messing with the option flags |
This is unfortunately out of reach for me, so for now it seems like I have to live without it. Or are there packages of |
Totally understandable - it is a lot. Every new build of the frameworks, tools, etc is available at |
Yes, this would be tremendous. |
Going in for next build! You should then be able to get the latest packages from CI at Hopefully that will make things a bit easier :) |
No description provided.
The text was updated successfully, but these errors were encountered: