Added platform architecture information to About dialog and CLogger::Out() method.
This commit is contained in:
@@ -45,6 +45,7 @@ function makeVersionString([string]$vmaj, [string]$vmin, [string]$vbld, [string]
|
||||
[string]$buildDateTime = [string]$vs = [string]$vn = [string]$intName = [string]$origName = $null
|
||||
[int]$pys = [int]$spanDays = [int]$spanSecs = $null
|
||||
[int]$currentYear = [int]$currentMonth = [int]$currentDay = [int]$currentHour = [int]$currentMinute = [int]$currentSecond = $null
|
||||
[string]$platformArch = $args[0]
|
||||
[string]$iniFile = ".\Version.ini"
|
||||
#endregion
|
||||
|
||||
@@ -103,8 +104,8 @@ $currentSecond = $date.Second
|
||||
$buildDateTime = "Build date: $($date.GetDateTimeFormats('u').Replace('Z', ''))"
|
||||
$spanDays = [math]::Round((New-TimeSpan -Start $(Get-Date -Month 1 -Day 1 -Year 2000) -End $date).TotalDays)
|
||||
$spanSecs = [math]::Round((New-TimeSpan -Start $($date.Date) -End $($date.DateTime)).TotalSeconds)
|
||||
if ($pys -eq $currentYear) { $pcf = "Copyright (C) $pys by $pa" } else { $pcf = "Copyright (C) $pys-$currentYear by $pa" }
|
||||
$intName = "$pn-C++"
|
||||
if ($pys -eq $currentYear) { $pcf = "Copyright (c) $pys $pa" } else { $pcf = "Copyright (c) $pys-$currentYear $pa" }
|
||||
$intName = "$pn-$platformArch-C++"
|
||||
$origName = "$pn.exe"
|
||||
$verMajor = getValue $verMajor
|
||||
$verMinor = getValue $verMinor
|
||||
@@ -125,6 +126,8 @@ else {
|
||||
$pnf = "$pn v$vs"
|
||||
}
|
||||
|
||||
$pnf = "$pn v$vs ($platformArch)"
|
||||
|
||||
#region Save all variables to file
|
||||
"// $pn" | Out-File -FilePath ".\VersionInfo.h" -Encoding unicode
|
||||
"// VersionInfo.h" | Out-File -FilePath ".\VersionInfo.h" -Encoding unicode -Append
|
||||
@@ -157,6 +160,7 @@ else {
|
||||
# echo " verPatch: [$verPatch]"
|
||||
# echo ""
|
||||
# echo " aboutBuild: [$aboutBuild]"
|
||||
# echo " platformArch: [$platformArch]"
|
||||
# echo " productNameFull: [$pnf]"
|
||||
# echo "productCopyrightFull: [$pcf]"
|
||||
# echo " internalName: [$intName]"
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
@ECHO OFF
|
||||
|
||||
REM In VisualStudio add to Pre-Build events:
|
||||
REM "$(SolutionDir)pre-build.cmd" "$(SolutionDir)" "$(ProjectDir)"
|
||||
REM "$(SolutionDir)pre-build.cmd" "$(SolutionDir)" "$(ProjectDir)" "$(PlatformTarget)"
|
||||
REM Then in "Resource Includes..." add '#include "VersionInfo.rc"' into 'Compile-time Directives'
|
||||
|
||||
IF "%~1" == "" GOTO :no_args
|
||||
IF "%~2" == "" GOTO :no_args
|
||||
IF "%~3" == "" GOTO :no_args
|
||||
SET solutionDir=%1
|
||||
SET projectDir=%2
|
||||
SET platformArch=%3
|
||||
|
||||
CD /D %solutionDir%
|
||||
powershell -ExecutionPolicy RemoteSigned -File Update_Version.ps1
|
||||
powershell -ExecutionPolicy RemoteSigned -File Update_Version.ps1 %platformArch%
|
||||
MOVE /Y %solutionDir%VersionInfo.h %projectDir%VersionInfo.h
|
||||
EXIT
|
||||
|
||||
|
||||
@@ -64,27 +64,6 @@ CLogger::CLogger(const wchar_t* _appTitle) {
|
||||
Init();
|
||||
}
|
||||
|
||||
CLogger::CLogger(const wchar_t* _appTitle, const wchar_t* _appVersion) {
|
||||
szAppTitle = _appTitle; szAppVersion = _appVersion;
|
||||
szAppTitleVer = _appTitle;
|
||||
szAppTitleVer.append(L", v").append(_appVersion);
|
||||
Init();
|
||||
}
|
||||
|
||||
CLogger::CLogger(const wchar_t* _appTitle, const uint8_t _appPlatform) {
|
||||
szAppTitle = _appTitle; szAppPlatform = std::to_wstring(_appPlatform);
|
||||
szAppTitleVer = _appTitle;
|
||||
szAppTitleVer.append(L" (x").append(szAppPlatform).append(L")");
|
||||
Init();
|
||||
}
|
||||
|
||||
CLogger::CLogger(const wchar_t* _appTitle, const wchar_t* _appVersion, const uint8_t _appPlatform) {
|
||||
szAppTitle = _appTitle; szAppVersion = _appVersion; szAppPlatform = std::to_wstring(_appPlatform);
|
||||
szAppTitleVer = _appTitle;
|
||||
szAppTitleVer.append(L", v").append(_appVersion).append(L" (x").append(szAppPlatform).append(L")");
|
||||
Init();
|
||||
}
|
||||
|
||||
CLogger::~CLogger() {
|
||||
if (fsLogFile) {
|
||||
fsLogFile << GetTimeStamp() << "Stop log." << std::endl;
|
||||
|
||||
@@ -11,9 +11,6 @@ class CLogger
|
||||
public:
|
||||
void Out(const wchar_t*, ...);
|
||||
CLogger(const wchar_t*);
|
||||
CLogger(const wchar_t*, const wchar_t*);
|
||||
CLogger(const wchar_t*, const uint8_t);
|
||||
CLogger(const wchar_t*, const wchar_t*, const uint8_t);
|
||||
~CLogger();
|
||||
|
||||
private:
|
||||
|
||||
@@ -31,10 +31,7 @@ HMENU hMenu = NULL, hPopup = NULL;
|
||||
HWND hFgWnd = NULL;
|
||||
BOOL bKPressed = FALSE, bMPressed = FALSE, fShowIcon = TRUE, fCheckUpdates = TRUE, bWorkArea = TRUE;
|
||||
BOOL bLCTRL = FALSE, bLWIN = FALSE, bKEYV = FALSE;
|
||||
//CLogger logger(TEXT(PRODUCT_NAME), TEXT(VERSION_STR), ARCH);
|
||||
//CLogger logger(TEXT(PRODUCT_NAME), TEXT(VERSION_STR));
|
||||
//CLogger logger(TEXT(PRODUCT_NAME), ARCH);
|
||||
CLogger logger(TEXT(PRODUCT_NAME));
|
||||
CLogger logger(TEXT(PRODUCT_NAME_FULL));
|
||||
|
||||
NOTIFYICONDATAW nid = { 0 };
|
||||
MENUITEMINFO mii = { 0 };
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
</ManifestFromManagedAssembly>
|
||||
</Manifest>
|
||||
<PreBuildEvent>
|
||||
<Command>"$(SolutionDir)pre-build.cmd" "$(SolutionDir)" "$(ProjectDir)"</Command>
|
||||
<Command>"$(SolutionDir)pre-build.cmd" "$(SolutionDir)" "$(ProjectDir)" "$(PlatformTarget)"</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
@@ -137,7 +137,7 @@
|
||||
<AdditionalManifestFiles>%(AdditionalManifestFiles)</AdditionalManifestFiles>
|
||||
</Manifest>
|
||||
<PreBuildEvent>
|
||||
<Command>"$(SolutionDir)pre-build.cmd" "$(SolutionDir)" "$(ProjectDir)"</Command>
|
||||
<Command>"$(SolutionDir)pre-build.cmd" "$(SolutionDir)" "$(ProjectDir)" "$(PlatformTarget)"</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
@@ -151,13 +151,13 @@
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>comctl32.lib;wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>%(AdditionalManifestFiles)</AdditionalManifestFiles>
|
||||
</Manifest>
|
||||
<PreBuildEvent>
|
||||
<Command>powershell -File "$(SolutionDir)Update_Version.ps1" move /y "$(SolutionDir)VersionInfo.h" "$(ProjectDir)"</Command>
|
||||
<Command>"$(SolutionDir)pre-build.cmd" "$(SolutionDir)" "$(ProjectDir)" "$(PlatformTarget)"</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
@@ -176,13 +176,13 @@
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>comctl32.lib;wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>%(AdditionalManifestFiles)</AdditionalManifestFiles>
|
||||
</Manifest>
|
||||
<PreBuildEvent>
|
||||
<Command>powershell -File "$(SolutionDir)Update_Version.ps1" move /y "$(SolutionDir)VersionInfo.h" "$(ProjectDir)"</Command>
|
||||
<Command>"$(SolutionDir)pre-build.cmd" "$(SolutionDir)" "$(ProjectDir)" "$(PlatformTarget)"</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -27,27 +27,24 @@
|
||||
<ClInclude Include="wCenterWindow.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="logger.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="globals.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="picojson.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="updater.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="CLogger.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="wCenterWindow.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="logger.cpp">
|
||||
<ClCompile Include="updater.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="updater.cpp">
|
||||
<ClCompile Include="CLogger.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user