I have managed to deploy my game on the actual device and now I'm trying to
debug my code in order to find out why it crashes when starting the game.

At some point I try to get the full path of my game by using the code below:


    // find fullpath

    char full_path[PATH_MAX];

    memset ( &(full_path[0]), '\0', ARRAY_SIZE(full_path)-1 );


    ssize_t chars = readlink("/proc/self/exe",full_path,PATH_MAX);



when tapping the game's icon to start it the code above returns as a value:

                   */usr/libexec/mapplauncherd/booster-silica-qt5*


which is wrong. If I ssh in the device and type the name of the game to
start it then the above code returns:

                   */usr/bin/FarWest*

which is the correct path, so I can understand why my game crashes. The
question is why I get wrong value and how to fix it?

I use the above code so that I can backwards traverse the full_path array
in order to get the game's name.
_______________________________________________
SailfishOS.org Devel mailing list

Reply via email to