RSP Use Version.h version info in resource file

This commit is contained in:
Emmet Young 2015-02-17 20:45:57 +11:00
parent 714886e5ca
commit 7a6a22b8ec
5 changed files with 81 additions and 28 deletions

View File

@ -44,6 +44,7 @@ extern "C" {
#include "profiling.h"
#include "log.h"
#include "resource.h"
#include "Version.h"
void ClearAllx86Code(void);
void ProcessMenuItem(int ID);
@ -86,12 +87,12 @@ short Set_AudioHle = 0, Set_GraphicsHle = 0;
/************ DLL info **************/
const char * AppName ( void )
{
static stdstr_f Name("RSP %s",VersionInfo(VERSION_PRODUCT_VERSION,hinstDLL).c_str());
static stdstr_f Name("RSP %s", VER_FILE_VERSION_STR);
return Name.c_str();
}
const char * AboutMsg ( void )
{
static stdstr_f Msg("RSP emulation Plugin\nMade for Project64 (c)\nVersion %s\n\nby Jabo & Zilmar",VersionInfo(VERSION_PRODUCT_VERSION,hinstDLL).c_str());
static stdstr_f Msg("RSP emulation Plugin\nMade for Project64 (c)\nVersion %s\n\nby Jabo & Zilmar", VER_FILE_VERSION_STR);
return Msg.c_str();
}
@ -169,10 +170,6 @@ __declspec(dllexport) void DllAbout ( HWND hParent ) {
BOOL WINAPI DllMain( HINSTANCE hinst, DWORD /*fdwReason*/, LPVOID /*lpvReserved*/ ){
hinstDLL = hinst;
if (strcmp(VersionInfo(VERSION_INTERNAL_NAME).c_str(),"Project64") != 0)
{
return FALSE;
}
return TRUE;
}
/******************************************************************
@ -187,9 +184,9 @@ __declspec(dllexport) void GetDllInfo ( PLUGIN_INFO * PluginInfo ) {
PluginInfo->Version = 0x0102;
PluginInfo->Type = PLUGIN_TYPE_RSP;
#ifdef _DEBUG
sprintf(PluginInfo->Name,"RSP Debug Plugin %s",VersionInfo(VERSION_PRODUCT_VERSION,hinstDLL).c_str());
sprintf(PluginInfo->Name, "RSP Debug Plugin %s", VER_FILE_VERSION_STR);
#else
sprintf(PluginInfo->Name,"RSP Plugin %s",VersionInfo(VERSION_PRODUCT_VERSION,hinstDLL).c_str());
sprintf(PluginInfo->Name, "RSP Plugin %s", VER_FILE_VERSION_STR);
#endif
PluginInfo->NormalMemory = FALSE;
PluginInfo->MemoryBswaped = TRUE;

View File

@ -1,6 +1,7 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#include "Version.h"
#define APSTUDIO_READONLY_SYMBOLS
@ -198,35 +199,30 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,7,0,9
PRODUCTVERSION 1,7,0,9
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x2L
FILESUBTYPE 0x0L
FILEVERSION VER_FILE_VERSION
PRODUCTVERSION VER_PRODUCT_VERSION
FILEFLAGSMASK 0x3fL
FILEFLAGS VER_FILEFLAGS
FILEOS VER_FILEOS
FILETYPE VER_FILETYPE
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "0c0904b0"
BEGIN
VALUE "CompanyName", "Project64"
VALUE "FileDescription", "RSP emulation Plugin"
VALUE "FileVersion", "1, 7, 0, 9"
VALUE "InternalName", "RSP Plugin"
VALUE "LegalCopyright", "Copyright © 2008"
VALUE "OriginalFilename", "RSP.dll"
VALUE "ProductName", " RSP"
VALUE "ProductVersion", "1, 7, 0, 9"
VALUE "FileDescription", VER_FILE_DESCRIPTION_STR "\0"
VALUE "FileVersion", VER_FILE_VERSION_STR "\0"
VALUE "InternalName", VER_INTERNAL_NAME_STR "\0"
VALUE "LegalCopyright", VER_COPYRIGHT_STR "\0"
VALUE "OriginalFilename", VER_ORIGINAL_FILENAME_STR "\0"
VALUE "ProductName", VER_PRODUCTNAME_STR
VALUE "ProductVersion", VER_PRODUCT_VERSION_STR "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0xc09, 1200
VALUE "Translation", 0x409, 1200
END
END

View File

@ -98,6 +98,7 @@
<ClInclude Include="RSP Registers.h" />
<ClInclude Include="Rsp.h" />
<ClInclude Include="Types.h" />
<ClInclude Include="Version.h" />
<ClInclude Include="X86.h" />
</ItemGroup>
<ItemGroup>

View File

@ -125,6 +125,9 @@
<ClInclude Include="X86.h">
<Filter>Header Files\RSP Header Files</Filter>
</ClInclude>
<ClInclude Include="Version.h">
<Filter>Header Files\RSP Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="RSP.rc">

56
Source/RSP/Version.h Normal file
View File

@ -0,0 +1,56 @@
/*
* RSP Compiler plug in for Project 64 (A Nintendo 64 emulator).
*
* (c) Copyright 2001 jabo (jabo@emulation64.com) and
* zilmar (zilmar@emulation64.com)
*
* pj64 homepage: www.pj64.net
*
* Permission to use, copy, modify and distribute Project64 in both binary and
* source form, for non-commercial purposes, is hereby granted without fee,
* providing that this license information and copyright notice appear with
* all copies and any derived work.
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event shall the authors be held liable for any damages
* arising from the use of this software.
*
* Project64 is freeware for PERSONAL USE only. Commercial users should
* seek permission of the copyright holders first. Commercial use includes
* charging money for Project64 or software derived from Project64.
*
* The copyright holders request that bug fixes and improvements to the code
* should be forwarded to them so if they want them.
*
*/
#define STRINGIZE2(s) #s
#define STRINGIZE(s) STRINGIZE2(s)
#define VERSION_MAJOR 1
#define VERSION_MINOR 7
#define VERSION_REVISION 0
#define VERSION_BUILD 9
#define VER_FILE_DESCRIPTION_STR "RSP emulation Plugin"
#define VER_FILE_VERSION VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION, VERSION_BUILD
#define VER_FILE_VERSION_STR STRINGIZE(VERSION_MAJOR) \
"." STRINGIZE(VERSION_MINOR) \
"." STRINGIZE(VERSION_REVISION) \
"." STRINGIZE(VERSION_BUILD) \
#define VER_PRODUCTNAME_STR "RSP"
#define VER_PRODUCT_VERSION VER_FILE_VERSION
#define VER_PRODUCT_VERSION_STR VER_FILE_VERSION_STR
#define VER_ORIGINAL_FILENAME_STR VER_PRODUCTNAME_STR ".dll"
#define VER_INTERNAL_NAME_STR VER_PRODUCTNAME_STR
#define VER_COPYRIGHT_STR "Copyright (C) 2008"
#ifdef _DEBUG
#define VER_VER_DEBUG VS_FF_DEBUG
#else
#define VER_VER_DEBUG 0
#endif
#define VER_FILEOS VOS_NT_WINDOWS32
#define VER_FILEFLAGS VER_VER_DEBUG
#define VER_FILETYPE VFT_APP