Re: [Anjuta-list] Another couple of daft questions



Hi!

Darryl LeCount schrieb:
> 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?

You should export your datadir and libdir as preprocessor macros (passed
with -DMY_DATA_DIR=$(datadir)). This way the user can savely use any
prefix (and package maintainers will love you...) and you always find
those files. You can have a look at the anjuta 2.0 configure.in file to
see how this works (svn.gnome.org/svn/anjuta/trunk/configure.in). It is
not configurable from the UI but I guess anjuta 2.0 automaticly export
those but not for sure.

> 
> 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?

I guess there should be some possibility to set sudo instead of su -c
for the build command in the preferences but I haven't used 1.2 for so
long that I am not sure.

Regards,
Johannes

Attachment: signature.asc
Description: OpenPGP digital signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]