Put halmp.dll on CD

svn path=/trunk/; revision=16810
This commit is contained in:
Casper Hornstrup 2005-07-27 19:10:57 +00:00
parent dc0201cafa
commit 24f28bb15b
11 changed files with 96 additions and 11 deletions

View file

@ -7,3 +7,9 @@
<file>hal.c</file> <file>hal.c</file>
<file>hal.rc</file> <file>hal.rc</file>
</module> </module>
<module ifnot="${MP}" name="halupalias" type="alias" installbase="system32" installname="hal.dll" aliasof="halup">
</module>
<module if="${MP}" name="halmpalias" type="alias" installbase="system32" installname="hal.dll" aliasof="halmp">
</module>

View file

@ -1,5 +1,6 @@
<module if="${MP}" name="halmp" type="kernelmodedll" installbase="system32" installname="hal.dll"> <module name="halmp" type="kernelmodedll">
<importlibrary definition="../../hal/hal.def" /> <importlibrary definition="../../hal/hal.def" />
<bootstrap base="reactos" />
<include base="hal_generic">../include</include> <include base="hal_generic">../include</include>
<include base="ntoskrnl">include</include> <include base="ntoskrnl">include</include>
<define name="_DISABLE_TIDENTS" /> <define name="_DISABLE_TIDENTS" />

View file

@ -1,4 +1,4 @@
<module ifnot="${MP}" name="halup" type="kernelmodedll" installbase="system32" installname="hal.dll"> <module name="halup" type="kernelmodedll">
<importlibrary definition="../../hal/hal.def" /> <importlibrary definition="../../hal/hal.def" />
<bootstrap base="reactos" nameoncd="hal.dll" /> <bootstrap base="reactos" nameoncd="hal.dll" />
<include base="hal_generic">../include</include> <include base="hal_generic">../include</include>

View file

