-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Images resources searched with a local path #51
Comments
@jgvictores which is the default folder in which the resources are installed / looked for? For instance, which folder corresponds to the following piece of code? yarp::os::ResourceFinder rf;
rf.findFileByName("../sounds/RobotDevastationBSO.mp3") |
Apart from that piece of code, two intermediate important of lines from robotDevastation/main.cpp affect ResourceFinder. Combined, this results in: yarp::os::ResourceFinder rf;
rf.setDefaultContext("robotDevastation");
rf.setDefaultConfigFile("robotDevastation.ini");
rf.findFileByName("../sounds/RobotDevastationBSO.mp3"); The set(appname sounds)
file(GLOB mp3s ${CMAKE_CURRENT_SOURCE_DIR}/*.mp3)
yarp_install(FILES ${mp3s} DESTINATION ${RD_CONTEXTS_INSTALL_DIR}/${appname}) On my configuration, |
@jgvictores Fonts are currently accessed though their absolute path (i.e: const std::string rd::DeadScreen::FONT_PATH = "/usr/share/fonts/truetype/freefont/FreeMono.ttf"; ) Is this ok or does it involve any risks? |
const std::string rd::DeadScreen::FONT_PATH = "/usr/share/fonts/truetype/freefont/FreeMono.ttf"; Looks totally dangerous and non-portable. If size and license are not an issue, I'd at least think of distributing it with robotDevastation. |
Everything fixed in 00f62ce |
Path should be something like "../images/image.png" |
Fixed in fa4dd65 |
Images resources searched with a local path (use ResourceFinder instead).
@jgvictores juansays: segfault if not found
EDIT: list of files with local paths
The text was updated successfully, but these errors were encountered: