{"action":"created","issue":{"url":"https://api.github.com/repos/urho3d/Urho3D/issues/994","labels_url":"https://api.github.com/repos/urho3d/Urho3D/issues/994/labels{/name}","comments_url":"https://api.github.com/repos/urho3d/Urho3D/issues/994/comments","events_url":"https://api.github.com/repos/urho3d/Urho3D/issues/994/events","html_url":"https://github.com/urho3d/Urho3D/issues/994","id":114131092,"number":994,"title":".exe samples do not have resource paths","user":{"login":"bvanevery","id":734930,"avatar_url":"https://avatars.githubusercontent.com/u/734930?v=3","gravatar_id":"","url":"https://api.github.com/users/bvanevery","html_url":"https://github.com/bvanevery","followers_url":"https://api.github.com/users/bvanevery/followers","following_url":"https://api.github.com/users/bvanevery/following{/other_user}","gists_url":"https://api.github.com/users/bvanevery/gists{/gist_id}","starred_url":"https://api.github.com/users/bvanevery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bvanevery/subscriptions","organizations_url":"https://api.github.com/users/bvanevery/orgs","repos_url":"https://api.github.com/users/bvanevery/repos","events_url":"https://api.github.com/users/bvanevery/events{/privacy}","received_events_url":"https://api.github.com/users/bvanevery/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/urho3d/Urho3D/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-10-29T19:45:03Z","updated_at":"2015-10-30T18:14:00Z","closed_at":"2015-10-30T11:20:25Z","body":"I am pretty sure that I have run .exe samples just fine in the past, either from within Visual Studio, or clicking on them in \\bin when they're in the build directory.  Now none of them work, they all give the same message: \"ERROR: Failed to add resource path 'Data', check the documentation on how to set the 'resource path prefix' \"  I deleted the build directory and rebuilt clean, to be sure of the behavior.  This observed on both Windows 7 and Windows 10 machines.  I do get a big MKLINK error on both systems when first configuring CMake, but not subsequently. \r\n\r\n.bat samples run fine because they explicitly pass a Data directory option to the Urho3DPlayer.\r\n\r\nNote that hardwiring a single path for the build directory is not desirable, as the samples will be installed and need to be runnable from their final installation directory.  Yet it is still desirable to have them be runnable from the build directory, so that people can trace the code with a debugger.  This furthermore implies that using a global environment variable to specify resource paths is not desirable.\r\n\r\nAlthough the Docs do specify some ways to cause the samples to work, I submit that all of the methods given in the docs are wrong / this is a bug by design.  Samples should just work.  The build knows where the resources are, and where they should go.  This should be automated and not require user intervention nor reading the docs.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/urho3d/Urho3D/issues/comments/152606511","html_url":"https://github.com/urho3d/Urho3D/issues/994#issuecomment-152606511","issue_url":"https://api.github.com/repos/urho3d/Urho3D/issues/994","id":152606511,"user":{"login":"weitjong","id":5548048,"avatar_url":"https://avatars.githubusercontent.com/u/5548048?v=3","gravatar_id":"","url":"https://api.github.com/users/weitjong","html_url":"https://github.com/weitjong","followers_url":"https://api.github.com/users/weitjong/followers","following_url":"https://api.github.com/users/weitjong/following{/other_user}","gists_url":"https://api.github.com/users/weitjong/gists{/gist_id}","starred_url":"https://api.github.com/users/weitjong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weitjong/subscriptions","organizations_url":"https://api.github.com/users/weitjong/orgs","repos_url":"https://api.github.com/users/weitjong/repos","events_url":"https://api.github.com/users/weitjong/events{/privacy}","received_events_url":"https://api.github.com/users/weitjong/received_events","type":"User","site_admin":false},"created_at":"2015-10-30T18:14:00Z","updated_at":"2015-10-30T18:14:00Z","body":"> Darn it, why did my \"brilliance\" have to come in the wee hours of the morning so I can't explain clearly? By a *.txt file, I didn't mean a README. I meant that the *.txt file contains the absolute path of where the assets are. Call it something brilliant like resources.ini. The sample apps read the .ini to determine the location of the resources. Problem solved. Different .ini contents for build and installation trees. That can be achieved several different ways in CMake.\r\n\r\nI actually understand it correctly the first time. But I was saying it won't work because CMake cannot alter the content that text file in the manner you described so in the end it needs to be maintained manually should we have implement the binary to read the text file this way. "}}