From f7dd935bcd3f6fedba2a14e19bebca785c1fcc2c Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Thu, 20 Oct 2005 15:17:38 +0000 Subject: [PATCH] add a 'unicode' property to modules (not yet supported by mingw, need to add a library for unicode builds some day) svn path=/trunk/; revision=18633 --- reactos/tools/rbuild/module.cpp | 27 +++++++++++++++++++++++++-- reactos/tools/rbuild/rbuild.h | 1 + 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/reactos/tools/rbuild/module.cpp b/reactos/tools/rbuild/module.cpp index 30ec36e7532..004fe92ea75 100644 --- a/reactos/tools/rbuild/module.cpp +++ b/reactos/tools/rbuild/module.cpp @@ -248,6 +248,23 @@ Module::Module ( const Project& project, else extension = GetDefaultModuleExtension (); + att = moduleNode.GetAttribute ( "unicode", false ); + if ( att != NULL ) + { + const char* p = att->value.c_str(); + if ( !stricmp ( p, "true" ) || !stricmp ( p, "yes" ) ) + isUnicode = true; + else if ( !stricmp ( p, "false" ) || !stricmp ( p, "no" ) ) + isUnicode = false; + else + { + throw InvalidAttributeValueException ( + moduleNode.location, + "unicode", + att->value ); + } + } + att = moduleNode.GetAttribute ( "entrypoint", false ); if ( att != NULL ) entrypoint = att->value; @@ -680,9 +697,15 @@ Module::GetDefaultModuleEntrypoint () const return "_DllMain@12"; case Win32CUI: case Test: - return "_mainCRTStartup"; + if ( isUnicode ) + return "_wmainCRTStartup"; + else + return "_mainCRTStartup"; case Win32GUI: - return "_WinMainCRTStartup"; + if ( isUnicode ) + return "_wWinMainCRTStartup"; + else + return "_WinMainCRTStartup"; case KernelModeDriver: return "_DriverEntry@8"; case BuildTool: diff --git a/reactos/tools/rbuild/rbuild.h b/reactos/tools/rbuild/rbuild.h index 60671e083d9..87992f1cc04 100644 --- a/reactos/tools/rbuild/rbuild.h +++ b/reactos/tools/rbuild/rbuild.h @@ -222,6 +222,7 @@ public: ModuleType type; ImportLibrary* importLibrary; bool mangledSymbols; + bool isUnicode; Bootstrap* bootstrap; IfableData non_if_data; std::vector invocations; -- 2.17.1