Re: [Anjuta-list] Another couple of daft questions
- From: Tony Freeman <tony freeman insightbb com>
- To: anjuta-list lists sourceforge net
- Subject: Re: [Anjuta-list] Another couple of daft questions
- Date: Mon, 26 Feb 2007 20:55:13 -0500
Hello Darryl,
I am using Anjuta 1.2.4a on a Debian AMD64 machine.
Go into your project directory and open up configure.in and have a look.
This 'configure.in' file is the file that will generate environment type
variables that will be available to you (and your user) during the
compile of your program. This is where you can manually change the
default locations of installed files. You can do other things like
manually set the version number of your project. If you edit anything in
this file, then it will be up to you, and not Anjuta, to keep it
updated. You'll have to tell Anjuta not to overwrite the configure.in
file ... so better to let Anjuta handle it.
Anyway ... I'm betting that there is already a variable defined called:
'PACKAGE_DATA_DIR' in this file. Look at how configure.in handles this
PACKAGE_DATA_DIR thing.
All you have to do is use the variable 'PACKAGE_DATA_DIR' in your
pre-processor area of your source code whenever you refer to a data file:
#define GLADE_FILE PACKAGE_DATA_DIR"/XmainScript.glade"
... I use 'GLADE_FILE' later on in the program like so:
/* LOAD IN GUI INTERFACE FROM GLADE XML FILE */
xml = glade_xml_new (GLADE_FILE, NULL, NULL);
Have a look around in the configure.in file ... there may be other
variables you can use in or pre-processor code. Also, the Makefile.am
files are other sources of information about where things are going to
be installed. If you edit a Makefile.am, then you'll need to tell
Anjuta to not overwrite it.
-- Tony
Darryl LeCount wrote:
Hi everyone,
Me again with another couple of daft questions (Anjuta 1, not 2).
1. I've written a game which has a number of data files associated with
it and as such I've included them as data files in the Anjuta project.
However, when it creates the configure file, the build distribution
installs by default the binaries to /usr/local/bin/game_name and the
data files to /usr/local/share/game_name. This is all well and good
until a user decides to pass --prefix to the configure script which
makes programming in C++ to find the data files correctly a living
nightmare. What I'd like to do is be able to install the binaries by
default to /usr/local/games/game_name and the data files
to /usr/local/games/game_name/data, just as I've done with the Windows
ports of the game. As such, if the user enters ./configure
--prefix=/tmp, then there's no problem. Is it possible to set these
directories from the project configuration dialogue?
2. I'd like to be able to avoid having to build a distribution, unpack
and run from there in a terminal every time I want to see if the package
builds, installs and runs correctly. I know there's an install function
within Anjuta, but I'm using Ubuntu (no root password) and although the
Anjuta manual states that there is the possibility of setting either su
or sudo within the build preferences, I see no such thing. Is it
possible to configure Anjuta 1 to use sudo to install?
Thanks!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]