Autogenerate syssetup.inf file in intermediate directory

svn path=/trunk/; revision=28118
This commit is contained in:
Hervé Poussineau 2007-08-03 09:41:42 +00:00
parent cfda12103c
commit 10cc6c5d40
3 changed files with 22 additions and 5 deletions

View file

@ -14,7 +14,7 @@
<installfile base="inf">nettcpip.inf</installfile>
<installfile base="inf">ports.inf</installfile>
<installfile base="inf">scsi.inf</installfile>
<installfile base="inf">syssetup.inf</installfile>
<installfile base="inf" root="intermediate">syssetup.inf</installfile>
<installfile base="inf">usbport.inf</installfile>
<installfile base="inf">usbstor.inf</installfile>
<installfile base="inf">xboxdisp.inf</installfile>

View file

@ -23,8 +23,8 @@
using std::string;
InstallFile::InstallFile ( const Project& project_,
const XMLElement& installfileNode,
const string& path )
const XMLElement& installfileNode,
const string& path )
: project ( project_ ),
node ( installfileNode )
{
@ -40,7 +40,24 @@ InstallFile::InstallFile ( const Project& project_,
else
newname = node.value;
name = node.value;
this->path = path;
att = node.GetAttribute ( "root", false );
if ( att != NULL)
{
if ( att->value == "intermediate" )
this->path = Environment::GetIntermediatePath () + sSep + path;
else if ( att->value == "output" )
this->path = Environment::GetOutputPath () + sSep + path;
else
{
throw InvalidAttributeValueException (
node.location,
"root",
att->value );
}
}
else
this->path = path;
}
InstallFile::~InstallFile ()

View file

@ -39,7 +39,7 @@ SysSetupGenerator::Generate ()
unsigned long errorLine;
string syssetupTemplate = "media" + sSep + "inf" + sSep + "syssetup.inf.tpl";
string syssetup = "media" + sSep + "inf" + sSep + "syssetup.inf";
string syssetup = Environment::GetIntermediatePath() + sSep + "media" + sSep + "inf" + sSep + "syssetup.inf";
if ( 0 != InfHostOpenFile ( &inf, syssetupTemplate.c_str (), &errorLine ) )
throw new FileNotFoundException ( syssetupTemplate );