-
-
Notifications
You must be signed in to change notification settings - Fork 296
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 support for macos app bundles / dirs retrieval at runtime #470
Conversation
Hi @flxzt , One thing is already clear though: I forgot that there is one more change necessary. This needs to be made dynamic as well: Line 147 in 777fdc0
The resources file ( resources.gresource ) needs to be loaded from a location relative to the application binary as well. Since we're already setting XDG_DATA_DIRS , you can use that, e.g. XDG_DATA_DIRS/rnote/resources.gresource .I am aware that this suggestion is risky as XDG_DATA_DIRS is supposed to contain a list of directories, but since that is something we control at this point (i.e. a list with one element), it would be safe. (Alternatively you'd have to iterate through the list of directories and try everyone of them to locate the resources.gresource file.)
|
787f251
to
b2a09ab
Compare
ce4a1ef
to
06749a0
Compare
4f41281
to
4f20b6a
Compare
to address your other comment, I refactored to retrieve all the relevant directories at runtime. Is it valid that the |
Yes, that is correct. As packager I have some influence over where I put stuff (since this is not a native app built by Xcode), but this is quite common. This is what the application bundle looks like:
|
okay, the mentioned issues should be solved now. What will the result be of your efforts, a script that can be executed on macos to create the bundle? |
Great, I'll test it again later today. The result will be this: https://gitlab.com/dehesselle/rnote_macos I'm using GitLab as I have CI infrastructure there (and GitHub's CI is sadly rather unstable for me). |
Almost there. Location of the main binary in this case is
|
argh, missed to remove those slashes while doing the refactoring. The executable dir name doesn't appear in your print output, but it is apparently lost when joining with the (invalid) absolute path (see here ) so I expect that it appears again with the fixed path. |
use exec dir on windows too
update windows instructions
Sorry you have to check this once more, now it wants to open
This needs to be the full canonical path. |
Okay. |
Apologies for the confusion, the intention was to "think like coreutils", e.g. dirname /whatever/path/to/some/random/binary To clarify: we need absolute paths for |
no worries, I read it wrong in the sense of "folder name" . Okay, now it should give Edit: I tweaked the icon some time ago, would be great if it would be updated for the bundle :) |
Thanks a lot for doing this! I want to mention and link to it in the README & on the website, do you have any suggestions for that / a formulation for macos users how to install / use it? Is it possible to have a permalink to the latest release?
That should be the icon which gets installed to |
You can link to the latest release by using
This doesn't work yet since I haven't created a release yet. I can create a release this weekend if you are good to go on 0.5.17. I'll put everything that people need to know in the readme, so for that you can link to the GitLab repo (see zim_macos as example). You can add it to your readme/website as you see fit. My first guess is to add it to "Installation" below Flathub? "Rnote is available for macOS here:". |
@flxzt final addendum: first release is live! |
This add some configuration to make app bundles in macos work. addresses #41