Anonymous avatar Anonymous committed f9d0707

CWS-TOOLING: integrate CWS ause107
2009-09-23 17:21:07 +0200 hjs r276406 : #i105312# remove code dependency on perl

Comments (0)

Files changed (6)

soldep/bootstrp/makefile.mk

 
 # --- Settings -----------------------------------------------------
 
-.INCLUDE :  $(PRJ)$/util$/perl.mk
+#.INCLUDE :  $(PRJ)$/util$/perl.mk
 .INCLUDE :  settings.mk
 
 # fixme, code is not yet 64 bit clean
           $(SLO)$/appdef.obj \
  		  $(SLO)$/hashtbl.obj		\
 		  $(SLO)$/prj.obj \
-          $(SLO)$/XmlBuildList.obj
+
+		  
+#          $(SLO)$/XmlBuildList.obj
 
 
 SHL1TARGET	=$(TARGET)$(DLLPOSTFIX)

soldep/bootstrp/prj.cxx

 #endif
 #endif
 
-static const char * XML_ALL  =	"all";
+//static const char * XML_ALL  =	"all";
 
 //
 //	class SimpleConfig
 		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);
 		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();
 	// 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 );
 
 	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();
 }
 	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 unterst�tzt
-					// mehr geht wegen der Struktur zur Zeit nicht!
-					// lese sie trotzdem kommasepariert ein, wenn n�tig
-					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 l�schen
-								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 unterst�tzt
+//					// mehr geht wegen der Struktur zur Zeit nicht!
+//					// lese sie trotzdem kommasepariert ein, wenn n�tig
+//					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 l�schen
+//								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 ) {
 		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 );
 		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();

soldep/inc/XmlBuildListDef.hxx

 };
 
 #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
 

soldep/inc/soldep/prj.hxx

     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 );

soldep/source/makefile.mk

 
 
 # --- Settings -----------------------------------------------------
-.INCLUDE :  $(PRJ)$/util$/perl.mk
+#.INCLUDE :  $(PRJ)$/util$/perl.mk
 .INCLUDE :  settings.mk
 
 # fixme, code is not yet 64 bit clean

soldep/source/soldep.cxx

 #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* );
 				: Depper( pBaseWindow ),
                 mbBServer(FALSE),
                 mpTravellerList( NULL ),
-				mbIsHide( FALSE ),
-				mpXmlBuildList (NULL)
+				mbIsHide( FALSE )
+//				,
+//				mpXmlBuildList (NULL)
 {
 	/*
 	ByteString sModulPath ("."); // wo soll das Perlmodul stehen???
 	delete mpSolIdMapper;
 	delete mpStarWriter;
 	delete mpStandLst;
-	if (mpXmlBuildList)
-		delete mpXmlBuildList;
+//	if (mpXmlBuildList)
+//		delete mpXmlBuildList;
 }
 
 /*****************************************************************************/
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.