Assets folder not being copied to bin on build#41
Assets folder not being copied to bin on build#41Mairooriam wants to merge 1 commit intoSaschaWillems:mainfrom
Conversation
|
This includes a lot of changes to the tutorial code, which seems unintentional. |
|
Is the change meant for the pull request. One of my first pull requests. Is it possible for you to merge the specific commit or do you want me revert the other changes? I didn't know it automatically updates the pull requests when i push to the same branch. |
|
I fixed the branch to match the initial pull request. |
|
Even with the change this still only works if the executable is run with the build dir as the working directory, which may not always be the case, for example when running from the terminal as An alternative solution that doesn't need any CMake changes (and is thus more transparent to the user, I think) could be explicitly loading assets with an absolute path, such as |
|
@mosra I wasn't aware of that. I'm not knowledged enough to judge your solution, since I haven't had such problem before. But I thought of something else that is universal for all users. Lowest change that wouldn't need any code change would be to add a note into "Development environment" chapter or readme.md reminding of moving the assets. Along the lines NOTE: Make sure to move assets into the binary dir after build. Second that comes to mind is more explicit logging. Along the lines of wrapping the chk() into macro that also returns function / line number where it failed. Perhaps printing also the expression supplied to the chk(). |
|
I'll prob. fix this at CMake level, similar to what I do in my samples. |
Hello,
Project doesn't run correctly out of the box due to missing assets from the bin directory. Coupled with very indirect error messaging "Call returned an error" making it not so trivial to debug for beginners. I didn't modify tutorial texts due to the tutorial already skipping over much of the cmake configuration.
Not sure if makes a difference i'm using clang and ninja for generator.
NOTE: the CmakeLists.txt diff was generated with AI, which conflicts with "AI generated pull requests and issues will be rejected.".
If this will be rejected i hope someone to add proper fix. Reason for AI was due to my poor cmake skills.
Thanks for great tutorial.