libwine: Export a function to retrieve the data directory (based on a
patch by Dmitry Timoshkov).
This commit is contained in:
parent
9a722d0afd
commit
2f026d1694
|
@ -30,6 +30,7 @@
|
|||
/* configuration */
|
||||
|
||||
extern const char *wine_get_config_dir(void);
|
||||
extern const char *wine_get_data_dir(void);
|
||||
extern const char *wine_get_server_dir(void);
|
||||
extern const char *wine_get_user_name(void);
|
||||
extern void wine_init_argv0_path( const char *argv0 );
|
||||
|
|
|
@ -23,7 +23,9 @@ CONFIGDIRS = \
|
|||
-DDLLDIR='"$(dlldir)"' \
|
||||
-DLIB_TO_BINDIR=\"`$(RELPATH) $(libdir) $(bindir)`\" \
|
||||
-DLIB_TO_DLLDIR=\"`$(RELPATH) $(libdir) $(dlldir)`\" \
|
||||
-DBIN_TO_DLLDIR=\"`$(RELPATH) $(bindir) $(dlldir)`\"
|
||||
-DBIN_TO_DLLDIR=\"`$(RELPATH) $(bindir) $(dlldir)`\" \
|
||||
-DLIB_TO_DATADIR=\"`$(RELPATH) $(libdir) $(datadir)/wine`\" \
|
||||
-DBIN_TO_DATADIR=\"`$(RELPATH) $(bindir) $(datadir)/wine`\"
|
||||
|
||||
config.o: config.c $(RELPATH)
|
||||
$(CC) -c $(ALLCFLAGS) -o $@ $(SRCDIR)/config.c $(CONFIGDIRS)
|
||||
|
|
|
@ -41,6 +41,7 @@ static const char server_dir_prefix[] = "/server-"; /* prefix for server di
|
|||
|
||||
static char *bindir;
|
||||
static char *dlldir;
|
||||
static char *datadir;
|
||||
static char *config_dir;
|
||||
static char *server_dir;
|
||||
static char *user_name;
|
||||
|
@ -248,6 +249,7 @@ void wine_init_argv0_path( const char *argv0 )
|
|||
{
|
||||
bindir = build_path( libdir, LIB_TO_BINDIR );
|
||||
dlldir = build_path( libdir, LIB_TO_DLLDIR );
|
||||
datadir = build_path( libdir, LIB_TO_DATADIR );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -283,6 +285,7 @@ void wine_init_argv0_path( const char *argv0 )
|
|||
}
|
||||
|
||||
dlldir = build_path( bindir, BIN_TO_DLLDIR );
|
||||
datadir = build_path( bindir, BIN_TO_DATADIR );
|
||||
}
|
||||
|
||||
/* return the configuration directory ($WINEPREFIX or $HOME/.wine) */
|
||||
|
@ -292,6 +295,12 @@ const char *wine_get_config_dir(void)
|
|||
return config_dir;
|
||||
}
|
||||
|
||||
/* retrieve the wine data dir */
|
||||
const char *wine_get_data_dir(void)
|
||||
{
|
||||
return datadir;
|
||||
}
|
||||
|
||||
/* return the full name of the server directory (the one containing the socket) */
|
||||
const char *wine_get_server_dir(void)
|
||||
{
|
||||
|
|
|
@ -27,6 +27,7 @@ EXPORTS
|
|||
wine_exec_wine_binary
|
||||
wine_get_config_dir
|
||||
wine_get_cs
|
||||
wine_get_data_dir
|
||||
wine_get_ds
|
||||
wine_get_es
|
||||
wine_get_fs
|
||||
|
|
|
@ -27,6 +27,7 @@ WINE_1.0
|
|||
wine_exec_wine_binary;
|
||||
wine_get_config_dir;
|
||||
wine_get_cs;
|
||||
wine_get_data_dir;
|
||||
wine_get_ds;
|
||||
wine_get_es;
|
||||
wine_get_fs;
|
||||
|
|
Loading…
Reference in New Issue