mirror of
https://github.com/reactos/reactos.git
synced 2024-12-30 19:14:31 +00:00
Support modules with no base install directory
svn path=/branches/xmlbuildsystem/; revision=15308
This commit is contained in:
parent
93b4d98160
commit
dff44c9f17
3 changed files with 29 additions and 13 deletions
|
@ -241,9 +241,10 @@ MingwBackend::~MingwBackend()
|
|||
|
||||
string
|
||||
MingwBackend::AddDirectoryTarget ( const string& directory,
|
||||
Directory* directoryTree )
|
||||
Directory* directoryTree )
|
||||
{
|
||||
directoryTree->Add ( directory.c_str() );
|
||||
if ( directory.length () > 0)
|
||||
directoryTree->Add ( directory.c_str() );
|
||||
return directoryTree->name;
|
||||
}
|
||||
|
||||
|
@ -775,7 +776,11 @@ MingwBackend::GetModuleInstallTargetFiles (
|
|||
const Module& module = *ProjectNode.modules[i];
|
||||
if ( module.installName.length () > 0 )
|
||||
{
|
||||
string targetFilenameNoFixup = module.installBase + SSEP + module.installName;
|
||||
string targetFilenameNoFixup;
|
||||
if ( module.installBase.length () > 0 )
|
||||
targetFilenameNoFixup = module.installBase + SSEP + module.installName;
|
||||
else
|
||||
targetFilenameNoFixup = module.installName;
|
||||
string targetFilename = MingwModuleHandler::PassThruCacheDirectory (
|
||||
NormalizeFilename ( targetFilenameNoFixup ),
|
||||
installDirectory );
|
||||
|
@ -794,11 +799,16 @@ MingwBackend::GetInstallTargetFiles (
|
|||
|
||||
void
|
||||
MingwBackend::OutputInstallTarget ( const string& sourceFilename,
|
||||
const string& targetFilename,
|
||||
const string& targetDirectory )
|
||||
const string& targetFilename,
|
||||
const string& targetDirectory )
|
||||
{
|
||||
string fullTargetFilename;
|
||||
if ( targetDirectory.length () > 0)
|
||||
fullTargetFilename = targetDirectory + SSEP + targetFilename;
|
||||
else
|
||||
fullTargetFilename = targetFilename;
|
||||
string normalizedTargetFilename = MingwModuleHandler::PassThruCacheDirectory (
|
||||
NormalizeFilename ( targetDirectory + SSEP + targetFilename ),
|
||||
NormalizeFilename ( fullTargetFilename ),
|
||||
installDirectory );
|
||||
string normalizedTargetDirectory = MingwModuleHandler::PassThruCacheDirectory (
|
||||
NormalizeFilename ( targetDirectory ),
|
||||
|
@ -823,8 +833,8 @@ MingwBackend::OutputNonModuleInstallTargets ()
|
|||
{
|
||||
const InstallFile& installfile = *ProjectNode.installfiles[i];
|
||||
OutputInstallTarget ( installfile.GetPath (),
|
||||
installfile.newname,
|
||||
installfile.base );
|
||||
installfile.newname,
|
||||
installfile.base );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -110,7 +110,11 @@ MingwModuleHandler::PassThruCacheDirectory (
|
|||
/* This path already includes the generated files directory variable */
|
||||
return file;
|
||||
else
|
||||
{
|
||||
if ( file == "" )
|
||||
return generatedFilesDirectory;
|
||||
return generatedFilesDirectory + SSEP + file;
|
||||
}
|
||||
}
|
||||
|
||||
/*static*/ Directory*
|
||||
|
@ -2682,8 +2686,8 @@ MingwLiveIsoModuleHandler::CreateDirectory ( const string& directory )
|
|||
|
||||
void
|
||||
MingwLiveIsoModuleHandler::OutputCopyCommand ( const string& sourceFilename,
|
||||
const string& targetFilename,
|
||||
const string& targetDirectory )
|
||||
const string& targetFilename,
|
||||
const string& targetDirectory )
|
||||
{
|
||||
string normalizedTargetFilename = MingwModuleHandler::PassThruCacheDirectory (
|
||||
NormalizeFilename ( targetDirectory + SSEP + targetFilename ),
|
||||
|
@ -2698,7 +2702,7 @@ MingwLiveIsoModuleHandler::OutputCopyCommand ( const string& sourceFilename,
|
|||
|
||||
void
|
||||
MingwLiveIsoModuleHandler::OutputModuleCopyCommands ( string& livecdDirectory,
|
||||
string& reactosDirectory )
|
||||
string& reactosDirectory )
|
||||
{
|
||||
for ( size_t i = 0; i < module.project.modules.size (); i++ )
|
||||
{
|
||||
|
@ -2717,7 +2721,7 @@ MingwLiveIsoModuleHandler::OutputModuleCopyCommands ( string& livecdDirectory,
|
|||
|
||||
void
|
||||
MingwLiveIsoModuleHandler::OutputNonModuleCopyCommands ( string& livecdDirectory,
|
||||
string& reactosDirectory )
|
||||
string& reactosDirectory )
|
||||
{
|
||||
for ( size_t i = 0; i < module.project.installfiles.size (); i++ )
|
||||
{
|
||||
|
|
|
@ -73,7 +73,7 @@ GetDirectory ( const string& filename )
|
|||
{
|
||||
size_t index = filename.find_last_of ( CSEP );
|
||||
if ( index == string::npos )
|
||||
return filename;
|
||||
return "";
|
||||
else
|
||||
return filename.substr ( 0, index );
|
||||
}
|
||||
|
@ -81,6 +81,8 @@ GetDirectory ( const string& filename )
|
|||
string
|
||||
NormalizeFilename ( const string& filename )
|
||||
{
|
||||
if ( filename == "" )
|
||||
return "";
|
||||
Path path;
|
||||
string normalizedPath = path.Fixup ( filename, true );
|
||||
string relativeNormalizedPath = path.RelativeFromWorkingDirectory ( normalizedPath );
|
||||
|
|
Loading…
Reference in a new issue