2020-05-18 17:27:31 -07:00
|
|
|
From 599c50c9e339fe04e96fdb665b3d7ccb1a7708b7 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
|
|
|
include/wine/library.h | 1 +
|
|
|
|
libs/wine/config.c | 6 ++++++
|
|
|
|
libs/wine/wine.map | 1 +
|
|
|
|
loader/main.c | 42 +++++++++++++++++++++++++++++++++++++++++-
|
2020-05-18 17:27:31 -07:00
|
|
|
4 files changed, 49 insertions(+), 1 deletion(-)
|
2014-05-29 16:04:27 -07:00
|
|
|
|
2015-01-25 18:46:33 -08:00
|
|
|
diff --git a/include/wine/library.h b/include/wine/library.h
|
2020-04-27 14:19:14 -07:00
|
|
|
index 090b8349559..b8a4a2df576 100644
|
2015-01-25 18:46:33 -08:00
|
|
|
--- a/include/wine/library.h
|
|
|
|
+++ b/include/wine/library.h
|
2020-04-27 14:19:14 -07:00
|
|
|
@@ -42,6 +42,7 @@ extern "C" {
|
|
|
|
/* configuration */
|
|
|
|
|
2015-01-25 18:46:33 -08:00
|
|
|
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-27 14:19:14 -07:00
|
|
|
index f5b4c0de9af..e52739d55ad 100644
|
2015-01-25 18:46:33 -08:00
|
|
|
--- a/libs/wine/config.c
|
|
|
|
+++ b/libs/wine/config.c
|
2020-04-27 14:19:14 -07:00
|
|
|
@@ -515,6 +515,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-27 14:19:14 -07:00
|
|
|
index 1143b129734..55f874d3e74 100644
|
2015-01-25 18:46:33 -08:00
|
|
|
--- a/libs/wine/wine.map
|
|
|
|
+++ b/libs/wine/wine.map
|
2020-04-27 14:19:14 -07:00
|
|
|
@@ -13,6 +13,7 @@ WINE_1.0
|
|
|
|
wine_exec_wine_binary;
|
|
|
|
wine_get_build_id;
|
2015-01-25 18:46:33 -08:00
|
|
|
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-05-18 15:57:40 -07:00
|
|
|
index 0e6b6f66b50..24bcfff8c4c 100644
|
2014-05-29 16:04:27 -07:00
|
|
|
--- a/loader/main.c
|
|
|
|
+++ b/loader/main.c
|
2020-05-18 15:57:40 -07:00
|
|
|
@@ -55,7 +55,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-05-18 15:57:40 -07:00
|
|
|
@@ -72,6 +73,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-27 14:19:14 -07:00
|
|
|
2.26.2
|
2014-05-29 16:04:27 -07:00
|
|
|
|