LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 02-18-2008, 06:27 PM   #1
cyb0rg777
Member
 
Registered: Dec 2004
Location: ~
Distribution: Debian
Posts: 143
Blog Entries: 8

Rep: Reputation: 15
Where to install program files


I Wrote a program and I want to set up the install . I have the binary,a glade file that has some icons that go with it,and some data files. I was looking at some other stuff on the system and they put it all in different locations. Would it be too sloppy to find one directory and stick it in ? Because that's the way it runs in the source directory because it's wrote into the source code . So if I rewrite it to run from the install it's not going to run without installing it, if I'm testing the source code.Right?
 
Old 02-18-2008, 07:04 PM   #2
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
For yourself only? Normally I put those in /usr/local/bin (only if it's done.) The Glade stuff should stay in a working directory unless the program needs some of it.
ta0kira

PS At second glance, it looks like the program needs something in the directory it's built in. Correct?

Last edited by ta0kira; 02-18-2008 at 07:08 PM.
 
Old 02-18-2008, 07:52 PM   #3
cyb0rg777
Member
 
Registered: Dec 2004
Location: ~
Distribution: Debian
Posts: 143

Original Poster
Blog Entries: 8

Rep: Reputation: 15
It's a release version. I've never installed my own code .Everything works in the source directory.The binary needs the glade file. I'm not sure how I would move the glade file or parts of it either because I used anjuta and autoconf to generate the make file.I don't understand that stuff very well yet. So it would be easier to dump it all in one directory ,but it's a release so I want make it nice as I can.
 
Old 02-18-2008, 08:23 PM   #4
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
Your makefile should install them automatically with make install if you're using automake and autoconf.
ta0kira
 
Old 02-18-2008, 08:26 PM   #5
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 78
Normally, you would want to put executables in ${prefix}/bin, library files into ${prefix}/lib, headers in ${prefix}/include, and resource files and such into ${prefix}/share/${progname}. If you do it correctly, you will let the configure script tell you where prefix is (when most individual configure packages, prefix is /usr/local, but when most distros configure packages, prefix is usually /usr). In fact, you might use the autoconf variable $(datadir) for your resource and data location. You can use the make system to define a macro which hardcodes any locations into sourcecode.
 
Old 02-18-2008, 08:29 PM   #6
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Anything which is not installed by the package manager, I put in /opt or --if I wrote it--$HOME/util. The latter is a VERY small folder....
 
Old 02-18-2008, 08:44 PM   #7
cyb0rg777
Member
 
Registered: Dec 2004
Location: ~
Distribution: Debian
Posts: 143

Original Poster
Blog Entries: 8

Rep: Reputation: 15
It lets you set the directory where different parts of your project go to when you do make install. So I can install the binary to /usr/bin but it needs all the other parts. A lot of programs have parts in /usr/share. Could I have the installer put the whole thing in /usr/local/bin/myprogram ?
 
Old 02-19-2008, 05:26 PM   #8
cyb0rg777
Member
 
Registered: Dec 2004
Location: ~
Distribution: Debian
Posts: 143

Original Poster
Blog Entries: 8

Rep: Reputation: 15
Got it .Just had to add PACKAGE_SOURCE_DIR in front of the directory name and it automatically sets everything up. Thanks.
 
  


Reply



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
Where are program files kept? tinfalco Ubuntu 4 07-02-2007 07:16 AM
Where To Install Program Files dyserq Linux - Newbie 6 11-14-2005 03:10 AM
Program files firefly60 Linux - Newbie 6 07-27-2005 03:26 PM
How program to read files with extension .dat y .cfg files COMTRADE in fedora 1? ivonne Linux - Software 0 11-22-2004 11:42 AM
Cd program files? RichardSimmons Linux - Software 2 02-23-2004 09:25 PM

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

All times are GMT -5. The time now is 12:06 PM.

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