mirror of
https://github.com/reactos/wine.git
synced 2024-11-24 20:30:01 +00:00
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_server_dir(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_exec_wine_binary( const char *name, char **argv, const char *env_var );
|
||||
|
||||
|
2
libs/.gitignore
vendored
2
libs/.gitignore
vendored
@ -1,2 +1,4 @@
|
||||
*.dylib
|
||||
*.so.*
|
||||
wine/version-stamp
|
||||
wine/version.c
|
||||
|
@ -96,6 +96,8 @@ C_SRCS = \
|
||||
c_28605.c \
|
||||
c_28606.c
|
||||
|
||||
EXTRA_OBJS = version.o
|
||||
|
||||
all: $(MODULE) $(MODULE:.dll=.a)
|
||||
|
||||
@MAKE_RULES@
|
||||
@ -173,8 +175,14 @@ uninstall::
|
||||
-cd $(DESTDIR)$(libdir) && $(RM) libwine.a libwine.dll libwine.so libwine.so.$(VERSION) \
|
||||
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::
|
||||
$(RM) libwine.so.$(SOVERSION) libwine.so.$(VERSION)
|
||||
$(RM) libwine.so.$(SOVERSION) libwine.so.$(VERSION) version.c version-stamp
|
||||
|
||||
$(RELPATH):
|
||||
@cd $(TOOLSDIR)/tools && $(MAKE) relpath
|
||||
|
@ -407,6 +407,19 @@ const char *wine_get_user_name(void)
|
||||
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 */
|
||||
static void preloader_exec( char **argv, int use_preloader )
|
||||
{
|
||||
|
@ -77,6 +77,7 @@ EXPORTS
|
||||
wine_exec_wine_binary
|
||||
wine_fold_string
|
||||
wine_get_build_dir
|
||||
wine_get_build_id
|
||||
wine_get_config_dir
|
||||
wine_get_cs
|
||||
wine_get_data_dir
|
||||
@ -88,6 +89,7 @@ EXPORTS
|
||||
wine_get_sortkey
|
||||
wine_get_ss
|
||||
wine_get_user_name
|
||||
wine_get_version
|
||||
wine_init
|
||||
wine_init_argv0_path
|
||||
wine_is_dbcs_leadbyte
|
||||
|
@ -77,6 +77,7 @@ WINE_1.0
|
||||
wine_exec_wine_binary;
|
||||
wine_fold_string;
|
||||
wine_get_build_dir;
|
||||
wine_get_build_id;
|
||||
wine_get_config_dir;
|
||||
wine_get_cs;
|
||||
wine_get_data_dir;
|
||||
@ -88,6 +89,7 @@ WINE_1.0
|
||||
wine_get_sortkey;
|
||||
wine_get_ss;
|
||||
wine_get_user_name;
|
||||
wine_get_version;
|
||||
wine_init;
|
||||
wine_init_argv0_path;
|
||||
wine_is_dbcs_leadbyte;
|
||||
|
2
loader/.gitignore
vendored
2
loader/.gitignore
vendored
@ -1,2 +0,0 @@
|
||||
/version-stamp
|
||||
/version.c
|
@ -12,8 +12,8 @@ C_SRCS = \
|
||||
preloader.c \
|
||||
pthread.c
|
||||
|
||||
KTHREAD_OBJS = kthread.o main.o version.o
|
||||
PTHREAD_OBJS = pthread.o main.o version.o
|
||||
KTHREAD_OBJS = kthread.o main.o
|
||||
PTHREAD_OBJS = pthread.o main.o
|
||||
|
||||
MAIN_BINARY = @MAIN_BINARY@
|
||||
EXTRA_BINARIES = @EXTRA_BINARIES@
|
||||
@ -97,13 +97,4 @@ uninstall::
|
||||
$(RM) $(DESTDIR)$(mandir)/de.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
|
||||
|
@ -68,7 +68,6 @@ static inline void reserve_area( void *addr, size_t size )
|
||||
*/
|
||||
static void check_command_line( int argc, char *argv[] )
|
||||
{
|
||||
extern const char wine_version[];
|
||||
static const char usage[] =
|
||||
"Usage: wine PROGRAM [ARGUMENTS...] Run the specified program\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" ))
|
||||
{
|
||||
printf( "%s\n", wine_version );
|
||||
printf( "%s\n", wine_get_build_id() );
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user