mirror of
https://github.com/reactos/reactos.git
synced 2024-10-15 13:45:58 +00:00
Autogenerate syssetup.inf file in intermediate directory
svn path=/trunk/; revision=28118
This commit is contained in:
parent
cfda12103c
commit
10cc6c5d40
|
@ -14,7 +14,7 @@
|
||||||
<installfile base="inf">nettcpip.inf</installfile>
|
<installfile base="inf">nettcpip.inf</installfile>
|
||||||
<installfile base="inf">ports.inf</installfile>
|
<installfile base="inf">ports.inf</installfile>
|
||||||
<installfile base="inf">scsi.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">usbport.inf</installfile>
|
||||||
<installfile base="inf">usbstor.inf</installfile>
|
<installfile base="inf">usbstor.inf</installfile>
|
||||||
<installfile base="inf">xboxdisp.inf</installfile>
|
<installfile base="inf">xboxdisp.inf</installfile>
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
using std::string;
|
using std::string;
|
||||||
|
|
||||||
InstallFile::InstallFile ( const Project& project_,
|
InstallFile::InstallFile ( const Project& project_,
|
||||||
const XMLElement& installfileNode,
|
const XMLElement& installfileNode,
|
||||||
const string& path )
|
const string& path )
|
||||||
: project ( project_ ),
|
: project ( project_ ),
|
||||||
node ( installfileNode )
|
node ( installfileNode )
|
||||||
{
|
{
|
||||||
|
@ -40,7 +40,24 @@ InstallFile::InstallFile ( const Project& project_,
|
||||||
else
|
else
|
||||||
newname = node.value;
|
newname = node.value;
|
||||||
name = 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 ()
|
InstallFile::~InstallFile ()
|
||||||
|
|
|
@ -39,7 +39,7 @@ SysSetupGenerator::Generate ()
|
||||||
unsigned long errorLine;
|
unsigned long errorLine;
|
||||||
|
|
||||||
string syssetupTemplate = "media" + sSep + "inf" + sSep + "syssetup.inf.tpl";
|
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 ) )
|
if ( 0 != InfHostOpenFile ( &inf, syssetupTemplate.c_str (), &errorLine ) )
|
||||||
throw new FileNotFoundException ( syssetupTemplate );
|
throw new FileNotFoundException ( syssetupTemplate );
|
||||||
|
|
Loading…
Reference in a new issue