oryol icon indicating copy to clipboard operation
oryol copied to clipboard

how to add local resources into bundle

Open neshume opened this issue 8 years ago • 5 comments

is there a way to add local resources to bundle (like textures in a data dir) and read using LocalFS? it seems all samples use http for textures.

cheers,

-neshume

neshume avatar Mar 16 '17 15:03 neshume

I solved a similar problem in another project with a code-gen script (it doesn't generate code though, just copy files from the project directory into the deployment directory). I don't use this for bundling iOS applications, just for easier testing of desktop apps, so you may need to tweak the destination directory.

The advantage is that this is executed during a normal build, you don't need to run anything separate.

I've created a gist with the required parts:

https://gist.github.com/floooh/3c39770128a523175eb2e380e5da08da

With the new VSCode build configs, you can debug the fips-code-generator scripts, if you have the Python support installed (https://marketplace.visualstudio.com/items?itemName=donjayamanne.python), simply start debugging with the "fips codegen" target:

image

Let me know if this works for you :)

floooh avatar Mar 16 '17 18:03 floooh

thx alot flooh .. trying this out .. i was looking in this direction (looked in the fonts stuff resources in the samples) but this looks more complete ..

cheers,

  • neshume

neshume avatar Mar 16 '17 22:03 neshume

hi floooh ,

no matter what I do I get errors ..

one of them is n3h5_files which I dont know what it is (not a cmake command)

and than it cannot find the module filecopy even if I put the filecopy.py in the root project fips-generators folder.. I am missing something .. I think.. ;o)

-neshume

neshume avatar Mar 17 '17 12:03 neshume

ah I left the wrong line in the CMakeLists.txt gist, you need to remove the n3h5_files line in the CMakeLists.txt file. Did you check for typos in the filecopy.py filename and the CMakeLists.txt fips_generate() command?

floooh avatar Mar 17 '17 19:03 floooh

Hi floooh,

you were correct .. the solution you gave covers the basic needs for testing and windows/linux app .. less a macosx app (not in bundle)..

thx for the fast solution..

cheers,

-neshume

neshume avatar Mar 19 '17 09:03 neshume