__LINE__,
"Module created with non-<module> node" );
- xmlbuildFile = Path::RelativeFromWorkingDirectory ( moduleNode.xmlFile->filename () );
+ xmlbuildFile = FixSeparator ( Path::RelativeFromWorkingDirectory ( moduleNode.xmlFile->filename () ) );
const XMLAttribute* att = moduleNode.GetAttribute ( "name", true );
assert(att);
}
}
+ 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 = "";
+
+ att = moduleNode.GetAttribute ( "layoutid", false );
+ if (type == KeyboardLayout && att != NULL )
+ layoutId = att->value;
+ else
+ layoutId = "";
+
+ att = moduleNode.GetAttribute ( "layoutnameresid", false );
+ if (type == KeyboardLayout && att != NULL )
+ layoutNameResId = att->value;
+ else
+ layoutNameResId = "";
+
SetImportLibrary ( NULL );
}
delete linkerScript;
if ( pch )
delete pch;
+ if ( install )
+ delete install;
+ if ( metadata )
+ delete metadata;
+ if ( bootstrap )
+ delete bootstrap;
+ if ( importLibrary )
+ delete importLibrary;
+ if ( dependency )
+ delete dependency;
+ if ( autoRegister )
+ delete autoRegister;
+ if ( output )
+ delete output;
}
void
if ( pos == string::npos )
{
linkerScript = new LinkerScript (
- e, *this, FileLocation ( SourceDirectory, relative_path, e.value, &e ) );
+ e, *this, new FileLocation ( SourceDirectory, relative_path, e.value, &e ) );
}
else
{
string dir = e.value.substr ( 0, pos );
string name = e.value.substr ( pos + 1);
linkerScript = new LinkerScript (
- e, *this, FileLocation ( SourceDirectory, relative_path + sSep + dir, name, &e ) );
+ e, *this, new FileLocation ( SourceDirectory, relative_path + sSep + dir, name, &e ) );
}
subs_invalid = true;
}
if ( pos == string::npos )
{
pch = new PchFile (
- e, *this, FileLocation ( SourceDirectory, relative_path, e.value, &e ) );
+ e, *this, new FileLocation ( SourceDirectory, relative_path, e.value, &e ) );
}
else
{
string dir = e.value.substr ( 0, pos );
string name = e.value.substr ( pos + 1);
pch = new PchFile (
- e, *this, FileLocation ( SourceDirectory, relative_path + sSep + dir, name, &e ) );
+ e, *this, new FileLocation ( SourceDirectory, relative_path + sSep + dir, name, &e ) );
}
subs_invalid = true;
}
return BuildTool;
if ( attribute.value == "staticlibrary" )
return StaticLibrary;
+ if ( attribute.value == "hoststaticlibrary" )
+ return HostStaticLibrary;
if ( attribute.value == "objectlibrary" )
return ObjectLibrary;
if ( attribute.value == "kernel" )
return NativeDLL;
if ( attribute.value == "nativecui" )
return NativeCUI;
+ if ( attribute.value == "keyboardlayout" )
+ return KeyboardLayout;
if ( attribute.value == "win32dll" )
return Win32DLL;
if ( attribute.value == "win32ocx" )
return EmbeddedTypeLib;
if ( attribute.value == "elfexecutable" )
return ElfExecutable;
+ if ( attribute.value == "cabinet" )
+ return Cabinet;
throw InvalidAttributeValueException ( location,
attribute.name,
attribute.value );
{
case Kernel:
case KernelModeDLL:
+ case KeyboardLayout:
case NativeDLL:
case Win32DLL:
case Win32OCX:
case LiveIso:
case IsoRegTest:
case LiveIsoRegTest:
- case EmbeddedTypeLib:
case ElfExecutable:
+ case Cabinet:
return OutputDirectory;
+ case EmbeddedTypeLib:
case StaticLibrary:
+ case HostStaticLibrary:
case ObjectLibrary:
case RpcServer:
case RpcClient:
case Alias:
case IdlHeader:
return IntermediateDirectory;
+ case TypeDontCare:
+ break;
}
throw InvalidOperationException ( __FILE__,
__LINE__,
return ExePostfix;
case BootProgram:
case StaticLibrary:
+ case HostStaticLibrary:
return ".a";
case ObjectLibrary:
return ".o";
case KernelModeDLL:
case NativeDLL:
+ case KeyboardLayout:
case Win32DLL:
return ".dll";
case Win32OCX:
case KernelModeDriver:
case BootLoader:
return ".sys";
+ case Cabinet:
+ return ".cab";
case BootSector:
return ".o";
case Iso:
return "";
case EmbeddedTypeLib:
return ".tlb";
+ case TypeDontCare:
+ break;
}
throw InvalidOperationException ( __FILE__,
__LINE__ );
switch ( type )
{
case Kernel:
- return "NtProcessStartup";
+ return "KiSystemStartup";
+ case KeyboardLayout:
case KernelModeDLL:
case KernelModeDriver:
return "DriverEntry@8";
return "WinMainCRTStartup";
case BuildTool:
case StaticLibrary:
+ case HostStaticLibrary:
case ObjectLibrary:
case BootLoader:
case BootSector:
case IdlHeader:
case ElfExecutable:
case EmbeddedTypeLib:
+ case Cabinet:
return "";
+ case TypeDontCare:
+ break;
}
throw InvalidOperationException ( __FILE__,
__LINE__ );
case Win32SCR:
case Win32GUI:
return "0x00400000";
+ case KeyboardLayout:
case KernelModeDLL:
case KernelModeDriver:
return "0x00010000";
return "0xe00000";
case BuildTool:
case StaticLibrary:
+ case HostStaticLibrary:
case ObjectLibrary:
case BootLoader:
case BootSector:
case BootProgram:
case IdlHeader:
case EmbeddedTypeLib:
+ case Cabinet:
return "";
+ case TypeDontCare:
+ break;
}
throw InvalidOperationException ( __FILE__,
__LINE__ );
bool
Module::HasImportLibrary () const
{
- return importLibrary != NULL && type != StaticLibrary;
+ return importLibrary != NULL && type != StaticLibrary && type != HostStaticLibrary;
}
bool
case Kernel:
case KernelModeDLL:
case NativeDLL:
+ case KeyboardLayout:
case Win32DLL:
case Win32OCX:
case KernelModeDriver:
case Win32GUI:
case BuildTool:
case StaticLibrary:
+ case HostStaticLibrary:
case ObjectLibrary:
case BootLoader:
case BootSector:
case IdlHeader:
case EmbeddedTypeLib:
case ElfExecutable:
+ case Cabinet:
return false;
+ case TypeDontCare:
+ break;
}
throw InvalidOperationException ( __FILE__,
__LINE__ );
}
+ImportLibrary::~ImportLibrary ()
+{
+ delete source;
+}
+
+
ImportLibrary::ImportLibrary ( const Project& project,
const XMLElement& node,
const Module& module )
if ( dllname )
this->dllname = dllname->value;
- else if ( module.type == StaticLibrary )
+ else if ( module.type == StaticLibrary || module.type == HostStaticLibrary )
throw XMLInvalidBuildFileException (
node.location,
"<importlibrary> dllname attribute required." );
att = node_.GetAttribute ( "value", true );
assert(att);
value = att->value;
+
+ att = node_.GetAttribute ( "internal", false );
+ if ( att != NULL )
+ {
+ const char* p = att->value.c_str();
+ if ( !stricmp ( p, "true" ) || !stricmp ( p, "yes" ) )
+ isInternal = true;
+ else if ( !stricmp ( p, "false" ) || !stricmp ( p, "no" ) )
+ isInternal = false;
+ else
+ {
+ throw InvalidAttributeValueException (
+ node_.location,
+ "internal",
+ att->value );
+ }
+ }
+ else
+ isInternal = false;
}
Property::Property ( const Project& project_,
PchFile::PchFile (
const XMLElement& node_,
const Module& module_,
- const FileLocation& file_ )
+ const FileLocation *file_ )
: node(node_), module(module_), file(file_)
{
}
+PchFile::~PchFile()
+{
+ delete file;
+}
+
void
PchFile::ProcessXML()
{