Skip to content
This repository has been archived by the owner on May 4, 2023. It is now read-only.

Commit

Permalink
VER 2.1.1-beta.2
Browse files Browse the repository at this point in the history
-# 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`.
  • Loading branch information
ren-yc committed Nov 12, 2022
1 parent 0a985c0 commit 6e10223
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 25 deletions.
6 changes: 1 addition & 5 deletions WCH.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions WCH.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@
<ClCompile Include="WCH.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="version.hpp" />
<ClInclude Include="modules\apis.hpp" />
<ClInclude Include="modules\commands.hpp" />
<ClInclude Include="modules\file-process.hpp" />
Expand Down
3 changes: 3 additions & 0 deletions WCH.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="version.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="modules\apis.hpp">
<Filter>Header Files</Filter>
</ClInclude>
Expand Down
4 changes: 0 additions & 4 deletions modules/basic.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,10 +318,6 @@ const set<tuple<wstring, wstring, wstring, bool>> WCH_settings_support = {
const set<wstring> WCH_language_support = {
L"ProgramName",
L"Start",
L"InternalPreview",
L"PublicPreview",
L"ReleaseCandidate",
L"Build",
L"Exit",
L"PreviewWarning",
L"InputCommandIncorrect",
Expand Down
12 changes: 4 additions & 8 deletions modules/init.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
4 changes: 0 additions & 4 deletions resources/en-US/interactive.json
Original file line number Diff line number Diff line change
@@ -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.",
Expand Down
4 changes: 0 additions & 4 deletions resources/zh-CN/interactive.json
Original file line number Diff line number Diff line change
@@ -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": "你的输入信息有误, 请检查后重试.",
Expand Down
11 changes: 11 additions & 0 deletions version.hpp
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 6e10223

Please sign in to comment.