2015-01-25 18:46:33 -08:00
|
|
|
From f23512417cb3d149a8be4f757282d17cc1f99f9a Mon Sep 17 00:00:00 2001
|
2014-05-29 16:04:27 -07:00
|
|
|
From: Sebastian Lackner <sebastian@fds-team.de>
|
|
|
|
Date: Thu, 29 May 2014 23:43:45 +0200
|
|
|
|
Subject: loader: Add commandline option --patches to show the patch list.
|
|
|
|
|
|
|
|
---
|
2015-01-25 18:46:33 -08:00
|
|
|
dlls/ntdll/misc.c | 8 ++++++++
|
|
|
|
dlls/ntdll/ntdll.spec | 1 +
|
|
|
|
include/wine/library.h | 1 +
|
|
|
|
libs/wine/config.c | 6 ++++++
|
|
|
|
libs/wine/wine.def | 1 +
|
|
|
|
libs/wine/wine.map | 1 +
|
|
|
|
loader/main.c | 42 +++++++++++++++++++++++++++++++++++++++++-
|
|
|
|
7 files changed, 59 insertions(+), 1 deletion(-)
|
2014-05-29 16:04:27 -07:00
|
|
|
|
|
|
|
diff --git a/dlls/ntdll/misc.c b/dlls/ntdll/misc.c
|
2014-11-14 23:31:56 -08:00
|
|
|
index ad1b43b..1f985e7 100644
|
2014-05-29 16:04:27 -07:00
|
|
|
--- a/dlls/ntdll/misc.c
|
|
|
|
+++ b/dlls/ntdll/misc.c
|
2014-11-14 23:31:56 -08:00
|
|
|
@@ -55,6 +55,14 @@ const char * CDECL NTDLL_wine_get_version(void)
|
2014-05-29 16:04:27 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
/*********************************************************************
|
|
|
|
+ * wine_get_patches (NTDLL.@)
|
|
|
|
+ */
|
|
|
|
+const void * CDECL NTDLL_wine_get_patches(void)
|
|
|
|
+{
|
|
|
|
+ return wine_get_patches();
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+/*********************************************************************
|
|
|
|
* wine_get_build_id (NTDLL.@)
|
|
|
|
*/
|
|
|
|
const char * CDECL NTDLL_wine_get_build_id(void)
|
|
|
|
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
|
2015-01-25 18:46:33 -08:00
|
|
|
index 51de6e7..ee4ed49 100644
|
2014-05-29 16:04:27 -07:00
|
|
|
--- a/dlls/ntdll/ntdll.spec
|
|
|
|
+++ b/dlls/ntdll/ntdll.spec
|
2014-11-14 23:31:56 -08:00
|
|
|
@@ -1421,6 +1421,7 @@
|
2014-05-29 16:04:27 -07:00
|
|
|
|
|
|
|
# Version
|
|
|
|
@ cdecl wine_get_version() NTDLL_wine_get_version
|
|
|
|
+@ cdecl wine_get_patches() NTDLL_wine_get_patches
|
|
|
|
@ cdecl wine_get_build_id() NTDLL_wine_get_build_id
|
|
|
|
@ cdecl wine_get_host_version(ptr ptr) NTDLL_wine_get_host_version
|
|
|
|
|
2015-01-25 18:46:33 -08:00
|
|
|
diff --git a/include/wine/library.h b/include/wine/library.h
|
|
|
|
index 242bb69..fae73fe 100644
|
|
|
|
--- a/include/wine/library.h
|
|
|
|
+++ b/include/wine/library.h
|
|
|
|
@@ -43,6 +43,7 @@ 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 void *wine_get_patches(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 );
|
|
|
|
diff --git a/libs/wine/config.c b/libs/wine/config.c
|
|
|
|
index a273502..5262c76 100644
|
|
|
|
--- a/libs/wine/config.c
|
|
|
|
+++ b/libs/wine/config.c
|
|
|
|
@@ -478,6 +478,12 @@ const char *wine_get_version(void)
|
|
|
|
return PACKAGE_VERSION;
|
|
|
|
}
|
|
|
|
|
|
|
|
+/* return the applied non-standard patches */
|
|
|
|
+const void *wine_get_patches(void)
|
|
|
|
+{
|
|
|
|
+ return NULL;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
/* return the build id string */
|
|
|
|
const char *wine_get_build_id(void)
|
|
|
|
{
|
|
|
|
diff --git a/libs/wine/wine.def b/libs/wine/wine.def
|
|
|
|
index ed315bd..5b42029 100644
|
|
|
|
--- a/libs/wine/wine.def
|
|
|
|
+++ b/libs/wine/wine.def
|
|
|
|
@@ -83,6 +83,7 @@ EXPORTS
|
|
|
|
wine_get_sortkey
|
|
|
|
wine_get_user_name
|
|
|
|
wine_get_version
|
|
|
|
+ wine_get_patches
|
|
|
|
wine_init
|
|
|
|
wine_init_argv0_path
|
|
|
|
wine_is_dbcs_leadbyte
|
|
|
|
diff --git a/libs/wine/wine.map b/libs/wine/wine.map
|
|
|
|
index 2159fac..7cb2918 100644
|
|
|
|
--- a/libs/wine/wine.map
|
|
|
|
+++ b/libs/wine/wine.map
|
|
|
|
@@ -90,6 +90,7 @@ WINE_1.0
|
|
|
|
wine_get_ss;
|
|
|
|
wine_get_user_name;
|
|
|
|
wine_get_version;
|
|
|
|
+ wine_get_patches;
|
|
|
|
wine_init;
|
|
|
|
wine_init_argv0_path;
|
|
|
|
wine_is_dbcs_leadbyte;
|
2014-05-29 16:04:27 -07:00
|
|
|
diff --git a/loader/main.c b/loader/main.c
|
2015-01-25 18:46:33 -08:00
|
|
|
index ce21173..4794e51 100644
|
2014-05-29 16:04:27 -07:00
|
|
|
--- a/loader/main.c
|
|
|
|
+++ b/loader/main.c
|
2014-11-14 23:31:56 -08:00
|
|
|
@@ -89,7 +89,8 @@ static void check_command_line( int argc, char *argv[] )
|
2014-05-29 16:04:27 -07:00
|
|
|
static const char usage[] =
|
|
|
|
"Usage: wine PROGRAM [ARGUMENTS...] Run the specified program\n"
|
|
|
|
" wine --help Display this help and exit\n"
|
|
|
|
- " wine --version Output version information and exit";
|
|
|
|
+ " wine --version Output version information and exit\n"
|
|
|
|
+ " wine --patches Output patch information and exit";
|
|
|
|
|
|
|
|
if (argc <= 1)
|
|
|
|
{
|
2015-01-25 18:46:33 -08:00
|
|
|
@@ -106,6 +107,45 @@ static void check_command_line( int argc, char *argv[] )
|
2014-05-29 16:04:27 -07:00
|
|
|
printf( "%s\n", wine_get_build_id() );
|
|
|
|
exit(0);
|
|
|
|
}
|
|
|
|
+ if (!strcmp( argv[1], "--patches" ))
|
|
|
|
+ {
|
2014-11-14 23:31:56 -08:00
|
|
|
+ const struct
|
|
|
|
+ {
|
|
|
|
+ const char *author;
|
|
|
|
+ const char *subject;
|
2014-11-15 01:01:12 -08:00
|
|
|
+ int revision;
|
2014-11-14 23:31:56 -08:00
|
|
|
+ }
|
|
|
|
+ *next, *cur = wine_get_patches();
|
|
|
|
+
|
2015-01-25 18:46:33 -08:00
|
|
|
+ if (!cur)
|
|
|
|
+ {
|
|
|
|
+ fprintf( stderr, "Patchlist not available.\n" );
|
|
|
|
+ exit(1);
|
|
|
|
+ }
|
|
|
|
+
|
2014-11-14 23:31:56 -08:00
|
|
|
+ while (cur->author)
|
2014-05-29 16:04:27 -07:00
|
|
|
+ {
|
2014-11-14 23:31:56 -08:00
|
|
|
+ next = cur + 1;
|
|
|
|
+ while (next->author)
|
|
|
|
+ {
|
2014-11-15 01:01:12 -08:00
|
|
|
+ if (strcmp( cur->author, next->author )) break;
|
2014-11-14 23:31:56 -08:00
|
|
|
+ next++;
|
|
|
|
+ }
|
|
|
|
+
|
2015-02-08 06:18:58 -08:00
|
|
|
+ printf( "%s (%d):\n", cur->author, (int)(next - cur) );
|
2014-11-14 23:31:56 -08:00
|
|
|
+ while (cur < next)
|
|
|
|
+ {
|
2014-11-15 01:01:12 -08:00
|
|
|
+ printf( " %s", cur->subject );
|
|
|
|
+ if (cur->revision != 1)
|
|
|
|
+ printf( " [rev %d]", cur->revision );
|
|
|
|
+ printf( "\n" );
|
2014-11-14 23:31:56 -08:00
|
|
|
+ cur++;
|
|
|
|
+ }
|
2014-11-15 01:01:12 -08:00
|
|
|
+ printf( "\n" );
|
2014-05-29 16:04:27 -07:00
|
|
|
+ }
|
2014-11-14 23:31:56 -08:00
|
|
|
+
|
2014-05-29 16:04:27 -07:00
|
|
|
+ exit(0);
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
--
|
2015-01-25 18:46:33 -08:00
|
|
|
2.2.1
|
2014-05-29 16:04:27 -07:00
|
|
|
|