From 6e102236a64b77384a9509b28602ce95aa91bab9 Mon Sep 17 00:00:00 2001 From: Yuchen Ren Date: Sat, 12 Nov 2022 10:31:03 +0800 Subject: [PATCH] VER 2.1.1-beta.2 -# Add C++ header file to specify version. *# Modify Visual C++ Project. *# Modify Visual C++ Project Filters. *D Modify main source file `WCH.cpp`. x# Remove overly cleared language file items. : Use `Alpha` instead of `Internal Preview`. --- WCH.cpp | 6 +----- WCH.vcxproj | 1 + WCH.vcxproj.filters | 3 +++ modules/basic.hpp | 4 ---- modules/init.hpp | 12 ++++-------- resources/en-US/interactive.json | 4 ---- resources/zh-CN/interactive.json | 4 ---- version.hpp | 11 +++++++++++ 8 files changed, 20 insertions(+), 25 deletions(-) create mode 100644 version.hpp diff --git a/WCH.cpp b/WCH.cpp index a98dcaa..30693bb 100644 --- a/WCH.cpp +++ b/WCH.cpp @@ -4,11 +4,7 @@ This source code file is under MIT License. Copyright (c) 2022 Class Tools Develop Team Contributors: jsh-jsh ren-yc */ -#define WCH_VER_MAIN TEXT("2.1.1") -#define WCH_VER_TYPE 1 -#if WCH_VER_TYPE != 0 - #define WCH_VER_BUILD 6 -#endif +#include "version.hpp" #include "./modules/file-process.hpp" #include "./modules/init.hpp" #include "./modules/commands.hpp" diff --git a/WCH.vcxproj b/WCH.vcxproj index 46f1862..e787555 100644 --- a/WCH.vcxproj +++ b/WCH.vcxproj @@ -423,6 +423,7 @@ + diff --git a/WCH.vcxproj.filters b/WCH.vcxproj.filters index b392046..73ed159 100644 --- a/WCH.vcxproj.filters +++ b/WCH.vcxproj.filters @@ -23,6 +23,9 @@ + + Header Files + Header Files diff --git a/modules/basic.hpp b/modules/basic.hpp index f0f2102..4caca50 100644 --- a/modules/basic.hpp +++ b/modules/basic.hpp @@ -318,10 +318,6 @@ const set> WCH_settings_support = { const set WCH_language_support = { L"ProgramName", L"Start", - L"InternalPreview", - L"PublicPreview", - L"ReleaseCandidate", - L"Build", L"Exit", L"PreviewWarning", L"InputCommandIncorrect", diff --git a/modules/init.hpp b/modules/init.hpp index eff3b99..0b38105 100644 --- a/modules/init.hpp +++ b/modules/init.hpp @@ -114,21 +114,17 @@ void WCH_Init_Log() { void WCH_Init_Var() { // Initialization for variable. - wstring vertype = L""; WCH_window_title = StrToWstr(WCH_Language["ProgramName"].asString()) + L" "; WCH_window_title.append(WCH_VER_MAIN); #if WCH_VER_TYPE != 0 #if WCH_VER_TYPE == 1 - WCH_window_title.append(L" " + StrToWstr(WCH_Language["InternalPreview"].asString())); - vertype = StrToWstr(WCH_Language["InternalPreview"].asString()); + WCH_window_title.append(L" Alpha"); #elif WCH_VER_TYPE == 2 - WCH_window_title.append(L" " + StrToWstr(WCH_Language["PublicPreview"].asString())); - vertype = StrToWstr(WCH_Language["PublicPreview"].asString()); + WCH_window_title.append(L" Beta"); #elif WCH_VER_TYPE == 3 - WCH_window_title.append(L" " + StrToWstr(WCH_Language["ReleaseCandidate"].asString())); - vertype = StrToWstr(WCH_Language["ReleaseCandidate"].asString()); + WCH_window_title.append(L" Rc"); #endif - WCH_window_title.append(L" " + StrToWstr(WCH_Language["Build"].asString()) + L" " + to_wstring(WCH_VER_BUILD)); + WCH_window_title.append(L" " + to_wstring(WCH_VER_BUILD)); WCH_SetWindowStatus(false); if (MessageBoxW(NULL, (StrToWstr(WCH_Language["PreviewWarning"].asString()) + WCH_GetCompileTime()).c_str(), L"WCH WARN", MB_ICONWARNING | MB_YESNO | MB_TOPMOST) == IDNO) { WCH_CheckAndDeleteFile(WCH_path_data + L"\\logs\\latest.log"); diff --git a/resources/en-US/interactive.json b/resources/en-US/interactive.json index b10978f..fd4b409 100644 --- a/resources/en-US/interactive.json +++ b/resources/en-US/interactive.json @@ -1,10 +1,6 @@ { "ProgramName": "Web Class Helper", "Start": "Copyright (c) 2022 Class Tools Develop Team.\nType \"help\", \"update\" or \"license\" for more information.", - "InternalPreview": "Internal Preview", - "PublicPreview": "Public Preview", - "ReleaseCandidate": "Release Candidate", - "Build": "Build", "Exit": "Exit", "PreviewWarning": "This version of the program is only used for testing.\nAre you sure you want to start the program?\nCompile time: ", "InputCommandIncorrect": "Your input command is incorrect, please check and try again.", diff --git a/resources/zh-CN/interactive.json b/resources/zh-CN/interactive.json index c9e19c4..a89f81d 100644 --- a/resources/zh-CN/interactive.json +++ b/resources/zh-CN/interactive.json @@ -1,10 +1,6 @@ { "ProgramName": "网课助手", "Start": "版权所有 (c) 2022 Class Tools Develop Team.\n键入 \"help\", \"update\" 或 \"license\" 获取更多信息.", - "InternalPreview": "内部测试版", - "PublicPreview": "公共测试版", - "ReleaseCandidate": "发布候选版", - "Build": "构建", "Exit": "退出", "PreviewWarning": "此版本的程序仅可用于测试.\n是否仍然要启动程序?\n编译时间: ", "InputCommandIncorrect": "你的输入信息有误, 请检查后重试.", diff --git a/version.hpp b/version.hpp new file mode 100644 index 0000000..f5e34e3 --- /dev/null +++ b/version.hpp @@ -0,0 +1,11 @@ +/* +Web Class Helper Version File 2.1.1 +This source code file is under MIT License. +Copyright (c) 2022 Class Tools Develop Team +Contributors: jsh-jsh ren-yc +*/ +#define WCH_VER_MAIN TEXT("2.1.1") +#define WCH_VER_TYPE 2 +#if WCH_VER_TYPE != 0 + #define WCH_VER_BUILD 2 +#endif \ No newline at end of file