@ -566,6 +566,8 @@ MingwBackend::IncludeInAllTarget ( const Module& module ) const
return false; return false;
if ( module.type == Test ) if ( module.type == Test )
return false; return false;
if ( module.type == Alias )
return false;
return true; return true;
} }
@ -977,6 +979,19 @@ MingwBackend::OutputNonModuleInstallTargets ()
} }
} }
const Module&
MingwBackend::GetAliasedModuleOrModule ( const Module& module ) const
{
if ( module.aliasedModuleName.size () > 0 )
{
const Module* aliasedModule = ProjectNode.LocateModule ( module.aliasedModuleName );
assert ( aliasedModule );
return *aliasedModule;
}
else
return module;
}
void void
MingwBackend::OutputModuleInstallTargets () MingwBackend::OutputModuleInstallTargets ()
{ {
@ -987,8 +1002,9 @@ MingwBackend::OutputModuleInstallTargets ()
continue; continue;
if ( module.installName.length () > 0 ) if ( module.installName.length () > 0 )
{ {
const Module& aliasedModule = GetAliasedModuleOrModule ( module );
string sourceFilename = MingwModuleHandler::PassThruCacheDirectory ( string sourceFilename = MingwModuleHandler::PassThruCacheDirectory (
NormalizeFilename ( module.GetPath () ), NormalizeFilename ( aliasedModule.GetPath () ),
outputDirectory ); outputDirectory );
OutputInstallTarget ( sourceFilename, OutputInstallTarget ( sourceFilename,
module.installName, module.installName,

View file

@ -68,6 +68,7 @@ public:
virtual void Process (); virtual void Process ();
std::string AddDirectoryTarget ( const std::string& directory, std::string AddDirectoryTarget ( const std::string& directory,
Directory* directoryTree ); Directory* directoryTree );
const Module& GetAliasedModuleOrModule ( const Module& module ) const;
std::string compilerPrefix; std::string compilerPrefix;
std::string compilerCommand; std::string compilerCommand;
std::string nasmCommand; std::string nasmCommand;

View file

@ -237,6 +237,9 @@ MingwModuleHandler::InstanciateHandler (
case RpcClient: case RpcClient:
handler = new MingwRpcClientModuleHandler ( module ); handler = new MingwRpcClientModuleHandler ( module );
break; break;
case Alias:
handler = new MingwAliasModuleHandler ( module );
break;
default: default:
throw UnknownModuleTypeException ( throw UnknownModuleTypeException (
module.node.location, module.node.location,
@ -2877,12 +2880,13 @@ MingwLiveIsoModuleHandler::OutputModuleCopyCommands ( string& livecdDirectory,
continue; continue;
if ( m.installName.length () > 0 ) if ( m.installName.length () > 0 )
{ {
const Module& aliasedModule = backend->GetAliasedModuleOrModule ( m );
string sourceFilename = MingwModuleHandler::PassThruCacheDirectory ( string sourceFilename = MingwModuleHandler::PassThruCacheDirectory (
NormalizeFilename ( m.GetPath () ), NormalizeFilename ( aliasedModule.GetPath () ),
backend->outputDirectory ); backend->outputDirectory );
OutputCopyCommand ( sourceFilename, OutputCopyCommand ( sourceFilename,
m.installName, m.installName,
livecdDirectory + SSEP + reactosDirectory + SSEP + m.installBase ); livecdDirectory + SSEP + reactosDirectory + SSEP + m.installBase );
} }
} }
} }
@ -3057,6 +3061,7 @@ MingwRpcServerModuleHandler::Process ()
GenerateRules (); GenerateRules ();
} }
MingwRpcClientModuleHandler::MingwRpcClientModuleHandler ( MingwRpcClientModuleHandler::MingwRpcClientModuleHandler (
const Module& module_ ) const Module& module_ )
@ -3069,3 +3074,16 @@ MingwRpcClientModuleHandler::Process ()
{ {
GenerateRules (); GenerateRules ();
} }
MingwAliasModuleHandler::MingwAliasModuleHandler (
const Module& module_ )
: MingwModuleHandler ( module_ )
{
}
void
MingwAliasModuleHandler::Process ()
{
}

View file

@ -442,4 +442,12 @@ public:
virtual void Process (); virtual void Process ();
}; };
class MingwAliasModuleHandler : public MingwModuleHandler
{
public:
MingwAliasModuleHandler ( const Module& module );
virtual HostType DefaultHost() { return HostFalse; }
virtual void Process ();
};
#endif /* MINGW_MODULEHANDLER_H */ #endif /* MINGW_MODULEHANDLER_H */

View file

@ -23,8 +23,8 @@
using std::string; using std::string;
Bootstrap::Bootstrap ( const Project& project_, Bootstrap::Bootstrap ( const Project& project_,
const Module* module_, const Module* module_,
const XMLElement& bootstrapNode ) const XMLElement& bootstrapNode )
: project(project_), : project(project_),
module(module_), module(module_),
node(bootstrapNode) node(bootstrapNode)
@ -60,6 +60,7 @@ Bootstrap::IsSupportedModuleType ( ModuleType type )
case Test: case Test:
case RpcServer: case RpcServer:
case RpcClient: case RpcClient:
case Alias:
return false; return false;
} }
throw InvalidOperationException ( __FILE__, throw InvalidOperationException ( __FILE__,

View file

@ -282,6 +282,12 @@ Module::Module ( const Project& project,
enableWarnings = att->value == "true"; enableWarnings = att->value == "true";
else else
enableWarnings = false; enableWarnings = false;
att = moduleNode.GetAttribute ( "aliasof", false );
if ( type == Alias && att != NULL )
aliasedModuleName = att->value;
else
aliasedModuleName = "";
} }
Module::~Module () Module::~Module ()
@ -304,6 +310,22 @@ Module::~Module ()
void void
Module::ProcessXML() Module::ProcessXML()
{ {
if ( type == Alias )
{
if ( aliasedModuleName == name )
throw InvalidBuildFileException (
node.location,
"module '%s' cannot link against itself",
name.c_str() );
const Module* m = project.LocateModule ( aliasedModuleName );
if ( !m )
throw InvalidBuildFileException (
node.location,
"module '%s' trying to alias non-existant module '%s'",
name.c_str(),
aliasedModuleName.c_str() );
}
size_t i; size_t i;
for ( i = 0; i < node.subElements.size(); i++ ) for ( i = 0; i < node.subElements.size(); i++ )
ProcessXMLSubElement ( *node.subElements[i], path ); ProcessXMLSubElement ( *node.subElements[i], path );
@ -543,6 +565,8 @@ Module::GetModuleType ( const string& location, const XMLAttribute& attribute )
return RpcServer; return RpcServer;
if ( attribute.value == "rpcclient" ) if ( attribute.value == "rpcclient" )
return RpcClient; return RpcClient;
if ( attribute.value == "alias" )
return Alias;
throw InvalidAttributeValueException ( location, throw InvalidAttributeValueException ( location,
attribute.name, attribute.name,
attribute.value ); attribute.value );
@ -582,6 +606,8 @@ Module::GetDefaultModuleExtension () const
return ".o"; return ".o";
case RpcClient: case RpcClient:
return ".o"; return ".o";
case Alias:
return "";
} }
throw InvalidOperationException ( __FILE__, throw InvalidOperationException ( __FILE__,
__LINE__ ); __LINE__ );
@ -618,6 +644,7 @@ Module::GetDefaultModuleEntrypoint () const
case LiveIso: case LiveIso:
case RpcServer: case RpcServer:
case RpcClient: case RpcClient:
case Alias:
return ""; return "";
} }
throw InvalidOperationException ( __FILE__, throw InvalidOperationException ( __FILE__,
@ -652,6 +679,7 @@ Module::GetDefaultModuleBaseaddress () const
case LiveIso: case LiveIso:
case RpcServer: case RpcServer:
case RpcClient: case RpcClient:
case Alias:
return ""; return "";
} }
throw InvalidOperationException ( __FILE__, throw InvalidOperationException ( __FILE__,
@ -688,6 +716,7 @@ Module::IsDLL () const
case LiveIso: case LiveIso:
case RpcServer: case RpcServer:
case RpcClient: case RpcClient:
case Alias:
return false; return false;
} }
throw InvalidOperationException ( __FILE__, throw InvalidOperationException ( __FILE__,
@ -718,6 +747,7 @@ Module::GenerateInOutputTree () const
case ObjectLibrary: case ObjectLibrary:
case RpcServer: case RpcServer:
case RpcClient: case RpcClient:
case Alias:
return false; return false;
} }
throw InvalidOperationException ( __FILE__, throw InvalidOperationException ( __FILE__,

View file

@ -193,7 +193,8 @@ enum ModuleType
LiveIso = 14, LiveIso = 14,
Test = 15, Test = 15,
RpcServer = 16, RpcServer = 16,
RpcClient = 17 RpcClient = 17,
Alias = 18
}; };
enum HostType enum HostType
@ -230,6 +231,7 @@ public:
HostType host; HostType host;
std::string installBase; std::string installBase;
std::string installName; std::string installName;
std::string aliasedModuleName;
bool useWRC; bool useWRC;
bool enableWarnings; bool enableWarnings;
bool enabled; bool enabled;
@ -737,6 +739,7 @@ private:
std::string StripSymbol ( std::string symbol ); std::string StripSymbol ( std::string symbol );
}; };
extern std::string extern std::string
FixSeparator ( const std::string& s ); FixSeparator ( const std::string& s );

