Re: [anjuta-list] one question about using anjuta
- From: Sébastien Granjoux <seb sfo free fr>
- To: mostafa heidaryan <mostafa heidar66 gmail com>
- Cc: anjuta-list gnome org
- Subject: Re: [anjuta-list] one question about using anjuta
- Date: Sun, 06 Jan 2013 17:43:19 +0100
Hello,
Le 05/01/2013 17:21, mostafa heidaryan a écrit :
i have a problem with data files and manage of them.
in my program there is many files that must be read and right to them
but when i install my program some problems apear:
1)i do not have access to write on them
It's normal. If you want to write data files, you need first to copy
them somewhere in the home directory of the user, you can use a standard
directory as returned by function like g_get_user_data_dir... Then you
can modify these files. You probably have to do this copy only if the
files are missing.
2)when i install my project it only copy files to /usr/local/share and
do not make dirctories for them and all files are in this folder with
out any arrange
If you use autotools, your data files should be listed as value of a
variable named _something__DATA in one Makefile.am. In this file, you
should have a variable named _something_dir, its value defines the
directory where the data file will be installed. If _something_ is data,
they will be installed in /usr/local/share.
Typically you need to write something like
your_programdir =$(datadir)/your_program
your_program_DATA = data.txt ...
The autotools backend of Anjuta, will parse this but I think it's not
possible to set all this in the GUI at the moment.
3) i want to make som directories and copy files to them when my program
is installing (what can i do?)for example i want make one directory in
home when installing program
You cannot do it because it is expected that you install a program for
several users which could be even not known when you install it.
Moreover when one user uses your program it shouldn't be able to modify
something for the other.
You have to install your data in a common location, typically in
/usr/local/share. Then it's up to your program to complete the
installation by copying some files in the user directory when it is
first run by a new user or you can provide a separate executable to do this.
Regards,
Sébastien
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]