0

I have created a app bundle using CMake. My executable is in Demo.app/Contents/MacOS. I have a json schema and data file which is used by my application. The files are also present in the same location as executable (i.e Demo.app/Contents/MacOS). Issue is if i run the executable through command line (./Demo ) the app runs successfully . If i double click on the Demo.app, application fails to read the json files. I am newbie on MAC platform any help would be greatly appreciated Thank You

R.V
  • 1
  • Without seeing what your code does there's no telling the reason... – l'L'l Mar 03 '17 at 10:24
  • This is not the place where to put resources... Read about Application bundle architecture, you need to create a `Resources` folder in `Contents` and use appropriate API to locate your file in the bundle. – Jean-Baptiste Yunès Mar 03 '17 at 10:27
  • The application is built on multiple platforms so i have a source code which reads the file from current directory. So should i conditionally compile it based on platform now ? Because on windows there is no such directory structure as MAC. – R.V Mar 06 '17 at 05:57

0 Answers0