Refactored version information.

This commit is contained in:
LoRd_MuldeR 2023-12-05 00:00:05 +01:00
parent 4cee8cedf4
commit 87a9823d75
7 changed files with 114 additions and 25 deletions

View File

@ -1,7 +1,7 @@
// Microsoft Visual C++ generated resource script. // Microsoft Visual C++ generated resource script.
// //
#include "WinResrc.h" //"afxres.h" #include "WinResrc.h" //"afxres.h"
#include "src/Version.h"
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //
@ -9,6 +9,14 @@
// //
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
/////////////////////////////////////////////////////////////////////////////
//
// C macro preprocessor
//
#define VERSION_STRING_GLUE_HELPER_STAGE2(X) #X
#define VERSION_STRING_GLUE_HELPER(W,X,Y,Z) VERSION_STRING_GLUE_HELPER_STAGE2(W.X##Y.Z)
#define VERSION_STRING_GLUE(W,X,Y,Z) VERSION_STRING_GLUE_HELPER(W,X,Y,Z)
#define VERSION_STRING VERSION_STRING_GLUE(MIXP_VERSION_MAJOR,MIXP_VERSION_MINOR_HI,MIXP_VERSION_MINOR_LO,MIXP_VERSION_PATCH)
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //
@ -23,8 +31,8 @@ IDI_ICON1 ICON "MediaInfoXP.ico"
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,3,6,1 FILEVERSION MIXP_VERSION_MAJOR,MIXP_VERSION_MINOR_HI,MIXP_VERSION_MINOR_LO,MIXP_VERSION_PATCH
PRODUCTVERSION 2,3,6,1 PRODUCTVERSION MIXP_VERSION_MAJOR,MIXP_VERSION_MINOR_HI,MIXP_VERSION_MINOR_LO,MIXP_VERSION_PATCH
FILEFLAGSMASK 0x17L FILEFLAGSMASK 0x17L
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x3L FILEFLAGS 0x3L
@ -43,13 +51,13 @@ BEGIN
VALUE "Comments", "This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY" VALUE "Comments", "This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY"
VALUE "CompanyName", "Free Software Foundation" VALUE "CompanyName", "Free Software Foundation"
VALUE "FileDescription", "MediaInfoXP - GUI for MediaInfo" VALUE "FileDescription", "MediaInfoXP - GUI for MediaInfo"
VALUE "FileVersion", "2.36.1" VALUE "FileVersion", VERSION_STRING
VALUE "InternalName", "MediaInfoXP_Qt" VALUE "InternalName", "MediaInfoXP_Qt"
VALUE "LegalCopyright", "Copyright (C) 2004-2023 LoRd_MuldeR <MuldeR2@GMX.de>" VALUE "LegalCopyright", "Copyright (C) 2004-2023 LoRd_MuldeR <MuldeR2@GMX.de>"
VALUE "LegalTrademarks", "This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License <http://www.gnu.org/>" VALUE "LegalTrademarks", "This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License <http://www.gnu.org/>"
VALUE "OriginalFilename", "MediaInfoXP.exe" VALUE "OriginalFilename", "MediaInfoXP.exe"
VALUE "ProductName", "MediaInfoXP - GUI for MediaInfo" VALUE "ProductName", "MediaInfoXP - GUI for MediaInfo"
VALUE "ProductVersion", "2.36.1" VALUE "ProductVersion", VERSION_STRING
VALUE "Website" "http://muldersoft.com/" VALUE "Website" "http://muldersoft.com/"
END END
END END

View File

@ -136,6 +136,7 @@
</CustomBuild> </CustomBuild>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="src\Config.cpp" />
<ClCompile Include="src\IPC.cpp" /> <ClCompile Include="src\IPC.cpp" />
<ClCompile Include="src\Main.cpp" /> <ClCompile Include="src\Main.cpp" />
<ClCompile Include="src\MainWindow.cpp" /> <ClCompile Include="src\MainWindow.cpp" />
@ -159,6 +160,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="src\Config.h" /> <ClInclude Include="src\Config.h" />
<ClInclude Include="src\Version.h" />
<CustomBuild Include="src\IPC.h"> <CustomBuild Include="src\IPC.h">
<Command Condition="'$(Configuration)|$(Platform)'=='Release_Static|Win32'">"$(QTDIR)\bin\moc.exe" -o "$(SolutionDir)\tmp\$(ProjectName)\MOC_%(Filename).cpp" "%(FullPath)"</Command> <Command Condition="'$(Configuration)|$(Platform)'=='Release_Static|Win32'">"$(QTDIR)\bin\moc.exe" -o "$(SolutionDir)\tmp\$(ProjectName)\MOC_%(Filename).cpp" "%(FullPath)"</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe" -o "$(SolutionDir)\tmp\$(ProjectName)\MOC_%(Filename).cpp" "%(FullPath)"</Command> <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe" -o "$(SolutionDir)\tmp\$(ProjectName)\MOC_%(Filename).cpp" "%(FullPath)"</Command>

