/// <summary> /// Construct an instance of this installer. The installer operates /// on a single DAE file. If you want to install from another DAE /// file, create another instance. /// /// This only installs files with a creation date after the earliest /// time specified by the argument. /// </summary> /// <param name="daeFile">the source DAE file</param> /// <param name="earliestTime">time the </param> /// <param name="log">log for reporting status; can be null</param> public RepositoryInstaller(string daeFile, DateTime earliestTime, ILog log) { m_DAEFile = daeFile; m_EarliestTime = earliestTime; m_LogWriter = new LogWriter(log); InstallationCandidate.Log = m_LogWriter; // These are the file types that can be produced; a particular // conversion run does not necessarilly produce all types. // TODO: It would be nice if these came from a config file. // TODO: Maybe make this a property that is set up by the client. m_ProductFiles.Add(".mesh", null); m_ProductFiles.Add(".material", null); m_ProductFiles.Add(".skeleton", null); m_ProductFiles.Add(".physics", null); // This associates the file type with a repository subdir // TODO: Same as above... m_RepositorySubdirectories.Add(".mesh", "Meshes"); m_RepositorySubdirectories.Add(".material", "Materials"); m_RepositorySubdirectories.Add(".skeleton", "Skeletons"); m_RepositorySubdirectories.Add(".physics", "Physics"); m_Candidates.Add("Meshes", new List <InstallationCandidate>()); m_Candidates.Add("Materials", new List <InstallationCandidate>()); m_Candidates.Add("Skeletons", new List <InstallationCandidate>()); m_Candidates.Add("Physics", new List <InstallationCandidate>()); m_Candidates.Add("Textures", new List <InstallationCandidate>()); m_TypeToFilterFlagMap.Add("Meshes", InstallFilterFlags.Mesh); m_TypeToFilterFlagMap.Add("Materials", InstallFilterFlags.Materials); m_TypeToFilterFlagMap.Add("Skeletons", InstallFilterFlags.Skeleton); m_TypeToFilterFlagMap.Add("Physics", InstallFilterFlags.Physics); m_TypeToFilterFlagMap.Add("Textures", InstallFilterFlags.Textures); FindConversionProductFiles(); FilterFlags = InstallFilterFlags.All; m_Finder = new TextureFinder(daeFile); //if( FindConversionProductFiles() ) //{ // FilterFlags = InstallFilterFlags.All; // m_Finder = new TextureFinder( daeFile ); //} }
/// <summary> /// Construct an instance of this installer. The installer operates /// on a single DAE file. If you want to install from another DAE /// file, create another instance. /// /// This only installs files with a creation date after the earliest /// time specified by the argument. /// </summary> /// <param name="daeFile">the source DAE file</param> /// <param name="earliestTime">time the </param> /// <param name="log">log for reporting status; can be null</param> public RepositoryInstaller( string daeFile, DateTime earliestTime, ILog log ) { m_DAEFile = daeFile; m_EarliestTime = earliestTime; m_LogWriter = new LogWriter( log ); InstallationCandidate.Log = m_LogWriter; // These are the file types that can be produced; a particular // conversion run does not necessarilly produce all types. // TODO: It would be nice if these came from a config file. // TODO: Maybe make this a property that is set up by the client. m_ProductFiles.Add( ".mesh", null ); m_ProductFiles.Add( ".material", null ); m_ProductFiles.Add( ".skeleton", null ); m_ProductFiles.Add( ".physics", null ); // This associates the file type with a repository subdir // TODO: Same as above... m_RepositorySubdirectories.Add( ".mesh", "Meshes" ); m_RepositorySubdirectories.Add( ".material", "Materials" ); m_RepositorySubdirectories.Add( ".skeleton", "Skeletons" ); m_RepositorySubdirectories.Add( ".physics", "Physics" ); m_Candidates.Add( "Meshes", new List<InstallationCandidate>() ); m_Candidates.Add( "Materials", new List<InstallationCandidate>() ); m_Candidates.Add( "Skeletons", new List<InstallationCandidate>() ); m_Candidates.Add( "Physics", new List<InstallationCandidate>() ); m_Candidates.Add( "Textures", new List<InstallationCandidate>() ); m_TypeToFilterFlagMap.Add( "Meshes", InstallFilterFlags.Mesh ); m_TypeToFilterFlagMap.Add( "Materials", InstallFilterFlags.Materials ); m_TypeToFilterFlagMap.Add( "Skeletons", InstallFilterFlags.Skeleton ); m_TypeToFilterFlagMap.Add( "Physics", InstallFilterFlags.Physics ); m_TypeToFilterFlagMap.Add( "Textures", InstallFilterFlags.Textures ); FindConversionProductFiles(); FilterFlags = InstallFilterFlags.All; m_Finder = new TextureFinder( daeFile ); //if( FindConversionProductFiles() ) //{ // FilterFlags = InstallFilterFlags.All; // m_Finder = new TextureFinder( daeFile ); //} }