Skip to content

Commit

Permalink
refactor: 更新预发布版本宏定义
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxLHy0424 committed Dec 16, 2024
1 parent 8e83ae3 commit 43b1c03
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion info.rc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "src/info.hpp"
#ifdef _THE_NEXT_MAJOR_UPDATE_
#ifdef _NEXT_
1 ICON "img/favicon_next.ico"
#else
1 ICON "img/favicon.ico"
Expand Down
8 changes: 4 additions & 4 deletions src/console_ui.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once
#if __cplusplus >= 202302L
# include <windows.h>
# ifdef _THE_NEXT_MAJOR_UPDATE_
# ifdef _NEXT_
# include <print>
# else
# include <cstdio>
Expand Down Expand Up @@ -203,7 +203,7 @@ class console_ui final {
{
get_console_size_();
set_cursor_( { 0, 0 } );
# ifdef _THE_NEXT_MAJOR_UPDATE_
# ifdef _NEXT_
std::print( "{}", string_type( width_ * height_, ' ' ) );
# else
std::printf( string_type( width_ * height_, ' ' ).c_str() );
Expand All @@ -212,7 +212,7 @@ class console_ui final {
}
auto write_( const string_type &_text, const bool _is_endl = false )
{
# ifdef _THE_NEXT_MAJOR_UPDATE_
# ifdef _NEXT_
std::print( "{}{}", _text, _is_endl ? '\n' : '\0' );
# else
std::printf( "%s%c", _text.c_str(), _is_endl ? '\n' : '\0' );
Expand Down Expand Up @@ -418,7 +418,7 @@ class console_ui final {
SetConsoleOutputCP( _code_page );
SetConsoleCP( _code_page );
SetConsoleTitleA( _title.c_str() );
# ifdef _THE_NEXT_MAJOR_UPDATE_
# ifdef _NEXT_
system( std::format( "mode.com con cols={} lines={}", _width, _height ).c_str() );
# else
using namespace std::string_literals;
Expand Down
6 changes: 3 additions & 3 deletions src/core.hpp
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#pragma once
#ifdef _THE_NEXT_MAJOR_UPDATE_
#ifdef _NEXT_
# include <limits.h>
# include <fstream>
#endif
#include "console_ui.hpp"
#include "info.hpp"
#ifndef _THE_NEXT_MAJOR_UPDATE_
#ifndef _NEXT_
inline struct {
bool front_show_window, translucent_window, window_ctrls;
} args_data{};
inline bool args_error{};
#endif
namespace core {
#ifdef _THE_NEXT_MAJOR_UPDATE_
#ifdef _NEXT_
using string_type = console_ui::string_type;
using wstring_type = std::wstring;
template < typename _type_ >
Expand Down
4 changes: 2 additions & 2 deletions src/info.hpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#pragma once
#define INFO_NAME "Computer Room Control Software Nemesis"
#ifdef _THE_NEXT_MAJOR_UPDATE_
#ifdef _NEXT_
# define INFO_VERSION "v6.0.0-preview.7"
#else
# define INFO_VERSION "v5.11.0"
#endif
#define INFO_REPO_URL "https://github.com/MaxLHy0424/CRCSN"
#define INFO_DEVELOPER "MaxLHy0424"
#define INFO_LICENSE "MIT License"
#ifdef _THE_NEXT_MAJOR_UPDATE_
#ifdef _NEXT_
# define CODE_PAGE 936
# define WINDOW_TITLE "CRCSN"
# define WINDOW_WIDTH 50
Expand Down
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifdef _WIN32
# include "console_ui.hpp"
# include "core.hpp"
# ifdef _THE_NEXT_MAJOR_UPDATE_
# ifdef _NEXT_
auto main() -> int
{
console_ui ui;
Expand Down

0 comments on commit 43b1c03

Please sign in to comment.