public MainProject()
    {
        // Eval paths
        m_RootDirectory = Path.Combine(this.SharpmakeCsPath, @"..\..");

        Name           = mc_ProjectName;
        SourceRootPath = Path.Combine(m_RootDirectory, @"source", mc_ProjectName);

        SourceFilesExtensions.Add(".shader");
        SourceFilesExtensions.Add(".glsl");
        AdditionalSourceRootPaths.Add(Path.Combine(m_RootDirectory, @"data"));

        AddTargets(
            new Target(
                Platform.win64,
                DevEnv.vs2019,
                Optimization.Debug | Optimization.Release
                ),
            new Target(
                Platform.win64,
                DevEnv.vs2022,
                Optimization.Debug | Optimization.Release
                )
            );
    }
        public DebugProject()
            : base(typeof(Target), typeof(Configuration), isInternal: true)
        {
            _projectInfo = DebugProjectGenerator.DebugProjects[GetType()];

            // set paths
            RootPath       = _projectInfo.ProjectFolder;
            SourceRootPath = RootPath;

            // add selected source files
            SourceFiles.AddRange(_projectInfo.ProjectFiles);

            // ensure that no file will be automagically added
            SourceFilesExtensions.Clear();
            ResourceFilesExtensions.Clear();
            PRIFilesExtensions.Clear();
            ResourceFiles.Clear();
            NoneExtensions.Clear();
            VsctExtension.Clear();

            Name = _projectInfo.DisplayName;

            // Use the new csproj style
            ProjectSchema = CSharpProjectSchema.NetCore;

            // prevents output dir to have a framework subfolder
            CustomProperties.Add("AppendTargetFrameworkToOutputPath", "false");

            // we need to disable determinism while because we are using wildcards in assembly versions
            // error CS8357: The specified version string contains wildcards, which are not compatible with determinism
            CustomProperties.Add("Deterministic", "false");

            AddTargets(DebugProjectGenerator.GetTargets());
        }
Beispiel #3
0
        public QTFileCustomBuildProject()
        {
            Name           = "QTFileCustomBuild";
            SourceRootPath = @"[project.SharpmakeCsPath]\codebase";
            QTPath         = @"[project.SharpmakeCsPath]\qt\5.9.2\msvc2017_64";
            QTExeFolder    = @"[project.QTPath]\bin\";

            mocTool = new QtSharpmakeMocTool();
            mocTool.ExcludeMocFromCompileRegex.Add("floatcosanglespinbox.h");
            mocTool.ExcludeMocFromCompileRegex.Add("privatewidget.h");

            SourceFilesExtensions.Add(".qrc", ".ui");

            AddTargets(new Target(
                           Platform.win64,
                           DevEnv.vs2017,
                           Optimization.Debug | Optimization.Release | Optimization.Retail,
                           OutputType.Dll
                           ));

            // Fast build fails regression tests because it embeds system and user paths, which aren't
            // the same on each user's machine.
            //AddTargets(new Target(
            //        Platform.win64,
            //        DevEnv.vs2017,
            //        Optimization.Debug | Optimization.Release | Optimization.Retail,
            //        OutputType.Dll,
            //        Blob.FastBuildUnitys,
            //        BuildSystem.FastBuild
            //));
        }
Beispiel #4
0
        public AOCProject()
        {
            SharpmakeToGlobalRoot = SharpmakeToRoot = @"\..";

            TestProject    = "AOC";
            ShortName      = "AOC";
            SourceRootPath = @"[project.ToRoot]\[project.TestProject]";
            SourceFilesExtensions.Add("txt");
        }
Beispiel #5
0
 public UsePrecompExe()
 {
     SourceFilesExtensions.Add(
         ".ceecee",
         ".ceepeepee"
         );
     SourceFilesCompileExtensions.Add(
         ".ceecee",
         ".ceepeepee"
         );
 }
Beispiel #6
0
        public ExeProject()
        {
            AddTargets(CommonTarget.GetDefaultTargets());
            Name = "exe";

            SourceFilesExtensions.Add(".xml");
            SourceFilesExtensions.Add(".gradle");

            // Show resource files in project
            AdditionalSourceRootPaths.Add(Path.Combine(Globals.TmpDirectory, @"projects\[project.Name]"));
        }
Beispiel #7
0
    public Common()
    {
        AddTargets(
            new Target(
                Platform.win32 | Platform.win64,
                DevEnv.vs2017,
                Optimization.Debug | Optimization.Release
                )
            );

        IsFileNameToLower       = false;
        IsTargetFileNameToLower = false;

        SourceFilesExtensions.Add(".ipp");
    }
        public DebugProject()
            : base(typeof(Target))
        {
            // set paths
            RootPath       = DebugProjectGenerator.DebugProjects[GetType()].ProjectFolder;
            SourceRootPath = RootPath;

            // add selected source files
            SourceFiles.AddRange(DebugProjectGenerator.DebugProjects[GetType()].ProjectFiles);

            // ensure that no file will be automagically added
            SourceFilesExtensions.Clear();
            ResourceFilesExtensions.Clear();
            PRIFilesExtensions.Clear();
            ResourceFiles.Clear();
            NoneExtensions.Clear();

            AddTargets(DebugProjectGenerator.GetTargets());
        }
