Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » GetExeFilePath() in Linux
Re: GetExeFilePath() in Linux [message #6398 is a reply to message #6393] Fri, 10 November 2006 16:28 Go to previous messageGo to previous message
masu is currently offline  masu
Messages: 378
Registered: February 2006
Senior Member
zsolt wrote on Fri, 10 November 2006 12:17

I have a directory structure like this:

bin/appname - this is the binary
share/appname/ - this is a directory for document and configuration templates and other readonly resources

I have a lot of document and configuration templates and the application wants to READ them. I don't want to compile them into the app because they are extensible by installing additional packages.
I can write into the documentation, that resources have to be in e.g. /usr/local/share/appname/ directory, but it is not very admin friendly. It is much better to get these resources with the next algorithm:
GetFileFolder(GetExeFilePath()) + "/../share/" + appname + "/something.resource"


Now I understand your problem Very Happy and I vote for including to search via proc first and if it is not available in argv[0] and PATH.

Matthias
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Double formatting bug?
Next Topic: How to catch keyboard input?
Goto Forum:
  


Current Time: Sat Aug 16 16:53:37 CEST 2025

Total time taken to generate the page: 0.05579 seconds