-
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: 30 comments 133 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.
-
I'm trying to build OpenFrameworks libraries (apothecary) project alternative using Chalet, but I'm finding some difficulties in the bundle process. and json file here |
Beta Was this translation helpful? Give feedback.
-
Hey @rewrking can you please take a look on this project to see if there are more smart ways of achieving the same? Maybe a way of templating repeptitive settings? abstracts? thank you |
Beta Was this translation helpful? Give feedback.
-
I'm now trying to cross compile in Raspberry PI using github actions.
any ideas? action test: |
Beta Was this translation helpful? Give feedback.
-
I have other issue now. this line works for libusb - ${externalBuild:${name}}/*.a and this other one doesn't - ${externalBuild:${name}}/${ar:libusb} Both commands run ok, one bundle library other not (for this lib, other libs are working great with something like it is this repo / folder PS: I invited you to the repo and feel free to change anything there |
Beta Was this translation helpful? Give feedback.
-
other question: I have some github runners and I like to use environment variable to have ccache as CMAKE_CXX_COMPILER_LAUNCHER, like this: env:
CMAKE_CXX_COMPILER_LAUNCHER: ccache they work great directly compiling cmake projects, but I'm not sure chalet forwards environment variables to CMAKE invocations. Does it? |
Beta Was this translation helpful? Give feedback.
-
another suggestion: |
Beta Was this translation helpful? Give feedback.
-
just wondering if something like this can be useful for Chalet project: defines[arch:arm]:
- GLM_TEST_ENABLE_SIMD_NEON=ON
defines[arch:x86_64]:
- GLM_ENABLE_SIMD_AVX=ON
- GLM_ENABLE_SIMD_AVX2=ON
|
Beta Was this translation helpful? Give feedback.
-
quick question, is there a way of passing parameters to cmake, like |
Beta Was this translation helpful? Give feedback.
-
in this project here
and the verbose output shows the invocation is setting this variable twice, the first as 11.0 and the second as 14.5
|
Beta Was this translation helpful? Give feedback.
-
quick question: to run .sh in Windows do I need Windows Subsystem for Linux installed? |
Beta Was this translation helpful? Give feedback.
-
Some libraries like opencv needs cmake --install to generate the correct headers.
It is already working great, but out of curiosity: do you plan to support CMAKE install? |
Beta Was this translation helpful? Give feedback.
-
I'm now testing chalet on CI / Windows, and it fails for me even with simple scripts
https://github.com/dimitre/ofLibs/actions/runs/12933105553/job/36070926413 Anything I should be doing differently? Thanks |
Beta Was this translation helpful? Give feedback.
-
Mesonit would be great to have meson build also.
https://github.com/dimitre/ofLibs/actions/runs/13546463809/job/37859195548 And if I run the same script directly in github it works OK. |
Beta Was this translation helpful? Give feedback.
-
suggestionadding new parameters in chalet --help |
Beta Was this translation helpful? Give feedback.
-
Steps for one platform onlyI've just discovered macos has case insensitive file system (not exactly) so in libtess I can include a folder called "Include" with first letter capitalized and it works, on Linux not. I know the following is ugly, but it is a way of using Chalet variables to achieve what I need: tess2_rm:
condition: [:!macos]
kind: process
path: rm
arguments:
- -rf
- ${external:tess2}/include
tess2_mv:
condition: [:!macos]
kind: process
path: cp
arguments:
- -r
- ${external:tess2}/Include
- ${external:tess2}/include |
Beta Was this translation helpful? Give feedback.
-
Opencv difficulties on windowsI'm trying to build some libraries in multiple platforms, this repo has a folder for each lib the folder opencv fails on github, so I got a windows machine to test. but trying to run local on windows gives me other errors, so I'm suspecting it is related to yaml -> json conversion
using 0.8.3 on windows 11 (windows powershell) |
Beta Was this translation helpful? Give feedback.
-
Meson with other toolchainsI'm testing now meson projects with different toolchains, and some are failing |
Beta Was this translation helpful? Give feedback.
-
Possible regression on 0.8.4?This used to work well, it is building ok locally on 0.8.3 and failing on CI (0.8.4) |
Beta Was this translation helpful? Give feedback.
-
Brew tap.I wonder why we need to tap / untap when you update. usually it is not needed when you release a new version |
Beta Was this translation helpful? Give feedback.
-
I've just noticed to be able to build using meson and setting the proper macos version I should invoke this before invoking meson:
is there a way of setting export "environment " variables so chalet invokes meson with them? |
Beta Was this translation helpful? Give feedback.
-
I have some difficulties while using Chalet with Meson for cross compiling. |
Beta Was this translation helpful? Give feedback.
-
I'm wondering if it is possible to use chalet on windows using msys2. |
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…