Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com --- programs/winver/Makefile.in | 2 +- programs/winver/version.rc | 5 +++++ programs/winver/winver.c | 3 +++ programs/winver/winver.manifest | 16 ++++++++++++++++ 4 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 programs/winver/winver.manifest
diff --git a/programs/winver/Makefile.in b/programs/winver/Makefile.in index 0caef713865..8f74ab774df 100644 --- a/programs/winver/Makefile.in +++ b/programs/winver/Makefile.in @@ -1,5 +1,5 @@ MODULE = winver.exe -IMPORTS = shell32 +IMPORTS = shell32 comctl32
EXTRADLLFLAGS = -mwindows -mno-cygwin
diff --git a/programs/winver/version.rc b/programs/winver/version.rc index ae042fb82a0..c079dde644a 100644 --- a/programs/winver/version.rc +++ b/programs/winver/version.rc @@ -15,6 +15,8 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include <windef.h> +#include <winuser.h>
#define WINE_FILEDESCRIPTION_STR "Windows Version" #define WINE_FILENAME_STR "winver.exe" @@ -25,3 +27,6 @@ #define WINE_PRODUCTVERSION_STR "5.1.2600.0"
#include "wine/wine_common_ver.rc" + +/* @makedep: winver.manifest */ +1 RT_MANIFEST winver.manifest diff --git a/programs/winver/winver.c b/programs/winver/winver.c index 019eb5248b2..ee3120443eb 100644 --- a/programs/winver/winver.c +++ b/programs/winver/winver.c @@ -19,6 +19,7 @@ */
#include "windows.h" +#include "commctrl.h" #include "shellapi.h"
int PASCAL WinMain (HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) @@ -26,6 +27,8 @@ int PASCAL WinMain (HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) char name[128] = "Wine "; const char * (CDECL *wine_get_version)(void);
+ InitCommonControls(); + wine_get_version = (void *)GetProcAddress( GetModuleHandleA("ntdll.dll"), "wine_get_version" ); if (wine_get_version) strcat( name, wine_get_version() ); return !ShellAboutA( NULL, name, NULL, 0 ); diff --git a/programs/winver/winver.manifest b/programs/winver/winver.manifest new file mode 100644 index 00000000000..519bd175c19 --- /dev/null +++ b/programs/winver/winver.manifest @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> +<assemblyIdentity type="win32" name="Wine.Winver" version="0.0.0.0"/> +<dependency> + <dependentAssembly> + <assemblyIdentity + type="win32" + name="Microsoft.Windows.Common-Controls" + version="6.0.0.0" + processorArchitecture="*" + publicKeyToken="6595b64144ccf1df" + language="*" + /> + </dependentAssembly> +</dependency> +</assembly>