Пример #1
0
 public new void ConfigureAll(Configuration conf, NetImguiTarget target)
 {
     base.ConfigureAll(conf, target);
     conf.AddProject <ProjectNetImguiServer>(target);
     SolutionSample.AddSampleProjects(conf, target);
     Utility.AddCompatibilityProjects(conf, target);
 }
Пример #2
0
 public new void ConfigureAll(Configuration conf, NetImguiTarget target)
 {
     base.ConfigureAll(conf, target);
     conf.AddPublicDependency <ProjectImgui>(target);
     conf.IncludePaths.Add(NetImguiTarget.GetPath(ProjectImgui.sDefaultPath));
     conf.IncludePaths.Add(NetImguiTarget.GetPath(@"\Code\Client"));
 }
Пример #3
0
 public new void ConfigureAll(Configuration conf, NetImguiTarget target)
 {
     base.ConfigureAll(conf, target);
     conf.Options.Add(Options.Vc.General.WarningLevel.EnableAllWarnings);
     conf.IncludePaths.Add(@"[project.SharpmakeCsPath]\..\Code\ThirdParty\" + mVersion);
     conf.LibraryFiles.Add("ws2_32.lib");
 }
Пример #4
0
        public void ConfigureAll(Configuration conf, NetImguiTarget target)
        {
            conf.Name             = @"[target.Compiler]_[target.Optimization]";
            conf.ProjectFileName  = @"[project.Name]";
            conf.TargetFileSuffix = @"_[target.Optimization]";
            conf.ProjectPath      = @"[project.SharpmakeCsPath]\_Projects\[target.DevEnv]";
            conf.TargetPath       = mIsExe ? @"[project.SharpmakeCsPath]\_Bin\[target.Compiler]_[target.Platform]" : @"[project.SharpmakeCsPath]\_Lib\[target.Compiler]_[target.Platform]";
            conf.IntermediatePath = @"[project.SharpmakeCsPath]\_Intermediate\[target.Compiler]_[target.Platform]_[target.Optimization]\[project.Name]";
            conf.Output           = mIsExe ? Project.Configuration.OutputType.Exe : Project.Configuration.OutputType.Lib;

            if (target.Compiler == Compiler.Clang)
            {
                conf.Options.Add(Options.Vc.General.PlatformToolset.LLVM);
            }

            if (mIsExe)
            {
                conf.VcxprojUserFile = new ProjConfig.VcxprojUserFileSettings();
                conf.VcxprojUserFile.LocalDebuggerWorkingDirectory = "$(TargetDir)";
                conf.Options.Add(Options.Vc.Linker.SubSystem.Application);
                conf.LibraryFiles.Add("D3D11.lib");
            }

            conf.Options.Add(Options.Vc.General.TreatWarningsAsErrors.Enable);
            conf.Options.Add(Options.Vc.General.CharacterSet.Unicode);
            conf.Options.Add(Options.Vc.Linker.TreatLinkerWarningAsErrors.Enable);
            //conf.Options.Add(new Options.Vc.Compiler.DisableSpecificWarnings(""));
            //conf.Options.Add(Options.Vc.Librarian.TreatLibWarningAsErrors.Enable);	//Note: VisualStudio 2019 doesn't support this option properly
        }
Пример #5
0
 // Add sources files for platform specific Dear ImGui backend (OS/Renderer support)
 public void AddImguiBackendSources()
 {
     SourceFiles.Add(NetImguiTarget.GetPath(ProjectImgui.sDefaultPath) + @"\backends\imgui_impl_dx11.h");
     SourceFiles.Add(NetImguiTarget.GetPath(ProjectImgui.sDefaultPath) + @"\backends\imgui_impl_dx11.cpp");
     SourceFiles.Add(NetImguiTarget.GetPath(ProjectImgui.sDefaultPath) + @"\backends\imgui_impl_win32.h");
     SourceFiles.Add(NetImguiTarget.GetPath(ProjectImgui.sDefaultPath) + @"\backends\imgui_impl_win32.cpp");
 }
Пример #6
0
 public ProjectImgui()
     : base(false)
 {
     Name           = "DearImgui";
     SourceRootPath = NetImguiTarget.GetPath(sDefaultPath);
     SourceFilesExcludeRegex.Add(@"backends\.*");
 }
Пример #7
0
 public new void ConfigureAll(Configuration conf, NetImguiTarget target)
 {
     base.ConfigureAll(conf, target);
     conf.Options.Add(Options.Vc.General.WarningLevel.EnableAllWarnings);
     conf.IncludePaths.Add(mImguiPath);
     conf.LibraryFiles.Add("ws2_32.lib");
 }
Пример #8
0
 public ProjectSample_SingleInclude()
     : base(true)
 {
     Name           = "SampleSingleInclude";
     SourceRootPath = NetImguiTarget.GetPath(@"\Code\Sample\") + Name;
     AdditionalSourceRootPaths.Add(NetImguiTarget.GetPath(@"\Code\Sample\Common"));
     AddImguiBackendSources();
 }
Пример #9
0
 public ProjectSample(string inName)
     : base(true)
 {
     Name           = inName;
     SourceRootPath = NetImguiTarget.GetPath(@"\Code\Sample\") + Name;
     AdditionalSourceRootPaths.Add(NetImguiTarget.GetPath(@"\Code\Sample\Common"));
     AddImguiBackendSources();
 }
Пример #10
0
 public new void ConfigureAll(Configuration conf, NetImguiTarget target)
 {
     base.ConfigureAll(conf, target);
     conf.AddPublicDependency <ProjectImgui_Default>(target);
     conf.AddPublicDependency <ProjectNetImgui_Default>(target);
     conf.IncludePaths.Add(@"[project.SharpmakeCsPath]\..\Code\ThirdParty\" + SolutionAll.sDefaultImguiVersion);
     conf.IncludePaths.Add(@"[project.SharpmakeCsPath]\..\Code\Client");
 }
Пример #11
0
 public ProjectNetImgui(string imguiFullPath)
     : base(false)
 {
     mVersion       = Path.GetFileName(imguiFullPath);
     mImguiPath     = imguiFullPath;
     Name           = "NetImguiLib (" + mVersion + ")";
     SourceRootPath = NetImguiTarget.GetPath(@"\Code\Client");
     SourceFiles.Add(mImguiPath + @"\imgui.h");
 }
Пример #12
0
 public new void ConfigureAll(Configuration conf, NetImguiTarget target)
 {
     base.ConfigureAll(conf, target);
     conf.AddPublicDependency <ProjectImgui>(target);
     conf.AddPublicDependency <ProjectNetImgui_Disabled>(target);
     conf.IncludePaths.Add(NetImguiTarget.GetPath(ProjectImgui.sDefaultPath));
     conf.IncludePaths.Add(NetImguiTarget.GetPath(@"\Code\Client"));
     conf.Defines.Add("NETIMGUI_ENABLED=0");
 }
Пример #13
0
        public static void AddProjects(Configuration conf, NetImguiTarget target)
        {
            string SolutionFolder = @"Samples";

            conf.AddProject <ProjectSample_Basic>(target, false, SolutionFolder);
            conf.AddProject <ProjectSample_NewFrame>(target, false, SolutionFolder);
            conf.AddProject <ProjectSample_DualUI>(target, false, SolutionFolder);
            conf.AddProject <ProjectSample_Textures>(target, false, SolutionFolder);
            conf.AddProject <ProjectSample_Disabled>(target, false, SolutionFolder);
        }
Пример #14
0
        public new void ConfigureAll(Configuration conf, NetImguiTarget target)
        {
            base.ConfigureAll(conf, target);
            conf.AddProject <ProjectNetImguiServer>(target);
            conf.AddProject <ProjectSample>(target);

            conf.AddProject <ProjectNetImgui_17500>(target, false, "Compatibility Tests");
            conf.AddProject <ProjectNetImgui_17600>(target, false, "Compatibility Tests");
            conf.AddProject <ProjectNetImgui_Dock17601>(target, false, "Compatibility Tests");
        }
Пример #15
0
        public new void ConfigureAll(Configuration conf, NetImguiTarget target)
        {
            base.ConfigureAll(conf, target);
            conf.AddPublicDependency <ProjectImgui_Default>(target);
            conf.AddPublicDependency <ProjectNetImgui_Default>(target);

            conf.IncludePaths.Add(SourceRootPath + @"\Source");
            conf.IncludePaths.Add(@"[project.SharpmakeCsPath]\..\Code\ThirdParty\" + SolutionAll.sDefaultImguiVersion);
            conf.IncludePaths.Add(@"[project.SharpmakeCsPath]\..\Code\Client");
            conf.EventPostBuild.Add(@"xcopy [project.SharpmakeCsPath]\..\Code\ServerApp\Background.png " + conf.TargetPath + " /D /Y");
        }
Пример #16
0
        public new void ConfigureAll(Configuration conf, NetImguiTarget target)
        {
            base.ConfigureAll(conf, target);
            conf.AddPublicDependency <ProjectImgui>(target);
            conf.AddPublicDependency <ProjectNetImgui_Default>(target);

            conf.IncludePaths.Add(SourceRootPath + @"\Source");
            conf.IncludePaths.Add(NetImguiTarget.GetPath(ProjectImgui.sDefaultPath));
            conf.IncludePaths.Add(NetImguiTarget.GetPath(@"\Code\Client"));
            conf.EventPostBuild.Add(@"xcopy " + NetImguiTarget.GetPath(@"\Code\ServerApp\Background.png") + " " + conf.TargetPath + " /D /Y");
        }
Пример #17
0
 public ProjectNetImguiServer()
     : base(true)
 {
     Name           = "NetImguiServer";
     SourceRootPath = NetImguiTarget.GetPath(@"\Code\ServerApp");
     ResourceFiles.Add(NetImguiTarget.GetPath(@"\Code\ServerApp\small.ico"));
     ResourceFiles.Add(NetImguiTarget.GetPath(@"\Code\ServerApp\netImguiApp.ico"));
     ResourceFiles.Add(NetImguiTarget.GetPath(@"\Code\ServerApp\netImguiApp.rc"));
     ResourceFiles.Add(NetImguiTarget.GetPath(@"\Code\ServerApp\Background.png"));
     SourceFilesBuildExcludeRegex.Add(@".*Code\\ServerApp\\Source\\Fonts\\.*");
     AddImguiBackendSources();
 }
Пример #18
0
        public static void AddSampleProjects(Configuration conf, NetImguiTarget target)
        {
            string SolutionFolder = "Samples";

            conf.AddProject <ProjectSample_Basic>(target, false, SolutionFolder);
            conf.AddProject <ProjectSample_NewFrame>(target, false, SolutionFolder);
            conf.AddProject <ProjectSample_DualUI>(target, false, SolutionFolder);
            conf.AddProject <ProjectSample_Textures>(target, false, SolutionFolder);
            conf.AddProject <ProjectSample_Background>(target, false, SolutionFolder);
            conf.AddProject <ProjectSample_Disabled>(target, false, SolutionFolder);
            conf.AddProject <ProjectSample_SingleInclude>(target, false, SolutionFolder);
            // Adding an already auto included dependcy, so it can be moved to more appropriate folder
            conf.AddProject <ProjectNetImgui_Disabled>(target, false, "CompatibilityTest");
        }
Пример #19
0
        public new void ConfigureAll(Configuration conf, NetImguiTarget target)
        {
            base.ConfigureAll(conf, target);
            conf.AddProject <ProjectNetImguiServer>(target);
            SolutionSample.AddProjects(conf, target);

            string SolutionFolder = @"Compatibility Tests";

            conf.AddProject <ProjectNetImgui_17400>(target, false, SolutionFolder);
            conf.AddProject <ProjectNetImgui_17500>(target, false, SolutionFolder);
            conf.AddProject <ProjectNetImgui_17600>(target, false, SolutionFolder);
            conf.AddProject <ProjectNetImgui_17700>(target, false, SolutionFolder);
            conf.AddProject <ProjectNetImgui_17800>(target, false, SolutionFolder);
            conf.AddProject <ProjectNetImgui_Dock17601>(target, false, SolutionFolder);
            conf.AddProject <ProjectNetImgui_Disabled>(target, false, SolutionFolder);
        }
Пример #20
0
        public static void ClaimShaderFiles(Project project, string filenameEnding, ShaderProfile shaderProfile, string entryName)
        {
            Strings hlsl_Files = new Strings(project.ResolvedSourceFiles.Where(file => file.EndsWith(filenameEnding, StringComparison.InvariantCultureIgnoreCase)));

            if (hlsl_Files.Count() > 0)
            {
                foreach (ProjConfig conf in project.Configurations)
                {
                    string targetName = conf.Target.Name;
                    string outputDir  = string.Format(@"{0}\{1}_{2}\", NetImguiTarget.GetPath(@"\_generated\Shaders"), project.Name, conf.Target.GetOptimization());
                    conf.IncludePaths.Add(outputDir);
                    foreach (string file in hlsl_Files)
                    {
                        CustomBuildFileHLSL HlslCompileTask = new CustomBuildFileHLSL(conf, targetName, shaderProfile, entryName, outputDir, Project.GetCapitalizedFile(file));
                        project.ResolvedSourceFiles.Add(HlslCompileTask.Output);
                        conf.CustomFileBuildSteps.Add(HlslCompileTask);
                    }
                }
            }
        }
Пример #21
0
        public void ConfigureAll(Configuration conf, NetImguiTarget target)
        {
            conf.Name             = @"[target.Compiler]_[target.Optimization]";
            conf.ProjectFileName  = @"[project.Name]";
            conf.TargetFileSuffix = @"_[target.Optimization]";
            conf.ProjectPath      = NetImguiTarget.GetPath(@"\_projects\[target.DevEnv]");
            conf.TargetPath       = NetImguiTarget.GetPath(mIsExe        ? @"\_Bin\[target.DevEnv]_[target.Compiler]_[target.Platform]"
                                                                                                                                                : @"\_generated\Libs\[target.DevEnv]_[target.Compiler]_[target.Platform]");
            conf.IntermediatePath = NetImguiTarget.GetPath(@"\_intermediate\[target.DevEnv]_[target.Compiler]_[target.Platform]_[target.Optimization]\[project.Name]");
            conf.Output           = mIsExe ? Project.Configuration.OutputType.Exe : Project.Configuration.OutputType.Lib;

            conf.IncludePaths.Add(NetImguiTarget.GetPath(ProjectImgui.sDefaultPath) + @"\backends");

            if (target.Compiler == Compiler.Clang)
            {
                conf.Options.Add(Options.Vc.General.PlatformToolset.ClangCL);
            }

            if (mIsExe)
            {
                conf.VcxprojUserFile = new ProjConfig.VcxprojUserFileSettings();
                conf.VcxprojUserFile.LocalDebuggerWorkingDirectory = "$(TargetDir)";
                conf.Options.Add(Options.Vc.Linker.SubSystem.Application);
                conf.LibraryFiles.Add("D3D11.lib");
                conf.IncludePaths.Add(NetImguiTarget.GetPath(@"\Code"));
            }

            conf.Options.Add(Options.Vc.General.WindowsTargetPlatformVersion.Latest);
            conf.Options.Add(Options.Vc.General.TreatWarningsAsErrors.Enable);
            conf.Options.Add(Options.Vc.General.CharacterSet.Unicode);
            conf.Options.Add(Options.Vc.Linker.TreatLinkerWarningAsErrors.Enable);

            conf.Defines.Add("_HAS_EXCEPTIONS=0");             // Prevents error in VisualStudio c++ library with NoExcept, like xlocale

            //conf.Options.Add(new Options.Vc.Compiler.DisableSpecificWarnings(""));
            //conf.Options.Add(Options.Vc.Librarian.TreatLibWarningAsErrors.Enable);	//Note: VisualStudio 2019 doesn't support this option properly
        }
Пример #22
0
 public ProjectNetImgui_Disabled() : base(NetImguiTarget.GetPath(ProjectImgui.sDefaultPath))
 {
     Name = "NetImguiLib (Disabled)";
 }
Пример #23
0
 public void ConfigureAll(Configuration conf, NetImguiTarget target)
 {
     conf.Name             = "[target.Compiler]_[target.Optimization]";
     conf.SolutionFileName = "[target.DevEnv]_[solution.Name]";
     conf.SolutionPath     = NetImguiTarget.GetPath(@"\_projects");
 }
Пример #24
0
 public void ConfigureAll(Configuration conf, NetImguiTarget target)
 {
     conf.Name             = "[target.Compiler]_[target.Optimization]";
     conf.SolutionFileName = "[target.DevEnv]_[solution.Name]";
     conf.SolutionPath     = @"[solution.SharpmakeCsPath]\_Projects";
 }
Пример #25
0
 public new void ConfigureAll(Configuration conf, NetImguiTarget target)
 {
     base.ConfigureAll(conf, target);
     SolutionSample.AddSampleProjects(conf, target);
 }
Пример #26
0
 //=============================================================================================
 // PROJECTS
 //=============================================================================================
 // Generate the default Imgui/netImgui Libraries (used to link against with Samples/Server)
 [Sharpmake.Generate] public class ProjectNetImgui_Default : ProjectNetImgui { public ProjectNetImgui_Default() : base(NetImguiTarget.GetPath(ProjectImgui.sDefaultPath))
                                                                               {
                                                                                   Name = "NetImguiLib";
                                                                               }
Пример #27
0
 public new void ConfigureAll(Configuration conf, NetImguiTarget target)
 {
     base.ConfigureAll(conf, target);
     conf.AddProject <ProjectNetImguiServer>(target);
 }
Пример #28
0
 public new void ConfigureAll(Configuration conf, NetImguiTarget target)
 {
     base.ConfigureAll(conf, target);
     conf.Defines.Add("NETIMGUI_ENABLED=0");
 }