2020-04-03 14:55:44 -07:00
|
|
|
From 63d2046a8f4388fbc7c12a07ae5f412fccc1b202 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
|
2019-04-04 14:50:22 -07:00
|
|
|
Subject: [PATCH] loader: Add commandline option --patches to show the patch
|
|
|
|
list.
|
2014-05-29 16:04:27 -07:00
|
|
|
|
|
|
|
---
|
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.map | 1 +
|
|
|
|
loader/main.c | 42 +++++++++++++++++++++++++++++++++++++++++-
|
2019-04-04 14:50:22 -07:00
|
|
|
6 files changed, 58 insertions(+), 1 deletion(-)
|
2014-05-29 16:04:27 -07:00
|
|
|
|
|
|
|
diff --git a/dlls/ntdll/misc.c b/dlls/ntdll/misc.c
|
2020-04-03 14:55:44 -07:00
|
|
|
index c29a1c26c26..8906e194272 100644
|
2014-05-29 16:04:27 -07:00
|
|
|
--- a/dlls/ntdll/misc.c
|
|
|
|
+++ b/dlls/ntdll/misc.c
|
2020-02-12 15:33:55 -08:00
|
|
|
@@ -60,6 +60,14 @@ const char * CDECL NTDLL_wine_get_version(void)
|
|
|
|
return wine_get_version();
|
2014-05-29 16:04:27 -07:00
|
|
|
}
|
|
|
|
|
2020-02-12 15:33:55 -08:00
|
|
|
+/*********************************************************************
|
2014-05-29 16:04:27 -07:00
|
|
|
+ * wine_get_patches (NTDLL.@)
|
|
|
|
+ */
|
|
|
|
+const void * CDECL NTDLL_wine_get_patches(void)
|
|
|
|
+{
|
|
|
|
+ return wine_get_patches();
|
|
|
|
+}
|
|
|
|
+
|
2020-02-12 15:33:55 -08:00
|
|
|
/*********************************************************************
|
2014-05-29 16:04:27 -07:00
|
|
|
* wine_get_build_id (NTDLL.@)
|
|
|
|
*/
|
|
|
|
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
|
2020-04-03 14:55:44 -07:00
|
|
|
index e61a2578da5..52db67fd978 100644
|
2014-05-29 16:04:27 -07:00
|
|
|
--- a/dlls/ntdll/ntdll.spec
|
|
|
|
+++ b/dlls/ntdll/ntdll.spec
|
2020-04-03 14:55:44 -07:00
|
|
|
@@ -1571,6 +1571,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
|
2020-04-03 14:55:44 -07:00
|
|
|
index f338c4da190..1f992da6062 100644
|
2015-01-25 18:46:33 -08:00
|
|
|
--- a/include/wine/library.h
|
|
|
|
+++ b/include/wine/library.h
|
2020-02-12 15:33:55 -08:00
|
|
|
@@ -47,6 +47,7 @@ extern const char *wine_get_data_dir(void);
|
2015-01-25 18:46:33 -08:00
|
|
|
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
|
2020-04-03 14:55:44 -07:00
|
|
|
index 2a3314cbfda..5b66c063db6 100644
|
2015-01-25 18:46:33 -08:00
|
|
|
--- a/libs/wine/config.c
|
|
|
|
+++ b/libs/wine/config.c
|
2020-02-12 15:33:55 -08:00
|
|
|
@@ -504,6 +504,12 @@ const char *wine_get_version(void)
|
2015-01-25 18:46:33 -08:00
|
|
|
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.map b/libs/wine/wine.map
|
2020-04-03 14:55:44 -07:00
|
|
|
index 7ea849b908e..a7359ee7872 100644
|
2015-01-25 18:46:33 -08:00
|
|
|
--- a/libs/wine/wine.map
|
|
|
|
+++ b/libs/wine/wine.map
|
2020-04-03 14:55:44 -07:00
|
|
|
@@ -22,6 +22,7 @@ WINE_1.0
|
|
|
|
wine_get_server_dir;
|
2015-01-25 18:46:33 -08:00
|
|
|
wine_get_user_name;
|
|
|
|
wine_get_version;
|
|
|
|
+ wine_get_patches;
|
|
|
|
wine_init;
|
|
|
|
wine_init_argv0_path;
|
2020-04-03 14:55:44 -07:00
|
|
|
wine_mmap_add_reserved_area;
|
2014-05-29 16:04:27 -07:00
|
|
|
diff --git a/loader/main.c b/loader/main.c
|
2020-04-03 14:55:44 -07:00
|
|
|
index 407c897892d..d97d6b28bf8 100644
|
2014-05-29 16:04:27 -07:00
|
|
|
--- a/loader/main.c
|
|
|
|
+++ b/loader/main.c
|
2020-04-03 14:55:44 -07:00
|
|
|
@@ -53,7 +53,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)
|
|
|
|
{
|
2020-04-03 14:55:44 -07:00
|
|
|
@@ -70,6 +71,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);
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
--
|
2020-04-03 14:55:44 -07:00
|
|
|
2.25.1
|
2014-05-29 16:04:27 -07:00
|
|
|
|