コード例 #1
0
            public SolutionConfiguration(Project.ConfigurationData configuration)
            {
                OriginalName = configuration.Name.Replace("AnyCPU", "Any CPU");
                var name  = OriginalName.Remove(OriginalName.IndexOf('|'));
                var parts = name.Split('.');

                if (parts.Length == 3)
                {
                    Configuration = parts[0] + '.' + parts[2];
                }
                else if (parts.Length == 1)
                {
                    Configuration = parts[0];
                }
                else
                {
                    throw new Exception($"Unknown project configuration {configuration.Name}.");
                }
                Platform = configuration.PlatformName + "_" + configuration.ArchitectureName;
                if (configuration.Architecture == TargetArchitecture.AnyCPU)
                {
                    Platform = "Any CPU";
                }
                var platform = Build.Platform.GetPlatform(configuration.Platform);

                if (platform is IProjectCustomizer customizer)
                {
                    customizer.GetSolutionArchitectureName(configuration.Architecture, ref Platform);
                }
                Name = Configuration + '|' + Platform;
            }
コード例 #2
0
ファイル: WindowsPlatform.cs プロジェクト: MiheevN/FlaxEngine
        /// <inheritdoc />
        void IVisualStudioProjectCustomizer.WriteVisualStudioBuildProperties(VisualStudioProject project, Platform platform, Toolchain toolchain, Project.ConfigurationData configuration, StringBuilder vcProjectFileContent, StringBuilder vcFiltersFileContent, StringBuilder vcUserFileContent)
        {
            // Override the debugger to use Editor if target doesn't output executable file
            var outputType = project.OutputType ?? configuration.Target.OutputType;

            if (outputType != TargetOutputType.Executable && configuration.Name.StartsWith("Editor."))
            {
                var editorFolder = configuration.Architecture == TargetArchitecture.x64 ? "Win64" : "Win32";
                vcUserFileContent.AppendLine(string.Format("  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='{0}'\">", configuration.Name));
                vcUserFileContent.AppendLine(string.Format("    <LocalDebuggerCommand>{0}\\FlaxEditor.exe</LocalDebuggerCommand>", Path.Combine(Globals.EngineRoot, "Binaries", "Editor", editorFolder, configuration.ConfigurationName)));
                vcUserFileContent.AppendLine("    <LocalDebuggerCommandArguments>-project \"$(SolutionDir)\" -skipCompile</LocalDebuggerCommandArguments>");
                vcUserFileContent.AppendLine("    <LocalDebuggerWorkingDirectory>$(SolutionDir)</LocalDebuggerWorkingDirectory>");
                vcUserFileContent.AppendLine("    <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>");
                vcUserFileContent.AppendLine("    </PropertyGroup>");
            }
        }