-
First of all thank you very much by putting together everything needed to run and distribute a basic openFrameworks app. but I'm having a specific issue, the app bundle can't access data folder, and It seems data folder is being copied to Contents/MacOS instead of Contents/Resources where openFrameworks traditionally store data folder. is there some way of changing this? thank you |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 11 replies
-
Yeah... so this is a weird issue. I totally agree with you that it should be in Resources. On the one hand, On the other hand... I found a questionable piece of code in open frameworks - ofFileUtils:31-35. This seems to be getting the current executable directory, and then looking for the data folder 3 parents up. Do you happen to understand why it was written that way? I was testing with the box example, and the texture did not load in either the MacOS or Resource folder, however, if I edited that ofFIleUtils block to just use "data/", the texture will load if data is in the MacOS folder (and during development with |
Beta Was this translation helpful? Give feedback.
-
Wow yeah it seems like the data folder outside the bundle convention has been around for a while (found some discussions from '08). Can't say I agree with doing that though - I think app bundles should contain everything required to run, and that should be 95% of use cases. So the easy way to get this working would be to have this folder structure:
in ofSetDataPathRoot("bin/data/"); take out in "include": [
"bin" // or "data" - whatever the root folder is
] You would need to adjust your other paths that point to the of libs Might be time to just make a openFrameworks example repository... |
Beta Was this translation helpful? Give feedback.
-
Chalet is GREAT! here is my sample file today : https://gist.github.com/dimitre/5395276a925952327d8a194bb2d66645 Two things I'm having issues right now: "staticLinks": [
"open-frameworks",
"addons/ofxAssimpModelLoader/libs/assimp/lib/osx/assimp.a"
] and it would be great to use And the other thing is : for ofxSyphon addon it includes a custom Framework. so it would be great to know how to include a custom framework in an app. |
Beta Was this translation helpful? Give feedback.
-
I'm now using a separate Chalet project for OF and for the project, my last files are here: Everything is working great! |
Beta Was this translation helpful? Give feedback.
-
I'm now working in a super small project, inspired by Chalet. and built using Chalet. it is work in progress yet |
Beta Was this translation helpful? Give feedback.
-
I've recently worked in OF projectGenerator to be able to generate complete VSCode templates. |
Beta Was this translation helpful? Give feedback.
-
Hello @rewrking I'm now trying to build some Openframeworks dependencies using Chalet, and I'm having some difficulties in packaging process. Project is in this repo: https://github.com/dimitre/ofChalet This is commented out in the repo, but it seems Chalet can't add one .a library like this: "freetype": {
"kind": "archive",
"condition": "[:macos]",
"format": "zip",
"include": [
"${externalBuild:freetype}/*.a",
"${external:freetype}/include"
]
} if I remove the "*.a" and just left the ${externalBuild:freetype} folder I can see the .a is there. |
Beta Was this translation helpful? Give feedback.
Yeah... so this is a weird issue. I totally agree with you that it should be in Resources.
On the one hand,
copyFilesOnRun
was intended for files and paths that need to be relative to the executable at runtime - like usingLoadLibrary
on windows or some code that doesn't respect the working directory. There's some dodgy code around that feature when it comes to bundling - anything defined by copyFilesOnRun will be placed in the same path as the executable, so that's ultimately what you're seeing. It certainly needs some tweaks.On the other hand... I found a questionable piece of code in open frameworks - ofFileUtils:31-35. This seems to be getting the current executable directory, and th…