private static string ConvertPath(string inPath, IProjectBuilder projectBuilder) { var date = DateTime.Now; string outPath = inPath; outPath = outPath.Replace("$IDENTIFIER", projectBuilder.ApplicationIdentifier); outPath = outPath.Replace("$NAME", GetProductName(projectBuilder)); outPath = outPath.Replace("$PLATFORM", ConvertBuildTargetToString(projectBuilder)); outPath = outPath.Replace("$VERSION_CODE_LONG", GetVersionCodeLong(projectBuilder)); outPath = outPath.Replace("$VERSION_CODE", projectBuilder.VersionCode.ToString()); outPath = outPath.Replace("$VERSION", projectBuilder.Version); outPath = outPath.Replace("$DATE_YEAR", date.Year.ToString()); outPath = outPath.Replace("$DATE_MONTH", date.Month.ToString()); outPath = outPath.Replace("$DATE_DAY", date.Day.ToString()); outPath = outPath.Replace("$DATE", date.ToString("yyyy-M-d")); outPath = outPath.Replace("$TIME_HOUR", date.ToString("HH")); outPath = outPath.Replace("$TIME_MINUTES", date.ToString("mm")); outPath = outPath.Replace("$TIME_SECONDS", date.ToString("ss")); outPath = outPath.Replace("$TIME", date.ToString("HH-mm-ss")); outPath = outPath.Replace("$EXECUTABLE", GetBuildTargetExecutable(projectBuilder)); return(outPath); }
/// <summary>Select a new build target to be active.</summary> public static void SwitchActiveBuildTarget(IProjectBuilder projectBuilder) { var target = projectBuilder.ActualBuildTarget; var targetGroup = projectBuilder.BuildTargetGroup; EditorUserBuildSettings.SwitchActiveBuildTarget(targetGroup, target); }
protected virtual void DrawBuilderSettings(IProjectBuilder builder) { using (new EditorGUILayout.HorizontalScope()) { // Apply settings from current builder asset. if (GUILayout.Button(new GUIContent("Apply Setting", EditorGUIUtility.FindTexture("d_SaveAs")))) { builder.DefineSymbol(); builder.ApplySettings(); } // Read settings from project settings. if (GUILayout.Button(new GUIContent("Read Setting", EditorGUIUtility.FindTexture("Loading")))) { builder.ReadSettings(); } // Open PlayerSettings. if (GUILayout.Button( new GUIContent("Player Setting", EditorGUIUtility.FindTexture("d_editicon.sml")), GUILayout.Width(110))) { #if UNITY_2018_1_OR_NEWER // Selection.activeObject = Unsupported.GetSerializedAssetInterfaceSingleton("PlayerSettings"); SettingsService.OpenProjectSettings("Project/Player"); #else EditorApplication.ExecuteMenuItem("Edit/Project Settings/Player"); #endif } } }
internal RemoteProjectBuilder(string file, RemoteBuildEngine engine) { this.file = file; this.engine = engine; builder = engine.LoadProject(file); referenceCache = new Dictionary <string, string[]> (); }
public static string GetBuildOutputFileName(IProjectBuilder projectBuilder) { string fileName = projectBuilder.BuildName; fileName = ConvertPath(fileName, projectBuilder); return(fileName); }
public ProjectInfoDiscoverer(IConsole console, IFileSystem fileSystem, IProjectBuilder projectBuilder) { _console = console ?? throw new ArgumentNullException(nameof(console)); _fileSystem = fileSystem ?? throw new ArgumentNullException(nameof(fileSystem)); _projectBuilder = projectBuilder ?? throw new ArgumentNullException(nameof(projectBuilder)); _targetEnvironmentName = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT"); }
public virtual void ApplySettings(IProjectBuilder builder) { _keystoreSettings.ApplySettings(this); _targetSettings.ApplySettings(this); _symbolsZipSettings.ApplySettings(this); ApplyBuildVersionSettings(builder); }
public virtual void ReadSettings(IProjectBuilder builder) { _languagesSettings.ReadSettings(this); _frameworksSettings.ReadSettings(this); _servicesSettings.ReadSettings(this); _entitlementsSettings.ReadSettings(this); _signingSettings.ReadSettings(this); _exportOptionsSettings.ReadSettings(this); }
public static string GetOutputPath(IProjectBuilder projectBuilder) { string dirPath = GetBuildOutputDirectoryPath(projectBuilder); string fileName = GetBuildOutputFileName(projectBuilder); string buildPath = Path.Combine(dirPath, fileName); return(buildPath); }
public City(IProjectBuilder builder, Faction faction, Coord position) { projectBuilder = builder; Name = "City " + Random.Range(0, 10000); SetFaction(faction); Coordinate = position; Garrison = new Unit(new Unit.Data("garrison", 2, 1)); IndustyProduction = 1; }
public static string GetVersionCodeLong(IProjectBuilder projectBuilder) { if (System.Version.TryParse(projectBuilder.Version, out var v)) { return($"{v.Major}{v.Minor:00}{v.Build:00}{projectBuilder.VersionCode:00}"); } return(projectBuilder.VersionCode.ToString()); }
public IndexModel(IOptionsSnapshot <Project> p, IProjectBuilder projectBuilder, ITemplateEngine templateEngine, AddNewBussinessHelper addNewBussinessHelper, IMapper mapper, IHostingEnvironment hostingEnvironment) { _projectBuilder = projectBuilder; _templateEngine = templateEngine; _addNewBussinessHelper = addNewBussinessHelper; Project = p.Value; _mapper = mapper; _hostingEnvironment = hostingEnvironment; }
public void UnloadProject (IProjectBuilder pb) { try { engine.UnloadProject (pb); } catch (Exception ex) { LoggingService.LogError ("Project unloading failed", ex); if (!CheckDisconnected ()) throw; } }
/// <summary> /// Creates a new instance. /// </summary> /// <param name="projectSearchProvider">Search provider</param> /// <param name="projectBuilder">Project builder</param> /// <param name="outputChannel">Output channel</param> /// <param name="logger">Logger</param> public ProjectAggregator(IProjectSearchProvider projectSearchProvider , IProjectBuilder projectBuilder , IOutputChannel outputChannel , ILogger logger) { _projectSearchProvider = projectSearchProvider; _projectBuilder = projectBuilder; _outputChannel = outputChannel; _logger = logger; }
public virtual void ApplySettings(IProjectBuilder builder) { _languagesSettings.ApplySettings(this); _frameworksSettings.ApplySettings(this); _servicesSettings.ApplySettings(this); _entitlementsSettings.ApplySettings(this); _signingSettings.ApplySettings(this); _exportOptionsSettings.ApplySettings(this); ApplyBuildVersionSettings(builder); }
public void UnloadProject(IProjectBuilder pb) { try { engine.UnloadProject(pb); } catch (Exception ex) { LoggingService.LogError("Project unloading failed", ex); if (!CheckDisconnected()) { throw; } } }
public static string GetBuildOutputDirectoryPath(IProjectBuilder projectBuilder) { string dirPath = projectBuilder.BuildPath; dirPath = ConvertPath(dirPath, projectBuilder); string dirName = projectBuilder.BuildDirectoryName; dirName = ConvertPath(dirName, projectBuilder); return(Path.Combine(dirPath, dirName)); }
public ExtractDataSource(Project project , ILoggerFactory loggerFactory , ILogger <ExtractDataSource> logger , IProjectBuilder projectBuilder , IPluginManager pluginManager) { _project = project; _loggerFactory = loggerFactory; _logger = logger; _projectBuilder = projectBuilder; _pluginManager = pluginManager; _etlRepository = _pluginManager.Resolve <IETLTaskRepository>(_project.GetETLRepository()); }
public Build(IProjectBuilder builder, Project project) { InitializeComponent(); this.builder = builder; LoadVersions(project); buildSettings = builder.GetBuildSettings(project); btnBuildSettings.IsEnabled = buildSettings != null; this.project = project; }
public DispatchOperationExecutor( ProjectContextFactory projectFactory, EfConsoleCommandSpecFactory commandSpecFactory, IProjectBuilder projectBuilder) { Debug.Assert(projectFactory != null, "projectFactory is null."); Debug.Assert(commandSpecFactory != null, "commandSpecFactory is null."); Debug.Assert(projectBuilder != null, "projectBuilder is null."); _commandSpecFactory = commandSpecFactory; _projectFactory = projectFactory; _projectBuilder = projectBuilder; }
public void Dispose() { if (engine != null) { if (builder != null) { engine.UnloadProject(builder); } MSBuildProjectService.ReleaseProjectBuilder(engine); GC.SuppressFinalize(this); engine = null; builder = null; } }
public void Dispose () { if (!MSBuildProjectService.ShutDown && engine != null) { try { if (builder != null) engine.UnloadProject (builder); MSBuildProjectService.ReleaseProjectBuilder (engine); } catch { // Ignore } GC.SuppressFinalize (this); engine = null; builder = null; } }
public Build(IProjectBuilder builder, Project project, Models.Version version) { InitializeComponent(); this.builder = builder; LoadVersions(project, version); selectedVersions.Add(version); cbBuildSpecificPages.IsChecked = true; buildSettings = builder.GetBuildSettings(project); btnBuildSettings.IsEnabled = buildSettings != null; this.project = project; }
public DeployCommand( IProjectBuilder projectBuilder, IFtpSessionFactory ftpSessionFactory) { Contract.Requires(projectBuilder != null); Contract.Requires(ftpSessionFactory != null); this.projectBuilder = projectBuilder; this.ftpSessionFactory = ftpSessionFactory; AddArg("project build dir", "path to the directory where the project was built").Value((x, env) => buildDirectory = x); AddArg("server", "server IP or hostname").Value((x, env) => server = x); AddArg("FTP username", "username for the FTP server").Value((x, env) => userName = x); AddArg("FTP password", "password for the FTP server").Value((x, env) => password = x); AddSetting("port", "FTP port number").IntValue((x, env) => port = x); AddSetting("remote-dir", "the root remote dir where the project files will be deployed (uploaded)").Value((x, env) => remoteRootDirectory = x); }
/// <summary> /// Releases unmanaged and - optionally - managed resources. /// </summary> /// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param> protected virtual void Dispose(bool disposing) { if (!_disposed) { if (disposing) { // Dispose managed resources. _pathToConfigurationFile = null; _repositories = null; _repositoryManager = null; _projectBuilder = null; } // Clean-up unmanaged resources. _disposed = true; } }
public ProjectAnalyzer( IVsApiPortAnalyzer analyzer, IErrorListProvider errorList, ISourceLineMapper sourceLineMapper, IFileWriter reportWriter, IOutputWindowWriter outputWindowWriter, IFileSystem fileSystem, IProjectBuilder builder, IProjectMapper projectMapper) { _analyzer = analyzer; _sourceLineMapper = sourceLineMapper; _reportWriter = reportWriter; _fileSystem = fileSystem; _builder = builder; _errorList = errorList; _projectMapper = projectMapper; _outputWindowWriter = outputWindowWriter; }
public ProjectAnalyzer( IVsApiPortAnalyzer analyzer, IErrorListProvider errorList, ISourceLineMapper sourceLineMapper, IFileWriter reportWriter, IFileSystem fileSystem, IProjectBuilder builder, IProjectMapper projectMapper, IVSThreadingService threadingService) { _analyzer = analyzer; _sourceLineMapper = sourceLineMapper; _reportWriter = reportWriter; _fileSystem = fileSystem; _builder = builder; _errorList = errorList; _projectMapper = projectMapper; _threadingService = threadingService; }
public QueueService(IMessageProducerScopeFactory messageProducerScopeFactory, IMessageConsumerScopeFactory messageConsumerScopeFactory, IAzureService azureService, IProjectBuilder builder, IFileArchiver fileArchiver, ILogger <QueueService> logger) { _logger = logger; _logger.LogInformation("queue service start"); _messageProducerScopeBuild = messageProducerScopeFactory.Open(new MessageScopeSettings { ExchangeName = "BuildServerExchangeBuild", ExchangeType = ExchangeType.Direct, QueueName = "BuildResultQueue", RoutingKey = "buildResponse" }); _messageProducerScopeRun = messageProducerScopeFactory.Open(new MessageScopeSettings { ExchangeName = "BuildServerExchangeRun", ExchangeType = ExchangeType.Direct, QueueName = "RunResultQueue", RoutingKey = "runResponse" }); _messageConsumerScopeRun = messageConsumerScopeFactory.Connect(new MessageScopeSettings { ExchangeName = "IdeExchangeRun", ExchangeType = ExchangeType.Direct, QueueName = "SendRunRequestQueue", RoutingKey = "runRequest" }); _messageConsumerScopeBuild = messageConsumerScopeFactory.Connect(new MessageScopeSettings { ExchangeName = "IdeExchangeBuild", ExchangeType = ExchangeType.Direct, QueueName = "SendBuildRequestQueue", RoutingKey = "buildRequest" }); _messageConsumerScopeBuild.MessageConsumer.Received += MessageConsumer_BuildReceived; _messageConsumerScopeRun.MessageConsumer.Received += MessageConsumer_RunReceived; _worker = new Worker(builder, fileArchiver, azureService); }
public ScriptMigrationViewModel( IReadOnlyCollection <Project> allSolutionProjects, IProjectBuilder projectBuilder, IMigrationService migrationService, IMessageBoxService messageBoxService) { _allSolutionProjects = allSolutionProjects; _projectBuilder = projectBuilder; _migrationService = migrationService; _messageBoxService = messageBoxService; ProjectNames = new ObservableCollection <string>(allSolutionProjects.Select(p => p.DisplayName)); Migrations = new ObservableCollection <DbContextNodeViewModel>(); _projectMigrations = new Dictionary <string, Dictionary <string, List <string> > >(); SelectedProjectName = ProjectNames.FirstOrDefault(); OkCommand = new AsyncCommand(okCommandExecute); }
public BuildCommand( IFileSystem fileSystem, IProjectBuilder projectBuilder, IFreudeTextParser freudeTextParser, IFreudeTemplatingEngine freudeTemplatingEngine) { Contract.Requires(fileSystem != null); Contract.Requires(projectBuilder != null); Contract.Requires(freudeTextParser != null); Contract.Requires(freudeTemplatingEngine != null); this.fileSystem = fileSystem; this.projectBuilder = projectBuilder; this.freudeTextParser = freudeTextParser; this.freudeTemplatingEngine = freudeTemplatingEngine; AddArg("project source dir", "path to the project source directory").Value((x, env) => projectSourceDirectory = x); AddArg("template file", "path to the template file").Value((x, env) => templateFileName = x); AddArg("build dir", "path to the destination directory where the project will be built").Value((x, env) => buildDirectory = x); AddArg("extension", "the file extension to be used for files expanded from the template").Value((x, env) => expandedFileExtension = x); }
/// <summary> /// Initialises a new instance of the <see cref="DeploymentService" /> class. /// </summary> /// <param name="pathToConfigurationFile">The path to configuration file.</param> /// <param name="readConfigurationAndCheckForUpdates">if set to <c>true</c> [read configuration and check for updates].</param> /// <param name="repositoryManager">The repository manager.</param> /// <param name="projectBuilder">The project builder.</param> /// <param name="deploymentManager">The deployment manager.</param> /// <param name="exceptionManager">The exception manager.</param> /// <exception cref="System.ArgumentNullException">pathToConfigurationFile; A valid path to the configuration file has not been provided.</exception> public DeploymentService(string pathToConfigurationFile, bool readConfigurationAndCheckForUpdates, IDistributedRevControlRepositoryManager repositoryManager, IProjectBuilder projectBuilder, IDeploymentManager deploymentManager, IExceptionManager exceptionManager) { _repositoryManager = repositoryManager; _projectBuilder = projectBuilder; _deploymentManager = deploymentManager; _exceptionManager = exceptionManager; if (pathToConfigurationFile == null) { throw new ArgumentNullException("pathToConfigurationFile", "A valid path to the configuration file has not been provided."); } else { _pathToConfigurationFile = pathToConfigurationFile; if (readConfigurationAndCheckForUpdates) { ReadConfigurationFromFile(); CheckRepositoriesForUpdates(); } } }
public void UnloadProject (IProjectBuilder pb) { ((ProjectBuilder)pb).Dispose (); RemotingServices.Disconnect ((MarshalByRefObject) pb); }
internal RemoteProjectBuilder (string file, RemoteBuildEngine engine) { this.engine = engine; builder = engine.LoadProject (file); }
public SolutionBuild(Solution solution, IProjectBuilder projectBuilder) { this.solution = solution; this.projectBuilder = projectBuilder; }
public void UnloadProject (IProjectBuilder pb) { engine.UnloadProject (pb); }
internal RemoteProjectBuilder (string file, string solutionFile, string binPath, RemoteBuildEngine engine) { this.engine = engine; builder = engine.LoadProject (file, solutionFile, binPath); }
internal RemoteProjectBuilder (string file, RemoteBuildEngine engine) { this.file = file; this.engine = engine; builder = engine.LoadProject (file); referenceCache = new Dictionary<string, AssemblyReference[]> (); }
public void Dispose () { if (engine != null) { if (builder != null) engine.UnloadProject (builder); MSBuildProjectService.ReleaseProjectBuilder (engine); GC.SuppressFinalize (this); engine = null; builder = null; } }