View file

@ -107,7 +107,7 @@ Module element
There can be zero or more modules per xml build file. There can be zero or more modules per xml build file.
Syntax: Syntax:
<module if="${MP}" ifnot="${MP}" name="msvcrt" type="win32dll" extension=".dll" entrypoint="_DllMain@12" baseaddress="0x70000000" mangledsymbols="true" installbase="system32" installname="msvcrt.dll" usewrc="false" warnings="true"> <module if="${MP}" ifnot="${MP}" name="msvcrt" type="win32dll" extension=".dll" entrypoint="_DllMain@12" baseaddress="0x70000000" mangledsymbols="true" installbase="system32" installname="msvcrt.dll" usewrc="false" warnings="true" aliasof="module1">
... ...
</module> </module>
@ -124,7 +124,7 @@ Attributes:
installname - Name of generated file in the installation directory. This attribute is optional, but if not specified, the generated file is not copied to the installation directory. installname - Name of generated file in the installation directory. This attribute is optional, but if not specified, the generated file is not copied to the installation directory.
usewrc - Use WRC to compile resources if true. If false, windres is used. This attribute is optional. If not specified, WRC will be used. usewrc - Use WRC to compile resources if true. If false, windres is used. This attribute is optional. If not specified, WRC will be used.
warnings - Error out if false and at least one warning is emitted during building of this module. This attribute is optional. If not specified, it is assumed to be false. warnings - Error out if false and at least one warning is emitted during building of this module. This attribute is optional. If not specified, it is assumed to be false.
aliasof - Name of module that is aliased.
Value: Value:
None. None.
@ -151,6 +151,7 @@ The module type determines the actions that is to be carried out to process the
test - Builds a testsuite. Default extension is .exe. Default entrypoint is _mainCRTStartup. The baseaddress module attribute is not applicable for this module type. test - Builds a testsuite. Default extension is .exe. Default entrypoint is _mainCRTStartup. The baseaddress module attribute is not applicable for this module type.
rpcserver - Generates and builds server code for an RPC interface. Default extension is .o. The entrypoint, baseaddress, and mangledsymbols module attributes are not applicable for this module type. rpcserver - Generates and builds server code for an RPC interface. Default extension is .o. The entrypoint, baseaddress, and mangledsymbols module attributes are not applicable for this module type.
rpcclient - Generates and builds client code for an RPC interface. Default extension is .o. The entrypoint, baseaddress, and mangledsymbols module attributes are not applicable for this module type. rpcclient - Generates and builds client code for an RPC interface. Default extension is .o. The entrypoint, baseaddress, and mangledsymbols module attributes are not applicable for this module type.
alias - Module is an alias for another module. This module type is the only module type for which the aliasof attribute is applicable. Only the module install functionality is aliased.
Bootstrap element Bootstrap element