Beispiel #9
0
        public CustomBuildStepProject()
        {
            Name           = "CustomBuildStep";
            SourceRootPath = @"[project.SharpmakeCsPath]\codebase";
            SourceFilesExtensions.Add(".bat");

            // need to add it explicitly since it's gonna be generated it doesn't exist yet
            SourceFiles.Add(@"[project.SourceRootPath]\main.cpp");

            AddTargets(
                new Target(
                    Platform.win64,
                    DevEnv.vs2017,
                    Optimization.Debug | Optimization.Release,
                    OutputType.Lib,
                    Blob.NoBlob,
                    BuildSystem.MSBuild | BuildSystem.FastBuild
                    )
                );
        }
Beispiel #10
0
        public ExePackaging() : base(typeof(CommonTarget))
        {
            DeployProject = true;

            Name = "exepackaging";

            SourceRootPath = Path.Combine(ProjectRootPath, @"codebase\temp\projects\" + Name);

            if (!Directory.Exists(SourceRootPath))
            {
                Directory.CreateDirectory(SourceRootPath);
            }

            AndroidManifest          = "AndroidManifest.xml";
            AntBuildXml              = "build.xml";
            AntProjectPropertiesFile = "project.properties";

            SourceFilesExtensions.Add(".xml");
            SourceFilesExclude.Add("AndroidManifest.xml", "build.xml");

            AddTargets(CommonTarget.GetAndroidTargets());
        }
Beispiel #11
0
    public AmigoEngine()
    {
        Name = "Engine";

        RootPath       = @"[project.SharpmakeCsPath]\..\..";
        SourceRootPath = @"[project.RootPath]\Source\Engine";

        // Shader files
        SourceFilesExtensions.Add(".hlsl");
        SourceFilesExcludeRegex.Add(@".*\.generated\.h");

        AddTargets(new Target(
                       Platform.win64,
                       DevEnv.vs2017,
                       Optimization.Debug | Optimization.Release,
                       OutputType.Lib,
                       Blob.NoBlob,
                       BuildSystem.MSBuild,
                       DotNetFramework.v4_5));

        // if set to true, dependencies that the project uses will be copied to the output directory
        DependenciesCopyLocal = DependenciesCopyLocalTypes.None;
    }
Beispiel #12
0
        public DebugProject()
            : base(typeof(Target), typeof(Configuration), isInternal: true)
        {
            _projectInfo = DebugProjectGenerator.DebugProjects[GetType()];

            // set paths
            RootPath       = _projectInfo.ProjectFolder;
            SourceRootPath = RootPath;

            // add selected source files
            SourceFiles.AddRange(_projectInfo.ProjectFiles);

            // ensure that no file will be automagically added
            SourceFilesExtensions.Clear();
            ResourceFilesExtensions.Clear();
            PRIFilesExtensions.Clear();
            ResourceFiles.Clear();
            NoneExtensions.Clear();
            VsctExtension.Clear();

            Name = _projectInfo.DisplayName;

            AddTargets(DebugProjectGenerator.GetTargets());
        }
Beispiel #13
0
        public ExePackaging() : base(typeof(CommonTarget))
        {
            DeployProject = true;

            Name = "exepackaging";

            SourceRootPath = Path.Combine(ProjectRootPath, @"codebase\temp\projects\" + Name);

            if (!Directory.Exists(SourceRootPath))
            {
                Directory.CreateDirectory(SourceRootPath);
            }

            AndroidManifest          = "AndroidManifest.xml";
            AntBuildXml              = "build.xml";
            AntProjectPropertiesFile = "project.properties";

            SourceFilesExtensions.Add(".xml");
            SourceFilesExclude.Add("AndroidManifest.xml", "build.xml");

            AddTargets(CommonTarget.GetAndroidTargets());

            //the plugin and gradle version are good and stable version to be used with Android libraries,
            //we don't want to use the default version on VS(ver. 0.4.0 and 2.8 respectively) since it is quite old
            GradlePlugin  = "gradle:4.2.0";
            GradleVersion = "6.7.1";

            // Path to the Gradle template files
            GradleTemplateFiles.Add(@"app\src\main\AndroidManifest.xml.template");
            GradleTemplateFiles.Add(@"app\build.gradle.template");
            GradleTemplateFiles.Add(@"build.gradle.template");
            GradleTemplateFiles.Add(@"settings.gradle.template");
            GradleTemplateFiles.Add(@"gradle\wrapper\gradle-wrapper.properties.template");

            ResourceFiles.Add(@"app\src\main\res\values\strings.xml");
        }