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/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