diff options
author | Release Engineers <releng@openoffice.org> | 2009-09-28 13:09:15 +0000 |
---|---|---|
committer | Release Engineers <releng@openoffice.org> | 2009-09-28 13:09:15 +0000 |
commit | 0eb8dbf1ebae18156b32ebe81886ca79144e2191 (patch) | |
tree | 4df09035f2f3477e417f6da7db421a7a368dc279 | |
parent | ecb5b1b120f78cd767aabac91e08c45c5e582565 (diff) |
CWS-TOOLING: integrate CWS ause107
2009-09-23 17:21:07 +0200 hjs r276406 : #i105312# remove code dependency on perl
-rw-r--r-- | soldep/bootstrp/makefile.mk | 6 | ||||
-rw-r--r-- | soldep/bootstrp/prj.cxx | 370 | ||||
-rwxr-xr-x | soldep/inc/XmlBuildListDef.hxx | 8 | ||||
-rw-r--r-- | soldep/inc/soldep/prj.hxx | 2 | ||||
-rw-r--r-- | soldep/source/makefile.mk | 2 | ||||
-rw-r--r-- | soldep/source/soldep.cxx | 11 |
6 files changed, 202 insertions, 197 deletions
diff --git a/soldep/bootstrp/makefile.mk b/soldep/bootstrp/makefile.mk index 48a6b244201f..f65a2ff88836 100644 --- a/soldep/bootstrp/makefile.mk +++ b/soldep/bootstrp/makefile.mk @@ -38,7 +38,7 @@ ENABLE_EXCEPTIONS=true # --- Settings ----------------------------------------------------- -.INCLUDE : $(PRJ)$/util$/perl.mk +#.INCLUDE : $(PRJ)$/util$/perl.mk .INCLUDE : settings.mk # fixme, code is not yet 64 bit clean @@ -60,7 +60,9 @@ SLOFILES=\ $(SLO)$/appdef.obj \ $(SLO)$/hashtbl.obj \ $(SLO)$/prj.obj \ - $(SLO)$/XmlBuildList.obj + + +# $(SLO)$/XmlBuildList.obj SHL1TARGET =$(TARGET)$(DLLPOSTFIX) diff --git a/soldep/bootstrp/prj.cxx b/soldep/bootstrp/prj.cxx index c6a0fedd12b4..5f5f7f2db43a 100644 --- a/soldep/bootstrp/prj.cxx +++ b/soldep/bootstrp/prj.cxx @@ -74,7 +74,7 @@ #endif #endif -static const char * XML_ALL = "all"; +//static const char * XML_ALL = "all"; // // class SimpleConfig @@ -1393,14 +1393,14 @@ void Star::Read( String &rFileName ) ByteString sFileName_l(ssFileName, RTL_TEXTENCODING_ASCII_US); StarFile *pFile = new StarFile( ssFileName ); if ( pFile->Exists()) { - if (sFileName_l.Len() >= RTL_CONSTASCII_LENGTH(XML_EXT) && ssFileName.EqualsAscii(XML_EXT, sFileName_l.Len() - RTL_CONSTASCII_LENGTH(XML_EXT), RTL_CONSTASCII_LENGTH(XML_EXT))) - { - ReadXmlBuildList(sFileName_l); - } else { +// if (sFileName_l.Len() >= RTL_CONSTASCII_LENGTH(XML_EXT) && ssFileName.EqualsAscii(XML_EXT, sFileName_l.Len() - RTL_CONSTASCII_LENGTH(XML_EXT), RTL_CONSTASCII_LENGTH(XML_EXT))) +// { +// ReadXmlBuildList(sFileName_l); +// } else { SimpleConfig aSolarConfig( ssFileName ); while (( aString = aSolarConfig.GetNext()) != "" ) InsertToken (( char * ) aString.GetBuffer()); - } +// } } aMutex.acquire(); ReplaceFileEntry (&aLoadedFilesList, pFile); @@ -1460,14 +1460,14 @@ void Star::Read( SolarFileList *pSolarFiles ) StarFile *pFile = new StarFile( ssFileName ); if ( pFile->Exists()) { - if (sFileName_l.Len() >= RTL_CONSTASCII_LENGTH(XML_EXT) && ssFileName.EqualsAscii(XML_EXT, sFileName_l.Len() - RTL_CONSTASCII_LENGTH(XML_EXT), RTL_CONSTASCII_LENGTH(XML_EXT))) - { - ReadXmlBuildList(sFileName_l); - } else { +// if (sFileName_l.Len() >= RTL_CONSTASCII_LENGTH(XML_EXT) && ssFileName.EqualsAscii(XML_EXT, sFileName_l.Len() - RTL_CONSTASCII_LENGTH(XML_EXT), RTL_CONSTASCII_LENGTH(XML_EXT))) +// { +// ReadXmlBuildList(sFileName_l); +// } else { SimpleConfig aSolarConfig( ssFileName ); while (( aString = aSolarConfig.GetNext()) != "" ) InsertToken (( char * ) aString.GetBuffer()); - } +// } DirEntry aEntry( pFile->GetName() ); DirEntry aEntryPrj = aEntry.GetPath().GetPath(); @@ -1500,7 +1500,7 @@ String Star::CreateFileName( String& rProject, String& rSourceRoot ) // this method is used to find solarlist parts of nabours (other projects) String sPrjDir( String::CreateFromAscii( "prj" )); String sBuildList( String::CreateFromAscii( "build.lst" )); - String sXmlBuildList( String::CreateFromAscii( "build.xlist" )); +// String sXmlBuildList( String::CreateFromAscii( "build.xlist" )); DirEntry aEntry( rSourceRoot ); aEntry += DirEntry( rProject ); @@ -1519,15 +1519,17 @@ String Star::CreateFileName( String& rProject, String& rSourceRoot ) aEntry += DirEntry( sPrjDir ); - DirEntry aPossibleEntry(aEntry); - aPossibleEntry += DirEntry( sXmlBuildList ); +// DirEntry aPossibleEntry(aEntry); +// aPossibleEntry += DirEntry( sXmlBuildList ); aEntry += DirEntry( sBuildList ); DirEntry& aActualEntry = aEntry; +/* if (aPossibleEntry.Exists()) { aActualEntry = aPossibleEntry; - } else if ( !aActualEntry.Exists() && aDBNotFoundHdl.IsSet()) + } else */ + if ( !aActualEntry.Exists() && aDBNotFoundHdl.IsSet()) aDBNotFoundHdl.Call( &rProject ); return aActualEntry.GetFull(); } @@ -1985,163 +1987,163 @@ void Star::SetCurrentDeps (SByteStringList* pDepList) Expand_Impl(); } -/*****************************************************************************/ -void Star::ReadXmlBuildList(const ByteString& sBuildLstPath) { -/*****************************************************************************/ - if (mpXmlBuildList) { - Prj* pPrj = NULL; - - try { - mpXmlBuildList->loadXMLFile(sBuildLstPath); - } - catch (XmlBuildListException) { - DirEntry aDirEntry (sBuildLstPath); - String ssPrjName = aDirEntry.GetPath().GetPath().GetBase(); - ByteString sPrjName = ByteString(ssPrjName, RTL_TEXTENCODING_ASCII_US); - pPrj = GetPrj( sPrjName ); - if (pPrj) - { - //remove old Project - RemovePrj (pPrj); - } - return; - } - - try { - ByteString sProjectName = mpXmlBuildList->getModuleName(); - pPrj = GetPrj( sProjectName ); - if (pPrj) - { - //remove old Project - RemovePrj (pPrj); - } - - // insert new Project - pPrj = new Prj ( sProjectName ); - pPrj->SetPreFix( sProjectName ); // use ProjectName as Prefix - Insert(pPrj,LIST_APPEND); - - // get global dependencies - FullByteStringListWrapper aProducts = mpXmlBuildList->getProducts(); - ByteString aDepType = ByteString(DEP_MD_ALWAYS_STR); - if (mpXmlBuildList->hasModuleDepType(aProducts, aDepType)) - pPrj->HasHardDependencies( TRUE ); - - aDepType = ByteString(DEP_MD_FORCE_STR); - if (mpXmlBuildList->hasModuleDepType(aProducts, aDepType)) - { - pPrj->HasHardDependencies( TRUE ); - pPrj->HasFixedDependencies( TRUE ); - } - - // modul dependencies - ByteString sModulDepType = ByteString(); - FullByteStringListWrapper aModulDeps = mpXmlBuildList->getModuleDependencies(aProducts, sModulDepType); - ByteString * pModulDep = aModulDeps.First(); - while (pModulDep) - { - FullByteStringListWrapper aModulProducts = mpXmlBuildList->getModuleProducts(*pModulDep); - ByteString *pModulePoduct = aModulProducts.First(); - while (pModulePoduct) - { - if (*pModulePoduct == XML_ALL) - pPrj->AddDependencies( *pModulDep ); - else - pPrj->AddDependencies( *pModulDep, *pModulePoduct); - - pModulePoduct = aModulProducts.Next(); - } - pModulDep = aModulDeps.Next(); - } - - // job dirs - ByteString sJobType = ByteString(); - ByteString sJobPlatforms = ByteString(); - FullByteStringListWrapper aJobDirs = mpXmlBuildList->getJobDirectories(sJobType, sJobPlatforms); // all dirs - ByteString* pJobDir = aJobDirs.First(); - while (pJobDir) - { - FullByteStringListWrapper aJobPlatforms = mpXmlBuildList->getJobPlatforms (*pJobDir); - ByteString* pJobPlatform = aJobPlatforms.First(); - while (pJobPlatform) - { - ByteString sJobRestriction = ByteString(); - FullByteStringListWrapper aJobReq = mpXmlBuildList->getJobBuildReqs (*pJobDir, *pJobPlatform); - // nur ein Req pro Platform wird zur Zeit untersttzt - // mehr geht wegen der Struktur zur Zeit nicht! - // lese sie trotzdem kommasepariert ein, wenn ntig - if (aJobReq.Count() > 0) - { - ByteString* pRestriction = aJobReq.First(); - sJobRestriction = ByteString (*pRestriction); - pRestriction = aJobReq.Next(); - while (pRestriction) - { - sJobRestriction += ByteString (","); - sJobRestriction += ByteString (*pRestriction); - pRestriction = aJobReq.Next(); - } - } - - FullByteStringListWrapper aJobTypes = mpXmlBuildList->getJobTypes (*pJobDir); - ByteString * pJobType = aJobTypes.First(); - while(pJobType) - { - FullByteStringListWrapper aDirDependencies = mpXmlBuildList->getDirDependencies(*pJobDir, *pJobType, *pJobPlatform); - SByteStringList *pDepList = NULL; - if (aDirDependencies.Count() > 0) - { - pDepList = new SByteStringList; - ByteString* pDirDep = aDirDependencies.First(); - while (pDirDep) - { - ByteString sFullDir = sProjectName; - sFullDir += *pDirDep; - sFullDir.SearchAndReplaceAll('/', '\\'); - *pDirDep = sFullDir; - pDepList->PutString(pDirDep); // String wird bergeben - aDirDependencies.Remove(); // Zeiger aus alter Liste lschen - pDirDep = aDirDependencies.First(); - } - } - // insert CommandData - CommandData * pCmdData = new CommandData; - ByteString sRequiredPath = sProjectName; - sRequiredPath += *pJobDir; - sRequiredPath.SearchAndReplaceAll('/', '\\'); - pCmdData->SetPath(sRequiredPath); - pCmdData->SetCommandType( GetJobType(*pJobType) ); - pCmdData->SetCommandPara( ByteString() ); - pCmdData->SetOSType( GetOSType(*pJobPlatform) ); - ByteString sLogFileName = sProjectName; - sLogFileName += ByteString::CreateFromInt64( pPrj->Count() ); - pCmdData->SetLogFile( sLogFileName ); - pCmdData->SetClientRestriction( sJobRestriction ); - if ( pDepList ) - pCmdData->SetDependencies( pDepList ); - - pPrj->Insert ( pCmdData, LIST_APPEND ); - - pJobType = aJobTypes.Next(); - } - - pJobPlatform = aJobPlatforms.Next(); - } - - pJobDir = aJobDirs.Next(); - } - pPrj->ExtractDependencies(); - } - catch (XmlBuildListException) { - if (pPrj) - { - RemovePrj (pPrj); - delete pPrj; - } - - } - } -} +///*****************************************************************************/ +//void Star::ReadXmlBuildList(const ByteString& sBuildLstPath) { +///*****************************************************************************/ +// if (mpXmlBuildList) { +// Prj* pPrj = NULL; +// +// try { +// mpXmlBuildList->loadXMLFile(sBuildLstPath); +// } +// catch (XmlBuildListException) { +// DirEntry aDirEntry (sBuildLstPath); +// String ssPrjName = aDirEntry.GetPath().GetPath().GetBase(); +// ByteString sPrjName = ByteString(ssPrjName, RTL_TEXTENCODING_ASCII_US); +// pPrj = GetPrj( sPrjName ); +// if (pPrj) +// { +// //remove old Project +// RemovePrj (pPrj); +// } +// return; +// } +// +// try { +// ByteString sProjectName = mpXmlBuildList->getModuleName(); +// pPrj = GetPrj( sProjectName ); +// if (pPrj) +// { +// //remove old Project +// RemovePrj (pPrj); +// } +// +// // insert new Project +// pPrj = new Prj ( sProjectName ); +// pPrj->SetPreFix( sProjectName ); // use ProjectName as Prefix +// Insert(pPrj,LIST_APPEND); +// +// // get global dependencies +// FullByteStringListWrapper aProducts = mpXmlBuildList->getProducts(); +// ByteString aDepType = ByteString(DEP_MD_ALWAYS_STR); +// if (mpXmlBuildList->hasModuleDepType(aProducts, aDepType)) +// pPrj->HasHardDependencies( TRUE ); +// +// aDepType = ByteString(DEP_MD_FORCE_STR); +// if (mpXmlBuildList->hasModuleDepType(aProducts, aDepType)) +// { +// pPrj->HasHardDependencies( TRUE ); +// pPrj->HasFixedDependencies( TRUE ); +// } +// +// // modul dependencies +// ByteString sModulDepType = ByteString(); +// FullByteStringListWrapper aModulDeps = mpXmlBuildList->getModuleDependencies(aProducts, sModulDepType); +// ByteString * pModulDep = aModulDeps.First(); +// while (pModulDep) +// { +// FullByteStringListWrapper aModulProducts = mpXmlBuildList->getModuleProducts(*pModulDep); +// ByteString *pModulePoduct = aModulProducts.First(); +// while (pModulePoduct) +// { +// if (*pModulePoduct == XML_ALL) +// pPrj->AddDependencies( *pModulDep ); +// else +// pPrj->AddDependencies( *pModulDep, *pModulePoduct); +// +// pModulePoduct = aModulProducts.Next(); +// } +// pModulDep = aModulDeps.Next(); +// } +// +// // job dirs +// ByteString sJobType = ByteString(); +// ByteString sJobPlatforms = ByteString(); +// FullByteStringListWrapper aJobDirs = mpXmlBuildList->getJobDirectories(sJobType, sJobPlatforms); // all dirs +// ByteString* pJobDir = aJobDirs.First(); +// while (pJobDir) +// { +// FullByteStringListWrapper aJobPlatforms = mpXmlBuildList->getJobPlatforms (*pJobDir); +// ByteString* pJobPlatform = aJobPlatforms.First(); +// while (pJobPlatform) +// { +// ByteString sJobRestriction = ByteString(); +// FullByteStringListWrapper aJobReq = mpXmlBuildList->getJobBuildReqs (*pJobDir, *pJobPlatform); +// // nur ein Req pro Platform wird zur Zeit untersttzt +// // mehr geht wegen der Struktur zur Zeit nicht! +// // lese sie trotzdem kommasepariert ein, wenn ntig +// if (aJobReq.Count() > 0) +// { +// ByteString* pRestriction = aJobReq.First(); +// sJobRestriction = ByteString (*pRestriction); +// pRestriction = aJobReq.Next(); +// while (pRestriction) +// { +// sJobRestriction += ByteString (","); +// sJobRestriction += ByteString (*pRestriction); +// pRestriction = aJobReq.Next(); +// } +// } +// +// FullByteStringListWrapper aJobTypes = mpXmlBuildList->getJobTypes (*pJobDir); +// ByteString * pJobType = aJobTypes.First(); +// while(pJobType) +// { +// FullByteStringListWrapper aDirDependencies = mpXmlBuildList->getDirDependencies(*pJobDir, *pJobType, *pJobPlatform); +// SByteStringList *pDepList = NULL; +// if (aDirDependencies.Count() > 0) +// { +// pDepList = new SByteStringList; +// ByteString* pDirDep = aDirDependencies.First(); +// while (pDirDep) +// { +// ByteString sFullDir = sProjectName; +// sFullDir += *pDirDep; +// sFullDir.SearchAndReplaceAll('/', '\\'); +// *pDirDep = sFullDir; +// pDepList->PutString(pDirDep); // String wird bergeben +// aDirDependencies.Remove(); // Zeiger aus alter Liste lschen +// pDirDep = aDirDependencies.First(); +// } +// } +// // insert CommandData +// CommandData * pCmdData = new CommandData; +// ByteString sRequiredPath = sProjectName; +// sRequiredPath += *pJobDir; +// sRequiredPath.SearchAndReplaceAll('/', '\\'); +// pCmdData->SetPath(sRequiredPath); +// pCmdData->SetCommandType( GetJobType(*pJobType) ); +// pCmdData->SetCommandPara( ByteString() ); +// pCmdData->SetOSType( GetOSType(*pJobPlatform) ); +// ByteString sLogFileName = sProjectName; +// sLogFileName += ByteString::CreateFromInt64( pPrj->Count() ); +// pCmdData->SetLogFile( sLogFileName ); +// pCmdData->SetClientRestriction( sJobRestriction ); +// if ( pDepList ) +// pCmdData->SetDependencies( pDepList ); +// +// pPrj->Insert ( pCmdData, LIST_APPEND ); +// +// pJobType = aJobTypes.Next(); +// } +// +// pJobPlatform = aJobPlatforms.Next(); +// } +// +// pJobDir = aJobDirs.Next(); +// } +// pPrj->ExtractDependencies(); +// } +// catch (XmlBuildListException) { +// if (pPrj) +// { +// RemovePrj (pPrj); +// delete pPrj; +// } +// +// } +// } +//} /*****************************************************************************/ int Star::GetOSType ( ByteString& aWhatOS ) { @@ -2445,15 +2447,15 @@ USHORT StarWriter::Read( String aFileName, BOOL bReadComments, USHORT nMode ) ByteString sFileName_l(ssFileName, RTL_TEXTENCODING_ASCII_US); StarFile *pFile = new StarFile( ssFileName ); if ( pFile->Exists()) { - if (sFileName_l.Len() >= RTL_CONSTASCII_LENGTH(XML_EXT) && ssFileName.EqualsAscii(XML_EXT, sFileName_l.Len() - RTL_CONSTASCII_LENGTH(XML_EXT), RTL_CONSTASCII_LENGTH(XML_EXT))) - { - ReadXmlBuildList(sFileName_l); - } else { +// if (sFileName_l.Len() >= RTL_CONSTASCII_LENGTH(XML_EXT) && ssFileName.EqualsAscii(XML_EXT, sFileName_l.Len() - RTL_CONSTASCII_LENGTH(XML_EXT), RTL_CONSTASCII_LENGTH(XML_EXT))) +// { +// ReadXmlBuildList(sFileName_l); +// } else { SimpleConfig aSolarConfig( ssFileName ); while (( aString = aSolarConfig.GetCleanedNextLine( bReadComments )) != "" ) InsertTokenLine ( aString ); } - } +// } aMutex.acquire(); aLoadedFilesList.Insert( pFile, LIST_APPEND ); @@ -2481,16 +2483,16 @@ USHORT StarWriter::Read( SolarFileList *pSolarFiles, BOOL bReadComments ) ByteString sFileName_l(ssFileName, RTL_TEXTENCODING_ASCII_US); StarFile *pFile = new StarFile( ssFileName); if ( pFile->Exists()) { - if (sFileName_l.Len() >= RTL_CONSTASCII_LENGTH(XML_EXT) && ssFileName.EqualsAscii(XML_EXT, sFileName_l.Len() - RTL_CONSTASCII_LENGTH(XML_EXT), RTL_CONSTASCII_LENGTH(XML_EXT))) - { - ReadXmlBuildList(sFileName_l); - } - else - { +// if (sFileName_l.Len() >= RTL_CONSTASCII_LENGTH(XML_EXT) && ssFileName.EqualsAscii(XML_EXT, sFileName_l.Len() - RTL_CONSTASCII_LENGTH(XML_EXT), RTL_CONSTASCII_LENGTH(XML_EXT))) +// { +// ReadXmlBuildList(sFileName_l); +// } +// else +// { SimpleConfig aSolarConfig( ssFileName ); while (( aString = aSolarConfig.GetCleanedNextLine( bReadComments )) != "" ) InsertTokenLine ( aString ); - } +// } } aMutex.acquire(); diff --git a/soldep/inc/XmlBuildListDef.hxx b/soldep/inc/XmlBuildListDef.hxx index 2ea62679eb11..7f68059e18f5 100755 --- a/soldep/inc/XmlBuildListDef.hxx +++ b/soldep/inc/XmlBuildListDef.hxx @@ -39,11 +39,11 @@ enum DepTypes }; #define DEP_MD_SIMPLE 1; -#define DEP_MD_ALWAYS 2; -#define DEP_MD_FORCE 4; +//#define DEP_MD_ALWAYS 2; +//#define DEP_MD_FORCE 4; -static const char * DEP_MD_ALWAYS_STR = "md-always"; -static const char * DEP_MD_FORCE_STR = "md-force"; +//static const char * DEP_MD_ALWAYS_STR = "md-always"; +//static const char * DEP_MD_FORCE_STR = "md-force"; #endif diff --git a/soldep/inc/soldep/prj.hxx b/soldep/inc/soldep/prj.hxx index df6833eb8bcd..a2765c1c6cf4 100644 --- a/soldep/inc/soldep/prj.hxx +++ b/soldep/inc/soldep/prj.hxx @@ -403,7 +403,7 @@ public: ByteString GetName(){ return aStarName; }; // dummy function of VG void Read( String &rFileName ); void Read( SolarFileList *pSOlarFiles ); - void ReadXmlBuildList(const ByteString& sBuildLstPath); +// void ReadXmlBuildList(const ByteString& sBuildLstPath); BOOL HasProject( ByteString aProjectName ); diff --git a/soldep/source/makefile.mk b/soldep/source/makefile.mk index 63f6d422b6f5..7ababf509010 100644 --- a/soldep/source/makefile.mk +++ b/soldep/source/makefile.mk @@ -36,7 +36,7 @@ TARGET=soldep # --- Settings ----------------------------------------------------- -.INCLUDE : $(PRJ)$/util$/perl.mk +#.INCLUDE : $(PRJ)$/util$/perl.mk .INCLUDE : settings.mk # fixme, code is not yet 64 bit clean diff --git a/soldep/source/soldep.cxx b/soldep/source/soldep.cxx index 30e19985a9cf..aa9608c0363d 100644 --- a/soldep/source/soldep.cxx +++ b/soldep/source/soldep.cxx @@ -43,7 +43,7 @@ #include <soldep/depper.hxx> #include <soldep/soldep.hxx> #include <soldep/soldlg.hxx> -#include <soldep/XmlBuildList.hxx> +//#include <soldep/XmlBuildList.hxx> #include "dtsodcmp.hrc" IMPLEMENT_HASHTABLE_OWNER( SolIdMapper, ByteString, ULONG* ); @@ -66,8 +66,9 @@ SolDep::SolDep( Window* pBaseWindow ) : Depper( pBaseWindow ), mbBServer(FALSE), mpTravellerList( NULL ), - mbIsHide( FALSE ), - mpXmlBuildList (NULL) + mbIsHide( FALSE ) +// , +// mpXmlBuildList (NULL) { /* ByteString sModulPath ("."); // wo soll das Perlmodul stehen??? @@ -103,8 +104,8 @@ SolDep::~SolDep() delete mpSolIdMapper; delete mpStarWriter; delete mpStandLst; - if (mpXmlBuildList) - delete mpXmlBuildList; +// if (mpXmlBuildList) +// delete mpXmlBuildList; } /*****************************************************************************/ |