Use make_services: https://groups.google.com/forum/#!topic/gnu.gnustep.discuss/6SQ4sEbi5Gc
It ships with GNUstep GUI: https://github.com/gnustep/libs-gui/blob/a92b030dcbc226b04cfdf0f91e9cb9b7995f989e/Tools/make_services.m Reading it should probably hint you at which files are read when trying to find the relevant app to open a file. Ideally, GNUstep would use freedesktop.org mime apps spec: https://specifications.freedesktop.org/mime-apps-spec/mime-apps-spec-1.0.html the shared mime info spec: https://specifications.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-0.18.html and the desktop entry spec: https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.1.html But I don’t think it does. > On 12 May 2020, at 22:19, Andreas Höschler via Discussion list for the > GNUstep programming environment <[email protected]> wrote: > > Hi all, > > sorry for bothering you guys again. I am still not yet through with setting > up a productive work environment. > > When I double-click in some Finder like app on a file name - e.g. Test.gorm - > I programmatically do > > [[NSWorkspace sharedWorkspace] openFile:path]; > > and would like to see Gorm.app open automatically and see it loading the file > given by path (e.g. Test.gorm). Instead Test.gorm is opened on a Terminal > window which is a little surprising to me!? > > I unfortunately do not remember (from using GNUstep years ago) the exact > mechanism of giving NSWorkspace the > > pathExtension -> responsible application > > info. From checking out Gorm.app/Resources I conclude that the Resources > folder of an app needs to announce which kinds of files it can handle in some > Info-gnustep.plist file which actually is a propertyList with an NSTypes = > (...) entry!? > > But how and when and by whom are all the installed applications Resources > folders (the NSTypes entries) scanned to build a map so that NSWorkspace > knows what to do with a > > [[NSWorkspace sharedWorkspace] openFile:path]; > > call? Is this map automatically created by NSWorkspace whenever > sharedWorkspace is initiated? If so why does it not work for me (file > contents shown in a terminal session)? Or do I need to build this map by > calling some GNUstep utility manually after installing a new app? > > <s2.tiff> > > > Thanks a lot again, > > Andreas > >