View File

@ -59,6 +59,9 @@
<ClCompile Include="tmp\MediaInfoXP\QRC_MediaInfoXP.cpp"> <ClCompile Include="tmp\MediaInfoXP\QRC_MediaInfoXP.cpp">
<Filter>Source Files\Generated</Filter> <Filter>Source Files\Generated</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="src\Config.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="src\Config.h"> <ClInclude Include="src\Config.h">
@ -67,6 +70,9 @@
<ClInclude Include="src\ShellExtension.h"> <ClInclude Include="src\ShellExtension.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="src\Version.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ResourceCompile Include="MediaInfoXP.rcx"> <ResourceCompile Include="MediaInfoXP.rcx">

50
src/Config.cpp Normal file
View File

@ -0,0 +1,50 @@
///////////////////////////////////////////////////////////////////////////////
// MediaInfoXP
// Copyright (C) 2004-2023 LoRd_MuldeR <MuldeR2@GMX.de>
//
// 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
// (at your option) 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.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
// http://www.gnu.org/licenses/gpl-2.0.txt
///////////////////////////////////////////////////////////////////////////////
//Internal
#include "Config.h"
#include "Version.h"
#define MIXP_CONF_DEFINE(X,Y,Z) extern const X g_##Y = Z;
#define MIXP_VERSION_GLUE_HELPER(X,Y) X##Y
#define MIXP_VERSION_GLUE(X,Y) MIXP_VERSION_GLUE_HELPER(X,Y)
#define MIXP_VERSION_MINOR MIXP_VERSION_GLUE(MIXP_VERSION_MINOR_HI,MIXP_VERSION_MINOR_LO)
//Version
MIXP_CONF_DEFINE(unsigned int, mixp_versionMajor, MIXP_VERSION_MAJOR)
MIXP_CONF_DEFINE(unsigned int, mixp_versionMinor, MIXP_VERSION_MINOR)
MIXP_CONF_DEFINE(unsigned int, mixp_versionPatch, MIXP_VERSION_PATCH)
//MediaInfo Version
MIXP_CONF_DEFINE(unsigned int, mixp_mediaInfoVerMajor, 23)
MIXP_CONF_DEFINE(unsigned int, mixp_mediaInfoVerMinor, 11)
MIXP_CONF_DEFINE(unsigned int, mixp_mediaInfoVerPatch, 0)
//MediaInfo Checksum
MIXP_CONF_DEFINE(char*, mixp_checksum_x86_i686, "ccfabcf0b55819a34d2ae33b4a3e578523c99314cc3a36909d5d145de3c3c6deb3e1d225bb2ed147566305fd194c1107b8588c6d5314f88efeb11c6ceefc987b")
MIXP_CONF_DEFINE(char*, mixp_checksum_x86_sse2, "a20c1ce741a3920dfafcb50009bc29bcb5850669d11e691a7aca244ef44def4f4563a4da4db3137c02467b204eeb72e89587591e78a95616a832e67c50d2cd11")
MIXP_CONF_DEFINE(char*, mixp_checksum_x64_sse2, "a2ec2e4268c8f5a95115149e552e06dd1ca7370ab8d252ed00b76b336698c97e454c32ecca62e0976b96306de435a074fa88cdfcd75bc9e97bf9c78ce99408f8")
MIXP_CONF_DEFINE(char*, mixp_checksum_x64_avx2, "e8dd8823fb95774cb240d21566d913017914ebacdb117931f5a41492e2530ae5622f1009eac4a0291400ef2e453c4d05e883f6dbef5461981be21246e815a3e5")
//Build date
MIXP_CONF_DEFINE(char*, mixp_buildDate, __DATE__)
MIXP_CONF_DEFINE(char*, mixp_buildTime, __TIME__)

View File

