- Add specific module type for keyboard layouts

- Added a description attribute to modules
- Added a lcid attribute to modules (KeyboardLayout only)

svn path=/trunk/; revision=33531
This commit is contained in:
Marc Piulachs 2008-05-15 14:46:15 +00:00
parent d2bc8a879f
commit eb3bf8718c
6 changed files with 33 additions and 5 deletions

View file

@ -640,7 +640,7 @@ CBBackend::_generate_cbproj ( const Module& module )
fprintf ( OUT, "\t\t\t\t\t<Add option=\"-Wl,--entry,%s%s\" />\r\n", "_", module.GetEntryPoint(false).c_str () );
fprintf ( OUT, "\t\t\t\t\t<Add option=\"-Wl,--image-base,%s\" />\r\n", baseaddr == "" ? "0x40000" : baseaddr.c_str () );
if ( module.type == Win32DLL )
if ( module.type == Win32DLL)
fprintf ( OUT, "\t\t\t\t\t<Add option=\"-Wl,--shared\" />\r\n" );
else if ( module.type == NativeDLL)
fprintf ( OUT, "\t\t\t\t\t<Add option=\"-Wl,--shared\" />\r\n" );

View file

@ -190,6 +190,7 @@ MingwModuleHandler::InstanciateHandler (
case Win32GUI:
handler = new MingwWin32GUIModuleHandler ( module );
break;
case KeyboardLayout:
case KernelModeDLL:
handler = new MingwKernelModeDLLModuleHandler ( module );
break;
@ -2921,7 +2922,7 @@ MingwAddImplicitLibraries( Module &module )
&& module.type != Win32OCX
&& module.type != Win32CUI
&& module.type != Win32GUI
&& module.type != Win32SCR )
&& module.type != Win32SCR)
{
// no implicit libraries
return;

View file

@ -356,7 +356,8 @@ MSVCBackend::_generate_vcproj ( const Module& module )
if (getenv ( "BASEDIR" ) != NULL &&
(module.type == Kernel ||
module.type == KernelModeDLL ||
module.type == KernelModeDriver))
module.type == KernelModeDriver ||
module.type == KeyboardLayout))
{
string WdkBase, SdkPath, CrtPath, DdkPath;
WdkBase = getenv ( "BASEDIR" );
@ -514,7 +515,8 @@ MSVCBackend::_generate_vcproj ( const Module& module )
if (getenv ( "BASEDIR" ) != NULL &&
(module.type == Kernel ||
module.type == KernelModeDLL ||
module.type == KernelModeDriver))
module.type == KernelModeDriver ||
module.type == KeyboardLayout))
{
string WdkBase, CrtPath, DdkPath;
WdkBase = getenv ( "BASEDIR" );

View file

@ -43,6 +43,7 @@ Bootstrap::IsSupportedModuleType ( ModuleType type )
{
case Kernel:
case KernelModeDLL:
case KeyboardLayout:
case NativeDLL:
case NativeCUI:
case Win32DLL:

View file

@ -466,6 +466,20 @@ Module::Module ( const Project& project,
}
}
att = moduleNode.GetAttribute ( "description", false );
if (att != NULL )
{
description = project.ResolveProperties(att->value);
}
else
description = "";
att = moduleNode.GetAttribute ( "lcid", false );
if (type == KeyboardLayout && att != NULL )
lcid = att->value;
else
lcid = "";
SetImportLibrary ( NULL );
}
@ -899,6 +913,8 @@ Module::GetModuleType ( const string& location, const XMLAttribute& attribute )
return NativeDLL;
if ( attribute.value == "nativecui" )
return NativeCUI;
if ( attribute.value == "keyboardlayout" )
return KeyboardLayout;
if ( attribute.value == "win32dll" )
return Win32DLL;
if ( attribute.value == "win32ocx" )
@ -953,6 +969,7 @@ Module::GetTargetDirectoryTree () const
{
case Kernel:
case KernelModeDLL:
case KeyboardLayout:
case NativeDLL:
case Win32DLL:
case Win32OCX:
@ -1015,6 +1032,7 @@ Module::GetDefaultModuleExtension () const
case KernelModeDLL:
case NativeDLL:
case KeyboardLayout:
case Win32DLL:
return ".dll";
case Win32OCX:
@ -1057,6 +1075,7 @@ Module::GetDefaultModuleEntrypoint () const
{
case Kernel:
return "KiSystemStartup";
case KeyboardLayout:
case KernelModeDLL:
case KernelModeDriver:
return "DriverEntry@8";
@ -1124,6 +1143,7 @@ Module::GetDefaultModuleBaseaddress () const
case Win32SCR:
case Win32GUI:
return "0x00400000";
case KeyboardLayout:
case KernelModeDLL:
case KernelModeDriver:
return "0x00010000";
@ -1169,6 +1189,7 @@ Module::IsDLL () const
case Kernel:
case KernelModeDLL:
case NativeDLL:
case KeyboardLayout:
case Win32DLL:
case Win32OCX:
case KernelModeDriver:

View file

@ -303,7 +303,8 @@ enum ModuleType
RpcProxy,
HostStaticLibrary,
TypeDontCare,
Cabinet
Cabinet,
KeyboardLayout
};
enum HostType
@ -375,6 +376,8 @@ public:
FileLocation *output; // "path/foo.exe"
FileLocation *dependency; // "path/foo.exe" or "path/libfoo.a"
FileLocation *install;
std::string description;
std::string lcid;
Module ( const Project& project,
const XMLElement& moduleNode,