libwine: Export functions that return the Wine version number and build id.
This commit is contained in:
parent
dcefb67781
commit
8505f1429d
|
@ -38,6 +38,8 @@ extern const char *wine_get_config_dir(void);
|
||||||
extern const char *wine_get_data_dir(void);
|
extern const char *wine_get_data_dir(void);
|
||||||
extern const char *wine_get_server_dir(void);
|
extern const char *wine_get_server_dir(void);
|
||||||
extern const char *wine_get_user_name(void);
|
extern const char *wine_get_user_name(void);
|
||||||
|
extern const char *wine_get_version(void);
|
||||||
|
extern const char *wine_get_build_id(void);
|
||||||
extern void wine_init_argv0_path( const char *argv0 );
|
extern void wine_init_argv0_path( const char *argv0 );
|
||||||
extern void wine_exec_wine_binary( const char *name, char **argv, const char *env_var );
|
extern void wine_exec_wine_binary( const char *name, char **argv, const char *env_var );
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
*.dylib
|
*.dylib
|
||||||
*.so.*
|
*.so.*
|
||||||
|
wine/version-stamp
|
||||||
|
wine/version.c
|
||||||
|
|
|
@ -96,6 +96,8 @@ C_SRCS = \
|
||||||
c_28605.c \
|
c_28605.c \
|
||||||
c_28606.c
|
c_28606.c
|
||||||
|
|
||||||
|
EXTRA_OBJS = version.o
|
||||||
|
|
||||||
all: $(MODULE) $(MODULE:.dll=.a)
|
all: $(MODULE) $(MODULE:.dll=.a)
|
||||||
|
|
||||||
@MAKE_RULES@
|
@MAKE_RULES@
|
||||||
|
@ -173,8 +175,14 @@ uninstall::
|
||||||
-cd $(DESTDIR)$(libdir) && $(RM) libwine.a libwine.dll libwine.so libwine.so.$(VERSION) \
|
-cd $(DESTDIR)$(libdir) && $(RM) libwine.a libwine.dll libwine.so libwine.so.$(VERSION) \
|
||||||
libwine.so.$(SOVERSION) libwine.dylib libwine.$(VERSION).dylib libwine.$(SOVERSION).dylib
|
libwine.so.$(SOVERSION) libwine.dylib libwine.$(VERSION).dylib libwine.$(SOVERSION).dylib
|
||||||
|
|
||||||
|
version-stamp: dummy
|
||||||
|
(GIT_DIR=$(TOPSRCDIR)/.git git describe HEAD 2>/dev/null || echo "wine-@PACKAGE_VERSION@") | sed -e 's/\(.*\)/const char wine_build[] = "\1";/' >$@ || ($(RM) $@ && exit 1)
|
||||||
|
|
||||||
|
version.c: version-stamp
|
||||||
|
@cmp -s version-stamp $@ || cp version-stamp $@
|
||||||
|
|
||||||
clean::
|
clean::
|
||||||
$(RM) libwine.so.$(SOVERSION) libwine.so.$(VERSION)
|
$(RM) libwine.so.$(SOVERSION) libwine.so.$(VERSION) version.c version-stamp
|
||||||
|
|
||||||
$(RELPATH):
|
$(RELPATH):
|
||||||
@cd $(TOOLSDIR)/tools && $(MAKE) relpath
|
@cd $(TOOLSDIR)/tools && $(MAKE) relpath
|
||||||
|
|
|
@ -407,6 +407,19 @@ const char *wine_get_user_name(void)
|
||||||
return user_name;
|
return user_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* return the standard version string */
|
||||||
|
const char *wine_get_version(void)
|
||||||
|
{
|
||||||
|
return PACKAGE_VERSION;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* return the build id string */
|
||||||
|
const char *wine_get_build_id(void)
|
||||||
|
{
|
||||||
|
extern const char wine_build[];
|
||||||
|
return wine_build;
|
||||||
|
}
|
||||||
|
|
||||||
/* exec a binary using the preloader if requested; helper for wine_exec_wine_binary */
|
/* exec a binary using the preloader if requested; helper for wine_exec_wine_binary */
|
||||||
static void preloader_exec( char **argv, int use_preloader )
|
static void preloader_exec( char **argv, int use_preloader )
|
||||||
{
|
{
|
||||||
|
|
|
@ -77,6 +77,7 @@ EXPORTS
|
||||||
wine_exec_wine_binary
|
wine_exec_wine_binary
|
||||||
wine_fold_string
|
wine_fold_string
|
||||||
wine_get_build_dir
|
wine_get_build_dir
|
||||||
|
wine_get_build_id
|
||||||
wine_get_config_dir
|
wine_get_config_dir
|
||||||
wine_get_cs
|
wine_get_cs
|
||||||
wine_get_data_dir
|
wine_get_data_dir
|
||||||
|
@ -88,6 +89,7 @@ EXPORTS
|
||||||
wine_get_sortkey
|
wine_get_sortkey
|
||||||
wine_get_ss
|
wine_get_ss
|
||||||
wine_get_user_name
|
wine_get_user_name
|
||||||
|
wine_get_version
|
||||||
wine_init
|
wine_init
|
||||||
wine_init_argv0_path
|
wine_init_argv0_path
|
||||||
wine_is_dbcs_leadbyte
|
wine_is_dbcs_leadbyte
|
||||||
|
|
|
@ -77,6 +77,7 @@ WINE_1.0
|
||||||
wine_exec_wine_binary;
|
wine_exec_wine_binary;
|
||||||
wine_fold_string;
|
wine_fold_string;
|
||||||
wine_get_build_dir;
|
wine_get_build_dir;
|
||||||
|
wine_get_build_id;
|
||||||
wine_get_config_dir;
|
wine_get_config_dir;
|
||||||
wine_get_cs;
|
wine_get_cs;
|
||||||
wine_get_data_dir;
|
wine_get_data_dir;
|
||||||
|
@ -88,6 +89,7 @@ WINE_1.0
|
||||||
wine_get_sortkey;
|
wine_get_sortkey;
|
||||||
wine_get_ss;
|
wine_get_ss;
|
||||||
wine_get_user_name;
|
wine_get_user_name;
|
||||||
|
wine_get_version;
|
||||||
wine_init;
|
wine_init;
|
||||||
wine_init_argv0_path;
|
wine_init_argv0_path;
|
||||||
wine_is_dbcs_leadbyte;
|
wine_is_dbcs_leadbyte;
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
/version-stamp
|
|
||||||
/version.c
|
|
|
@ -12,8 +12,8 @@ C_SRCS = \
|
||||||
preloader.c \
|
preloader.c \
|
||||||
pthread.c
|
pthread.c
|
||||||
|
|
||||||
KTHREAD_OBJS = kthread.o main.o version.o
|
KTHREAD_OBJS = kthread.o main.o
|
||||||
PTHREAD_OBJS = pthread.o main.o version.o
|
PTHREAD_OBJS = pthread.o main.o
|
||||||
|
|
||||||
MAIN_BINARY = @MAIN_BINARY@
|
MAIN_BINARY = @MAIN_BINARY@
|
||||||
EXTRA_BINARIES = @EXTRA_BINARIES@
|
EXTRA_BINARIES = @EXTRA_BINARIES@
|
||||||
|
@ -97,13 +97,4 @@ uninstall::
|
||||||
$(RM) $(DESTDIR)$(mandir)/de.UTF-8/man$(prog_manext)/wine.$(prog_manext)
|
$(RM) $(DESTDIR)$(mandir)/de.UTF-8/man$(prog_manext)/wine.$(prog_manext)
|
||||||
$(RM) $(DESTDIR)$(mandir)/fr.UTF-8/man$(prog_manext)/wine.$(prog_manext)
|
$(RM) $(DESTDIR)$(mandir)/fr.UTF-8/man$(prog_manext)/wine.$(prog_manext)
|
||||||
|
|
||||||
clean::
|
|
||||||
$(RM) version.c version-stamp
|
|
||||||
|
|
||||||
version-stamp: dummy
|
|
||||||
(GIT_DIR=$(TOPSRCDIR)/.git git-describe HEAD 2>/dev/null || echo "wine-@PACKAGE_VERSION@") | sed -e 's/\(.*\)/const char wine_version[] = "\1";/' >$@ || ($(RM) $@ && exit 1)
|
|
||||||
|
|
||||||
version.c: version-stamp
|
|
||||||
@cmp -s version-stamp $@ || cp version-stamp $@
|
|
||||||
|
|
||||||
@DEPENDENCIES@ # everything below this line is overwritten by make depend
|
@DEPENDENCIES@ # everything below this line is overwritten by make depend
|
||||||
|
|
|
@ -68,7 +68,6 @@ static inline void reserve_area( void *addr, size_t size )
|
||||||
*/
|
*/
|
||||||
static void check_command_line( int argc, char *argv[] )
|
static void check_command_line( int argc, char *argv[] )
|
||||||
{
|
{
|
||||||
extern const char wine_version[];
|
|
||||||
static const char usage[] =
|
static const char usage[] =
|
||||||
"Usage: wine PROGRAM [ARGUMENTS...] Run the specified program\n"
|
"Usage: wine PROGRAM [ARGUMENTS...] Run the specified program\n"
|
||||||
" wine --help Display this help and exit\n"
|
" wine --help Display this help and exit\n"
|
||||||
|
@ -86,7 +85,7 @@ static void check_command_line( int argc, char *argv[] )
|
||||||
}
|
}
|
||||||
if (!strcmp( argv[1], "--version" ))
|
if (!strcmp( argv[1], "--version" ))
|
||||||
{
|
{
|
||||||
printf( "%s\n", wine_version );
|
printf( "%s\n", wine_get_build_id() );
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue