LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-01-2006, 07:17 AM   #1
Sava
Member
 
Registered: Oct 2004
Location: Mie, Japan
Distribution: Gentoo, Suse, Ubuntu
Posts: 38

Rep: Reputation: 15
Finding Installation Directory


Hey Everyone.

I'm currently developing a GTK application, and a problem has appeared regarding relative path addressing. For instance, to add a pixmap directory to load my images I will use a line such as:

Code:
add_pixmap_directory ("../images");
However, if the application is ran via another shortcut or run from a different location on the CLI, this will now fail since its trying to find the files relative from where the application is being run from.

Is there a good method to find the installation directory to locate the files? Surely this hasn't got to be hardcoded in? If there is a cross platform solution, that would also be ideal (though windows support is not as important right now)
 
Old 09-01-2006, 07:36 AM   #2
dmail
Member
 
Registered: Oct 2005
Posts: 970

Rep: Reputation: Disabled
Sava == Tesl on gamedev?
http://www.linuxquestions.org/questi...d.php?t=426517
 
Old 09-01-2006, 09:49 AM   #3
Sava
Member
 
Registered: Oct 2004
Location: Mie, Japan
Distribution: Gentoo, Suse, Ubuntu
Posts: 38

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by dmail
Sava == Tesl on gamedev?
Lol, Yes actually. Both are extremely good forums, and the Gamedev knowledge base is huge (especially for problems like this). Hence I tend to use both depending on what the problem is

[/QUOTE]

Thanks for the link, you have been a great help =)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Finding a directory from the shell hemlockz Linux - Newbie 2 05-15-2006 11:35 AM
Can't Finding GTK directory binarybob0001 Linux - General 2 03-27-2006 03:37 AM
finding the number of files in each directory ridertech Programming 1 06-02-2004 10:26 PM
finding the directory... wrongman Debian 3 05-06-2004 11:26 AM
Finding size of a directory chrisk5527 Linux - General 2 12-30-2003 08:49 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration