diff --git a/elenasrc3/elenavm/elenavmmachine.cpp b/elenasrc3/elenavm/elenavmmachine.cpp index d23ae8b4a..9012c5fc4 100644 --- a/elenasrc3/elenavm/elenavmmachine.cpp +++ b/elenasrc3/elenavm/elenavmmachine.cpp @@ -111,11 +111,19 @@ ELENAVMMachine :: ELENAVMMachine(path_t configPath, PresenterBase* presenter, Pl _jitLinker = nullptr; } +ustr_t ELENAVMMachine::getArchitectureName() { +#if defined(_WIN64) || defined(__x86_64__) || defined(__ppc64__) + return "64-bit"; +#else + return "32-bit"; +#endif +} + void ELENAVMMachine :: init(SystemEnv* exeEnv) { assert(_initialized == false); - - _presenter->printLine(ELENAVM_GREETING, ENGINE_MAJOR_VERSION, ENGINE_MINOR_VERSION, ELENAVM_REVISION_NUMBER); + ustr_t architecture = getArchitectureName(); + _presenter->printLine(ELENAVM_GREETING, ENGINE_MAJOR_VERSION, ENGINE_MINOR_VERSION, ELENAVM_REVISION_NUMBER, architecture); _presenter->printLine(ELENAVM_INITIALIZING); _configuration->initLoader(_libraryProvider); diff --git a/elenasrc3/elenavm/elenavmmachine.h b/elenasrc3/elenavm/elenavmmachine.h index 879d3eabe..e4a6e9413 100644 --- a/elenasrc3/elenavm/elenavmmachine.h +++ b/elenasrc3/elenavm/elenavmmachine.h @@ -82,6 +82,7 @@ namespace elena_lang virtual void resumeVM(SystemEnv* env, void* criricalHandler); + ustr_t getArchitectureName(); void init(SystemEnv* env); AddressMap::Iterator externals() override; diff --git a/elenasrc3/elenavm/vmcommon.h b/elenasrc3/elenavm/vmcommon.h index 7a440a87e..124e36dfe 100644 --- a/elenasrc3/elenavm/vmcommon.h +++ b/elenasrc3/elenavm/vmcommon.h @@ -13,7 +13,7 @@ namespace elena_lang { - constexpr auto ELENAVM_GREETING = "ELENA VM %d.%d.%d (C)2022-2024 by Aleksey Rakov"; + constexpr auto ELENAVM_GREETING = "ELENA VM %d.%d.%d (%s) (C)2022-2024 by Aleksey Rakov"; constexpr auto ELENAVM_INITIALIZING = "Initializing..."; } diff --git a/elenasrc3/engine/elena.h b/elenasrc3/engine/elena.h index f00cc013e..d545cbeb2 100644 --- a/elenasrc3/engine/elena.h +++ b/elenasrc3/engine/elena.h @@ -656,6 +656,7 @@ namespace elena_lang virtual void printLine(ustr_t msg, int arg1) = 0; virtual void printLine(ustr_t msg, int arg1, int arg2) = 0; virtual void printLine(ustr_t msg, int arg1, int arg2, int arg3) = 0; + virtual void printLine(ustr_t msg, int arg1, int arg2, int arg3, ustr_t arg4) = 0; //version support print virtual void printLine(ustr_t msg, ustr_t arg1, int arg2, int arg3, ustr_t arg4) = 0; virtual void printPathLine(ustr_t msg, path_t arg) = 0; virtual void printPathLine(ustr_t msg, path_t arg1, int arg2, int arg3, ustr_t arg4) = 0; diff --git a/elenasrc3/engine/windows/presenter.cpp b/elenasrc3/engine/windows/presenter.cpp index a8447e66f..553b5a690 100644 --- a/elenasrc3/engine/windows/presenter.cpp +++ b/elenasrc3/engine/windows/presenter.cpp @@ -155,6 +155,14 @@ void WinConsolePresenter :: printLine(ustr_t msg, int arg1, int arg2, int arg3) ::printLine(wstr.str(), arg1, arg2, arg3); } +void WinConsolePresenter::printLine(ustr_t msg, int arg1, int arg2, int arg3, ustr_t arg4) //version support print +{ + WideMessage wstr(msg); + WideMessage warg4(arg4); + + ::printLine(wstr.str(), arg1, arg2, arg3, warg4.str()); +} + void WinConsolePresenter :: printPathLine(ustr_t msg, path_t arg1, int arg2, int arg3, ustr_t arg4) { WideMessage wstr(msg); diff --git a/elenasrc3/engine/windows/presenter.h b/elenasrc3/engine/windows/presenter.h index a10a8e57c..5bee7b267 100644 --- a/elenasrc3/engine/windows/presenter.h +++ b/elenasrc3/engine/windows/presenter.h @@ -33,6 +33,8 @@ namespace elena_lang void printLine(ustr_t msg, ustr_t arg1, ustr_t arg2) override; void printLine(ustr_t msg, ustr_t arg1, ustr_t arg2, ustr_t arg3) override; void printLine(ustr_t msg, int arg1, int arg2, int arg3) override; + void printLine(ustr_t msg, int arg1, int arg2, int arg3, ustr_t arg4) override; //version support print + void printPathLine(ustr_t msg, path_t arg1, int arg2, int arg3, ustr_t arg4) override; void printLine(ustr_t msg, int arg1) override; void printLine(ustr_t msg, int arg1, int arg2) override;