I have an egg file which contains:
<Texture> target_indicator {
target_indicator.png
}
The target_indicator.png file lies next to the egg file (in $MAIN_DIR/textures/ui/hud) and is loaded correctly when I run the game.
When building the game with python3 setup.py bdist_apps
the egg file gets converted into a bam file. When I run the build, everything works fine, but as soon as I move the build folder, I get:
gobj(error): Texture::read() - couldn't read: ../../../../../textures/ui/hud/target_indicator.png
:gobj(error): Unable to find texture "../../../../../textures/ui/hud/target_indicator.png" on model-path /tmp/wbwb_build:/../../:/../..//models
The path inside the bam file seems to be pointing back to the original texture in the source folder, not the one copied into the build folder.
I’ve already tried adding a file_handler to add “-ps rel” to the arguments of egg2bam when it’s called in the bdist_app process, but this results in the same paths:
egg2bam -ps rel textures/ui/hud/target_indicator.egg /home/micha/Projects/WBWB/Source/build/manylinux2014_x86_64/textures/ui/hud/target_indicator.egg.bam