private void InstallResultFiles(string sourceFilename, DateTime startTime) { if (m_Settings.InstallResult) { if (0 == repositoryControl1.CheckedRespositoryPaths.Count) { throw new WarningException( "You have enabled 'Copy files to Asset Repositories', but no \n" + "repositories are selected. You must check at least one repository\n" + "on the 'Repositories' tab to install conversion results."); } FileInfo sourceInfo = new FileInfo(sourceFilename); m_Log.WriteLine(" "); m_Log.WriteLine( "===[ Copying ]============================================="); m_Log.WriteLine( String.Format( ">>> From\t<{0}>", sourceInfo.Directory.FullName)); // Implicitly, this asks if we did a conversion pass, or are we just // installing from a recent conversion. if (startTime.Equals(DateTime.MaxValue)) { startTime = GetEarliestReasonableTimeForInstallableFiles(sourceFilename); } RepositoryInstaller installer = new RepositoryInstaller(sourceFilename, startTime, logPanel1.Log); installer.FilterFlags = (RepositoryInstaller.InstallFilterFlags)m_Settings.InstallFilter; installer.ConfirmInstallation = m_Settings.ConfirmInstall; installer.OverwritePolicy = (RepositoryInstaller.OverwritePolicyFlags)m_Settings.OverwritePolicy; foreach (string repository in repositoryControl1.CheckedRespositoryPaths) { m_Log.WriteLine( "===[ Copying ]============================================="); m_Log.WriteLine( String.Format(">>> To\t<{0}>", repository)); m_Log.WriteLine( "==========================================================="); installer.InstallTo(repository); } } }
private void InstallResultFiles( string sourceFilename, DateTime startTime ) { if( m_Settings.InstallResult ) { if( 0 == repositoryControl1.CheckedRespositoryPaths.Count ) { throw new WarningException( "You have enabled 'Copy files to Asset Repositories', but no \n" + "repositories are selected. You must check at least one repository\n" + "on the 'Repositories' tab to install conversion results." ); } FileInfo sourceInfo = new FileInfo( sourceFilename ); m_Log.WriteLine( " " ); m_Log.WriteLine( "===[ Copying ]=============================================" ); m_Log.WriteLine( String.Format( ">>> From\t<{0}>", sourceInfo.Directory.FullName ) ); // Implicitly, this asks if we did a conversion pass, or are we just // installing from a recent conversion. if( startTime.Equals( DateTime.MaxValue ) ) { startTime = GetEarliestReasonableTimeForInstallableFiles( sourceFilename ); } RepositoryInstaller installer = new RepositoryInstaller( sourceFilename, startTime, logPanel1.Log ); installer.FilterFlags = (RepositoryInstaller.InstallFilterFlags) m_Settings.InstallFilter; installer.ConfirmInstallation = m_Settings.ConfirmInstall; installer.OverwritePolicy = (RepositoryInstaller.OverwritePolicyFlags) m_Settings.OverwritePolicy; foreach( string repository in repositoryControl1.CheckedRespositoryPaths ) { m_Log.WriteLine( "===[ Copying ]=============================================" ); m_Log.WriteLine( String.Format( ">>> To\t<{0}>", repository ) ); m_Log.WriteLine( "===========================================================" ); installer.InstallTo( repository ); } } }