diff --git a/Source/Common/Common.vcproj b/Source/Common/Common.vcproj
index 4924c1903..9d06dab8e 100644
--- a/Source/Common/Common.vcproj
+++ b/Source/Common/Common.vcproj
@@ -181,10 +181,6 @@
RelativePath="Trace.cpp"
>
-
-
-
-
diff --git a/Source/Common/Common.vcxproj b/Source/Common/Common.vcxproj
index 6bd4dfb6c..4b83a3f99 100644
--- a/Source/Common/Common.vcxproj
+++ b/Source/Common/Common.vcxproj
@@ -49,7 +49,6 @@
Create
-
@@ -65,7 +64,6 @@
-
diff --git a/Source/Common/Common.vcxproj.filters b/Source/Common/Common.vcxproj.filters
index 41fa887fa..9d36cc727 100644
--- a/Source/Common/Common.vcxproj.filters
+++ b/Source/Common/Common.vcxproj.filters
@@ -41,9 +41,6 @@
Source Files
-
- Source Files
-
@@ -85,8 +82,5 @@
Header Files
-
- Header Files
-
\ No newline at end of file
diff --git a/Source/Common/Version.cpp b/Source/Common/Version.cpp
deleted file mode 100644
index e73a9e897..000000000
--- a/Source/Common/Version.cpp
+++ /dev/null
@@ -1,145 +0,0 @@
-#include "stdafx.h"
-
-#pragma comment(lib, "version.lib")
-
-stdstr ReadVersionInfo( BYTE * Array, LPCTSTR Info )
-{
- // Read the list of languages and code pages. We will use only the first one.
- struct SLangCP { WORD wLang; WORD wCP; } * pTrans ;
- UINT nVersionLen = 0 ;
-
- BOOL bRetCode = ::VerQueryValue( Array, TEXT("\\VarFileInfo\\Translation"), (LPVOID*)&pTrans, &nVersionLen );
- if (!bRetCode)
- {
- WriteTrace(TraceError,_T("ReadVersionInfo(): VerQueryValue failed"));
-
- return _T("");
- }
-
- // Get the file version
- TCHAR szLookup[MAX_PATH] ;
- _stprintf( szLookup, TEXT("\\StringFileInfo\\%04x%04x\\%s"),pTrans[0].wLang, pTrans[0].wCP,Info ) ;
-
- LPTSTR pszVersion = NULL ;
- bRetCode = ::VerQueryValue( Array, szLookup, (LPVOID*)&pszVersion, &nVersionLen ) ;
-
- if (!bRetCode)
- {
- WriteTrace(TraceError,_T("ReadVersionInfo(): VerQueryValue failed"));
-
- return _T("");
- }
-
- if (_tcscmp(Info,VERSION_PRODUCT_VERSION) == 0 || _tcscmp(Info,VERSION_FILE_VERSION) == 0)
- {
- for (ULONG Pos = 0; Pos < _tcslen(pszVersion); Pos ++) {
- if (pszVersion[Pos] == ',')
- {
- pszVersion[Pos] = '.';
- }
- }
- }
-
- return pszVersion;
-}
-
-bool HasFileVersionInfo( LPCTSTR /*Info*/, LPCTSTR FileName )
-{
- DWORD dwHandle;
- DWORD Size = GetFileVersionInfoSize((LPTSTR)FileName,&dwHandle);
- if ( Size == 0)
- {
- return false;
- }
- return true;
-}
-
-stdstr FileVersionInfo( LPCTSTR Info, LPCTSTR FileName )
-{
- stdstr Result;
-
- if(FileName)
- {
- if(_tcslen(FileName) != 0)
- {
- DWORD dwHandle = 0;
- DWORD Size = GetFileVersionInfoSize((LPSTR)FileName,&dwHandle);
- if ( Size == 0)
- {
- //WriteTraceF(TraceError,_T("FileVersionInfo(%s, %s): GetFileVersionInfoSize failed, error (%s)"),Info,FileName,BaseException::GetLastErrorDescription(GetLastError()).c_str());
-
- return TEXT("");
- }
-
- BYTE * Array = new BYTE [Size+(1*sizeof(TCHAR))];
- if(Array)
- {
- memset(Array, 0, Size+(1*sizeof(TCHAR)));
-
- try
- {
- if (!GetFileVersionInfo((LPSTR)FileName,0,Size,Array))
- {
- //WriteTraceF(TraceError,_T("FileVersionInfo(%s, %s): GetFileVersionInfo(%d) failed, error (%s)"),Info,FileName,Size,BaseException::GetLastErrorDescription(GetLastError()).c_str());
-
- delete [] Array;
- return _T("");
- }
- }
- catch (...)
- {
- WriteTrace(TraceError,_T("Unhandled exception in FileVersionInfo (1)"));
-
- delete [] Array;
- return _T("");
- }
-
- try
- {
- Result = ReadVersionInfo(Array,Info);
- if(!Result.empty())
- {
- if (strcmp(Info,VERSION_PRODUCT_VERSION) == 0)
- {
- Result.Replace(" ","");
- }
- } else {
- WriteTraceF(TraceError,_T("FileVersionInfo(%s), ReadVersionInfo() failed"), FileName);
- }
- }
- catch (...)
- {
- WriteTrace(TraceError,_T("Unhandled exception in FileVersionInfo (2)"));
- delete [] Array;
- return _T("");
- }
-
- delete [] Array;
- }
- else
- {
- WriteTraceF(TraceError,_T("Failed to allocate %d bytes"), Size+(1*sizeof(TCHAR)));
- }
- }
- else
- {
- WriteTraceF(TraceError,_T("FileVersionInfo received a pointer to an empty string"));
- }
- }
- else
- {
- WriteTraceF(TraceError,_T("FileVersionInfo received NULL pointer"));
- }
-
- return Result;
-}
-
-stdstr VersionInfo(LPCTSTR Info, HMODULE hModule)
-{
- TCHAR FileName[MAX_PATH];
- if (GetModuleFileName(hModule,FileName,sizeof(FileName)) != 0)
- {
- return FileVersionInfo(Info,FileName);
- }
- return TEXT("");
-}
diff --git a/Source/Common/Version.h b/Source/Common/Version.h
deleted file mode 100644
index 89d3e9b28..000000000
--- a/Source/Common/Version.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#pragma once
-
-#define VERSION_COMPANY_NAME "CompanyName"
-#define VERSION_FILE_DESCRIPTION "FileDescription"
-#define VERSION_FILE_VERSION "FileVersion"
-#define VERSION_INTERNAL_NAME "InternalName"
-#define VERSION_LEGAL_COPYRIGHT "LegalCopyright"
-#define VERSION_ORIGINAL_FILE_NAME "OriginalFileName"
-#define VERSION_PRODUCT_NAME "ProductName"
-#define VERSION_PRODUCT_VERSION "ProductVersion"
-
-#include "std string.h"
-
-bool HasFileVersionInfo ( LPCSTR Info, LPCSTR FileName );
-stdstr FileVersionInfo ( LPCSTR Info, LPCSTR FileName );
-stdstr VersionInfo ( LPCSTR Info, HMODULE hModule = NULL);
diff --git a/Source/Common/stdafx.h b/Source/Common/stdafx.h
index c23edb6dc..d87ca6230 100644
--- a/Source/Common/stdafx.h
+++ b/Source/Common/stdafx.h
@@ -15,6 +15,5 @@
#include "Log Class.h"
#include "TraceDefs.h"
#include "Trace.h"
-#include "Version.h"
#include "md5.h"
#include "Smart Pointer.h"
diff --git a/Source/Glide64/Glide64.rc b/Source/Glide64/Glide64.rc
index f86976a7d..a9c8d815e 100644
--- a/Source/Glide64/Glide64.rc
+++ b/Source/Glide64/Glide64.rc
@@ -2,6 +2,8 @@
//
#include "resource.h"
+#include "Version.h"
+
#define APSTUDIO_READONLY_SYMBOLS
#include "WinResrc.h"
@@ -67,34 +69,30 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_AUS
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 2,0,0,1
- PRODUCTVERSION 2,0,0,1
- FILEFLAGSMASK 0x17L
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x4L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
+ FILEVERSION VER_FILE_VERSION
+ PRODUCTVERSION VER_PRODUCT_VERSION
+ FILEFLAGSMASK 0x1fL
+ FILEFLAGS VER_FILEFLAGS
+ FILEOS VER_FILEOS
+ FILETYPE VER_FILETYPE
+ FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
- BLOCK "0c0904b0"
+ BLOCK "040904b0"
BEGIN
- VALUE "FileDescription", "Glide 64 for Project64"
- VALUE "FileVersion", "2, 0, 0, 1"
- VALUE "InternalName", "Glide64"
- VALUE "LegalCopyright", "Copyright (C) 2013"
- VALUE "OriginalFilename", "Glide64.dll"
- VALUE "ProductName", "Glide 64 for Project64"
- VALUE "ProductVersion", "2, 0, 0, 1"
+ 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
diff --git a/Source/Glide64/Glide64.vcproj b/Source/Glide64/Glide64.vcproj
index c40beec55..4a04b6f16 100644
--- a/Source/Glide64/Glide64.vcproj
+++ b/Source/Glide64/Glide64.vcproj
@@ -198,6 +198,10 @@
RelativePath="ucode09rdp.h"
>
+
+
diff --git a/Source/Glide64/Glide64.vcxproj b/Source/Glide64/Glide64.vcxproj
index a258c7311..6468594a0 100644
--- a/Source/Glide64/Glide64.vcxproj
+++ b/Source/Glide64/Glide64.vcxproj
@@ -110,6 +110,7 @@
+
diff --git a/Source/Glide64/Glide64.vcxproj.filters b/Source/Glide64/Glide64.vcxproj.filters
index 405f40d56..3641fcf10 100644
--- a/Source/Glide64/Glide64.vcxproj.filters
+++ b/Source/Glide64/Glide64.vcxproj.filters
@@ -127,6 +127,7 @@
+
diff --git a/Source/Glide64/Main.cpp b/Source/Glide64/Main.cpp
index 09ecd45f5..094724e17 100644
--- a/Source/Glide64/Main.cpp
+++ b/Source/Glide64/Main.cpp
@@ -38,7 +38,8 @@
//****************************************************************
#include "Gfx #1.3.h"
-#include
+#include "Version.h"
+#include
#include
#include
@@ -1459,9 +1460,9 @@ void CALL GetDllInfo ( PLUGIN_INFO * PluginInfo )
PluginInfo->Version = 0x0104; // Set to 0x0104
PluginInfo->Type = PLUGIN_TYPE_GFX; // Set to PLUGIN_TYPE_GFX
#ifdef _DEBUG
- sprintf(PluginInfo->Name,"Glide64 For PJ64 (Debug): %s",VersionInfo(VERSION_PRODUCT_VERSION,hinstDLL).c_str());
+ sprintf(PluginInfo->Name, "Glide64 For PJ64 (Debug): %s", VER_FILE_VERSION_STR);
#else
- sprintf(PluginInfo->Name,"Glide64 For PJ64: %s",VersionInfo(VERSION_PRODUCT_VERSION,hinstDLL).c_str());
+ sprintf(PluginInfo->Name,"Glide64 For PJ64: %s", VER_FILE_VERSION_STR);
#endif
// If DLL supports memory these memory options then set them to TRUE or FALSE
diff --git a/Source/Glide64/Version.h b/Source/Glide64/Version.h
new file mode 100644
index 000000000..b84eb0884
--- /dev/null
+++ b/Source/Glide64/Version.h
@@ -0,0 +1,50 @@
+/*
+* Glide64 - Glide video plugin for Nintendo 64 emulators.
+* Copyright (c) 2002 Dave2001
+* Copyright (c) 2003-2009 Sergey 'Gonetz' Lipski
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the License, or
+* any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
+#define STRINGIZE2(s) #s
+#define STRINGIZE(s) STRINGIZE2(s)
+
+#define VERSION_MAJOR 2
+#define VERSION_MINOR 0
+#define VERSION_REVISION 0
+#define VERSION_BUILD 1
+
+#define VER_FILE_DESCRIPTION_STR "Glide 64 for Project64"
+#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 "Glide64"
+#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) 2013"
+
+#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
diff --git a/Source/Project64/Project64.vcproj b/Source/Project64/Project64.vcproj
index 39d51a79f..7400032c6 100644
--- a/Source/Project64/Project64.vcproj
+++ b/Source/Project64/Project64.vcproj
@@ -777,6 +777,10 @@
Name="Header Files"
Filter="h;hpp;hxx;hm;inl"
>
+
+
diff --git a/Source/Project64/Project64.vcxproj b/Source/Project64/Project64.vcxproj
index 8fe83d514..cc352ba00 100644
--- a/Source/Project64/Project64.vcxproj
+++ b/Source/Project64/Project64.vcxproj
@@ -201,6 +201,7 @@
+
diff --git a/Source/Project64/Project64.vcxproj.filters b/Source/Project64/Project64.vcxproj.filters
index b65be5d00..24f069bea 100644
--- a/Source/Project64/Project64.vcxproj.filters
+++ b/Source/Project64/Project64.vcxproj.filters
@@ -833,5 +833,8 @@
Header Files\Plugin Headers
+
+ Header Files
+
\ No newline at end of file
diff --git a/Source/Project64/Support.h b/Source/Project64/Support.h
index c3baaf45b..3f8b3249a 100644
--- a/Source/Project64/Support.h
+++ b/Source/Project64/Support.h
@@ -8,7 +8,6 @@
#include
#include
#include
-#include
#include
#include
#include
diff --git a/Source/Project64/User Interface/Gui Class.cpp b/Source/Project64/User Interface/Gui Class.cpp
index 97183e9d0..78ab5ebf8 100644
--- a/Source/Project64/User Interface/Gui Class.cpp
+++ b/Source/Project64/User Interface/Gui Class.cpp
@@ -72,6 +72,8 @@ CMainGui::~CMainGui (void)
bool CMainGui::RegisterWinClass ( void )
{
+ stdstr_f VersionDisplay("Project64 %s", VER_FILE_VERSION_STR);
+
WNDCLASS wcl;
wcl.style = CS_OWNDC | CS_HREDRAW | CS_VREDRAW;
@@ -84,7 +86,7 @@ bool CMainGui::RegisterWinClass ( void )
wcl.lpfnWndProc = (WNDPROC)MainGui_Proc;
wcl.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
wcl.lpszMenuName = NULL;
- wcl.lpszClassName = "Project64 2.0";
+ wcl.lpszClassName = VersionDisplay.c_str();
if (RegisterClass(&wcl) == 0) return false;
return true;
}
@@ -310,7 +312,8 @@ void CMainGui::Caption (LPCSTR Caption) {
void CMainGui::Create (const char * WindowTitle)
{
- m_hMainWindow = (HWND)CreateWindowEx(WS_EX_ACCEPTFILES, "Project64 2.0", WindowTitle, WS_OVERLAPPED | WS_CLIPCHILDREN |
+ stdstr_f VersionDisplay("Project64 %s", VER_FILE_VERSION_STR);
+ m_hMainWindow = (HWND)CreateWindowEx(WS_EX_ACCEPTFILES, VersionDisplay.c_str(), WindowTitle, WS_OVERLAPPED | WS_CLIPCHILDREN |
WS_CLIPSIBLINGS | WS_SYSMENU | WS_MINIMIZEBOX,5,5,640,480,
NULL,NULL,GetModuleHandle(NULL),this );
m_Created = m_hMainWindow != NULL;
@@ -1070,8 +1073,7 @@ DWORD CALLBACK AboutBoxProc (HWND hWnd, DWORD uMsg, DWORD wParam, DWORD lParam)
SendDlgItemMessage(hWnd,IDC_THANK_LIST,WM_SETFONT,(WPARAM)hTextFont,TRUE);
//SetCapture(hWnd);
- stdstr StrVersion(VersionInfo(VERSION_PRODUCT_VERSION));
- stdstr_f VersionDisplay("Version: %s",StrVersion.c_str());
+ stdstr_f VersionDisplay("Version: %s", VER_FILE_VERSION_STR);
SetWindowText(GetDlgItem(hWnd,IDC_VERSION),VersionDisplay.c_str());
}
break;
diff --git a/Source/Project64/User Interface/UI Resources.rc b/Source/Project64/User Interface/UI Resources.rc
index fc95e32fc..8c473a0ba 100644
--- a/Source/Project64/User Interface/UI Resources.rc
+++ b/Source/Project64/User Interface/UI Resources.rc
@@ -1,6 +1,7 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
+#include "Version.h"
#define APSTUDIO_READONLY_SYMBOLS
@@ -934,30 +935,25 @@ END
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 2,1,0,1
- PRODUCTVERSION 2,1,0,1
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x40004L
- FILETYPE 0x1L
- 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 "040904b0"
BEGIN
- VALUE "CompanyName", " "
- VALUE "FileDescription", "Project 64"
- VALUE "FileVersion", "2, 1, 0, 1"
- VALUE "InternalName", "Project64"
- VALUE "LegalCopyright", "Copyright © 2013"
- VALUE "OriginalFilename", "Project64.exe"
- VALUE "ProductName", " Project64"
- VALUE "ProductVersion", "2, 1, 0, 1"
+ 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"
diff --git a/Source/Project64/Version.h b/Source/Project64/Version.h
new file mode 100644
index 000000000..4a9ba5221
--- /dev/null
+++ b/Source/Project64/Version.h
@@ -0,0 +1,41 @@
+/****************************************************************************
+* *
+* Project 64 - A Nintendo 64 emulator. *
+* http://www.pj64-emu.com/ *
+* Copyright (C) 2012 Project64. All rights reserved. *
+* *
+* License: *
+* GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html *
+* *
+****************************************************************************/
+#define STRINGIZE2(s) #s
+#define STRINGIZE(s) STRINGIZE2(s)
+
+#define VERSION_MAJOR 2
+#define VERSION_MINOR 1
+#define VERSION_REVISION 0
+#define VERSION_BUILD 1
+
+#define VER_FILE_DESCRIPTION_STR "Project 64"
+#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 "Project64"
+#define VER_PRODUCT_VERSION VER_FILE_VERSION
+#define VER_PRODUCT_VERSION_STR VER_FILE_VERSION_STR
+#define VER_ORIGINAL_FILENAME_STR VER_PRODUCTNAME_STR ".exe"
+#define VER_INTERNAL_NAME_STR VER_PRODUCTNAME_STR
+#define VER_COPYRIGHT_STR "Copyright (C) 2013"
+
+#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
diff --git a/Source/Project64/main.cpp b/Source/Project64/main.cpp
index bcbd90e76..add3a8b78 100644
--- a/Source/Project64/main.cpp
+++ b/Source/Project64/main.cpp
@@ -173,16 +173,7 @@ const char * AppName ( void )
static stdstr Name;
if (Name.empty())
{
- stdstr StrVersion(VersionInfo(VERSION_PRODUCT_VERSION));
- strvector parts = StrVersion.Tokenize(".");
- if (parts.size() == 4)
- {
- Name = stdstr_f("Project64 %s.%s",parts[0].c_str(),parts[1].c_str());
- }
- else
- {
- Name = "Project64";
- }
+ Name = stdstr_f("Project64 %s", VER_FILE_VERSION_STR);
}
return Name.c_str();
}
@@ -226,7 +217,7 @@ int WINAPI WinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, LPSTR /
WriteTrace(TraceDebug,__FUNCTION__ ": Create Main Window");
stdstr WinTitle(AppName());
- WinTitle.Format("Project64 %s",VersionInfo(VERSION_PRODUCT_VERSION).c_str());
+ WinTitle.Format("Project64 %s", VER_FILE_VERSION_STR);
CMainGui MainWindow(true,WinTitle.c_str()), HiddenWindow(false);
CMainMenu MainMenu(&MainWindow);
diff --git a/Source/Project64/stdafx.h b/Source/Project64/stdafx.h
index 48cd25920..858d6f457 100644
--- a/Source/Project64/stdafx.h
+++ b/Source/Project64/stdafx.h
@@ -21,6 +21,7 @@
#include "N64 System.h"
#include "Plugin.h"
#include "Support.h"
+#include "Version.h"
#include
#include
#include
diff --git a/Source/RSP/Main.cpp b/Source/RSP/Main.cpp
index 4f22bcb2e..6fb457feb 100644
--- a/Source/RSP/Main.cpp
+++ b/Source/RSP/Main.cpp
@@ -30,7 +30,6 @@
#include
#include
-#include
#include "../Settings/Settings.h"
extern "C" {
@@ -44,6 +43,7 @@ extern "C" {
#include "profiling.h"
#include "log.h"
#include "resource.h"
+#include "Version.h"
void ClearAllx86Code(void);
void ProcessMenuItem(int ID);
@@ -86,12 +86,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 +169,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 +183,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;
diff --git a/Source/RSP/RSP.rc b/Source/RSP/RSP.rc
index c6ecbc2b0..1c7bfda50 100644
--- a/Source/RSP/RSP.rc
+++ b/Source/RSP/RSP.rc
@@ -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
diff --git a/Source/RSP/RSP.vcproj b/Source/RSP/RSP.vcproj
index fcb3015aa..15034e946 100644
--- a/Source/RSP/RSP.vcproj
+++ b/Source/RSP/RSP.vcproj
@@ -222,6 +222,10 @@
+
+
diff --git a/Source/RSP/RSP.vcxproj b/Source/RSP/RSP.vcxproj
index c14a49b47..d91743911 100644
--- a/Source/RSP/RSP.vcxproj
+++ b/Source/RSP/RSP.vcxproj
@@ -98,6 +98,7 @@
+
diff --git a/Source/RSP/RSP.vcxproj.filters b/Source/RSP/RSP.vcxproj.filters
index 8c3d284fa..52a573bb0 100644
--- a/Source/RSP/RSP.vcxproj.filters
+++ b/Source/RSP/RSP.vcxproj.filters
@@ -125,6 +125,9 @@
Header Files\RSP Header Files
+
+ Header Files\RSP Header Files
+
diff --git a/Source/RSP/Version.h b/Source/RSP/Version.h
new file mode 100644
index 000000000..ed940c023
--- /dev/null
+++ b/Source/RSP/Version.h
@@ -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