@ -19,31 +19,29 @@
// http://www.gnu.org/licenses/gpl-2.0.txt // http://www.gnu.org/licenses/gpl-2.0.txt
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#ifdef MIXP_CREATE_CONFIG #pragma once
#define MIXP_DEFINE_CONF(X,Y,Z) extern const X g_##Y = Z;
#else #define MIXP_CONF_DECLARE(X,Y) extern const X g_##Y;
#define MIXP_DEFINE_CONF(X,Y,Z) extern const X g_##Y;
#endif
//Version //Version
MIXP_DEFINE_CONF(unsigned int, mixp_versionMajor, 2) MIXP_CONF_DECLARE(unsigned int, mixp_versionMajor)
MIXP_DEFINE_CONF(unsigned int, mixp_versionMinor, 45) MIXP_CONF_DECLARE(unsigned int, mixp_versionMinor)
MIXP_DEFINE_CONF(unsigned int, mixp_versionPatch, 0) MIXP_CONF_DECLARE(unsigned int, mixp_versionPatch)
//MediaInfo Version //MediaInfo Version
MIXP_DEFINE_CONF(unsigned int, mixp_mediaInfoVerMajor, 23) MIXP_CONF_DECLARE(unsigned int, mixp_mediaInfoVerMajor)
MIXP_DEFINE_CONF(unsigned int, mixp_mediaInfoVerMinor, 03) MIXP_CONF_DECLARE(unsigned int, mixp_mediaInfoVerMinor)
MIXP_DEFINE_CONF(unsigned int, mixp_mediaInfoVerPatch, 0) MIXP_CONF_DECLARE(unsigned int, mixp_mediaInfoVerPatch)
//MediaInfo Checksum //MediaInfo Checksum
MIXP_DEFINE_CONF(char*, mixp_checksum_x86_i686, "c4d1cc08ea0a12a3a22bf1ebc0715681624a2313673b915f9b55a746b23e2d955fd2cea092debcfd5642a8d251365080ab5f79a1a0a166ffbd03fc07710a4edd") MIXP_CONF_DECLARE(char*, mixp_checksum_x86_i686)
MIXP_DEFINE_CONF(char*, mixp_checksum_x86_sse2, "889b289f900653c2e64e632b4054e6c2ed19e1d4969ea17925147294aa642675485083e15c8405dcaf6b03c9e11618b8e9a2335cdd49fbfc16460597a1c763e0") MIXP_CONF_DECLARE(char*, mixp_checksum_x86_sse2)
MIXP_DEFINE_CONF(char*, mixp_checksum_x64_sse2, "9bc343ed15812122ab88a4ff123598f2fc4128c570f1e3ff9d05a8e9710ec2e6b41277522c1720a03e13aa556a249e12f8bba4e196b2cf9fe4a8bb4e93abe3fb") MIXP_CONF_DECLARE(char*, mixp_checksum_x64_sse2)
MIXP_DEFINE_CONF(char*, mixp_checksum_x64_avx2, "6f4c2fc6f0017355365dc24aee486ea8e5c9f05cc0b742f4e88808c193b7090c1775aa42bd87bf2ea9507540867cdd606ad3f1f8bc1d55134604c9a7e25e118e") MIXP_CONF_DECLARE(char*, mixp_checksum_x64_avx2)
//Build date //Build date
MIXP_DEFINE_CONF(char*, mixp_buildDate, __DATE__) MIXP_CONF_DECLARE(char*, mixp_buildDate)
MIXP_DEFINE_CONF(char*, mixp_buildTime, __TIME__) MIXP_CONF_DECLARE(char*, mixp_buildTime)
//Show console //Show console
#define MIXP_CONSOLE (0) #define MIXP_CONSOLE (0)
@ -56,4 +54,4 @@ MIXP_DEFINE_CONF(char*, mixp_buildTime, __TIME__)
#endif #endif
//Undefine //Undefine
#undef MIXP_DEFINE_CONF #undef MIXP_CONF_DECLARE

View File

@ -19,8 +19,6 @@
// http://www.gnu.org/licenses/gpl-2.0.txt // http://www.gnu.org/licenses/gpl-2.0.txt
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#define MIXP_CREATE_CONFIG 1
//MUTils //MUTils
#include <MUtils/Startup.h> #include <MUtils/Startup.h>
#include <MUtils/IPCChannel.h> #include <MUtils/IPCChannel.h>

27
src/Version.h Normal file
View File

@ -0,0 +1,27 @@
///////////////////////////////////////////////////////////////////////////////
// MediaInfoXP
// Copyright (C) 2004-2023 LoRd_MuldeR <MuldeR2@GMX.de>
//
// 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
// (at your option) 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.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
// http://www.gnu.org/licenses/gpl-2.0.txt
///////////////////////////////////////////////////////////////////////////////
#pragma once
#define MIXP_VERSION_MAJOR 2
#define MIXP_VERSION_MINOR_HI 4
#define MIXP_VERSION_MINOR_LO 6
#define MIXP_VERSION_PATCH 0