hello everybody,
Im working on my fb4nds, some people put the executable in a folder called fb4nds, but when my hb opens the file in data folder it doesnt find anything. Is there a way to find the dir where the executable is stored?
Thanks for your answers.
Is there a way to find the executable path?
Re: Is there a way to find the executable path?
you can check to see if argv[0] has been given to main, which should hold the path and name of the executable. like this:
although this isn't tested.
and note that some cards firmware doesn't support argv.
other than that, there isn't really a good way to get the path+name.
Code: Select all
int main(int argc, char* argv)
{
if(argc >= 1)
{
iprintf("executable path and name is %s.\n", argv[0]);
}
else
{
iprintf("executable path and name hasn't been given.\n");
}
return 0;
}
and note that some cards firmware doesn't support argv.
other than that, there isn't really a good way to get the path+name.
Re: Is there a way to find the executable path?
It doenst work
Re: Is there a way to find the executable path?
The above code will only work on hbmenu or card firmware's that support the new ARGV protocols.Lino wrote:It doenst work
Basically download the hbmenu from the SVN, and install it onto your card, run that as your firmware, or from your firmware prior to opening your app.
Who is online
Users browsing this forum: No registered users and 1 guest