BIG change in directory handling:
- Unix users can "make install" and "make uninstall" (as root). - Installation creates shortcuts "grafx2" and "gfx2cfg" in /usr/local/bin - Installation puts data files (icon GIFs, gfx2.dat,..) and the actual binaries in /usr/local/share/grafx2 - At runtime, the programs search and create configuration files (gfx2.cfg and gfx2.ini) in ~/.grafx2 (But if there are some present in program's own directory, they override) - Uninstall removes programs and data, but leaves all users' configurations. Win32: User's config directory is %APPDATA%\GrafX2 Win98: %APPDATA% is not set by default, so the program falls back to executable's directory. Tested on Debian Linux Partially tested on Win XP (early version) Tested on Win98 git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@365 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
13
texte.c
13
texte.c
@@ -265,11 +265,6 @@ int TrueType_fonte(int Indice)
|
||||
// Initialisation à faire une fois au début du programme
|
||||
void Initialisation_Texte(void)
|
||||
{
|
||||
/*
|
||||
// Pour scan de répertoire
|
||||
DIR* Repertoire_Courant; //Répertoire courant
|
||||
struct dirent* Enreg; // Structure de lecture des éléments
|
||||
*/
|
||||
char Nom_repertoire[TAILLE_CHEMIN_FICHIER];
|
||||
#ifndef NOTTF
|
||||
// Initialisation de TTF
|
||||
@@ -280,7 +275,7 @@ void Initialisation_Texte(void)
|
||||
Liste_fontes_debut = NULL;
|
||||
Fonte_nombre=0;
|
||||
// Parcours du répertoire "fonts"
|
||||
strcpy(Nom_repertoire, Repertoire_du_programme);
|
||||
strcpy(Nom_repertoire, Repertoire_des_donnees);
|
||||
strcat(Nom_repertoire, "fonts");
|
||||
for_each_file(Nom_repertoire, Ajout_fonte);
|
||||
|
||||
@@ -323,7 +318,8 @@ void Initialisation_Texte(void)
|
||||
#else
|
||||
#define USE_XLIB
|
||||
|
||||
#ifdef USE_XLIB
|
||||
#ifdef USE_XLIB
|
||||
{
|
||||
int i,number;
|
||||
Display* dpy = XOpenDisplay(NULL);
|
||||
char** font_path_list = XGetFontPath(dpy,&number);
|
||||
@@ -331,7 +327,8 @@ void Initialisation_Texte(void)
|
||||
for(i=0;i<number;i++)
|
||||
for_each_file(*(font_path_list+i),Ajout_fonte);
|
||||
|
||||
XFreeFontPath(font_path_list);
|
||||
XFreeFontPath(font_path_list);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user