Example #1
0
        private void CopyTemplates()
        {
            Section("Copy Templates");

            using (var x = new FileMgr(Path.Combine(mSourcePath, @"Cosmos.VS.Package\obj\Debug"), mVsipPath)) {
                x.Copy("CosmosProject (C#).zip");
                x.Copy("CosmosKernel (C#).zip");
                x.Copy("CosmosProject (F#).zip");
                x.Copy("Cosmos.zip");
                x.Copy("CosmosProject (VB).zip");
                x.Copy("CosmosKernel (VB).zip");
                x.Copy(mSourcePath + @"XSharp.VS\Template\XSharpFileItem.zip");
            }
        }
Example #2
0
        private void CompileCosmos()
        {
            string xVSIPDir     = Path.Combine(mCosmosPath, "Build", "VSIP");
            string xPackagesDir = Path.Combine(xVSIPDir, "KernelPackages");
            string xVersion     = "1.0.1";

            if (!App.IsUserKit)
            {
                xVersion += "-" + DateTime.Now.ToString("yyyyMMddHHmm");
            }

            Section("Check Nuget Packages");
            Restore(Path.Combine(mCosmosPath, @"Cosmos.sln"));

            Section("Build Cosmos");
            MSBuild(Path.Combine(mCosmosPath, @"Build.sln"), "Debug");

            Section("Compile Tools");
            Publish(Path.Combine(mSourcePath, "Cosmos.Build.MSBuild"), Path.Combine(xVSIPDir, "MSBuild"));
            Publish(Path.Combine(mSourcePath, "IL2CPU"), Path.Combine(xVSIPDir, "IL2CPU"));
            Publish(Path.Combine(mSourcePath, "XSharp.Compiler"), Path.Combine(xVSIPDir, "XSharp"));
            Publish(Path.Combine(mCosmosPath, "Tools", "NASM"), Path.Combine(xVSIPDir, "NASM"));

            Section("Compile Kernel");
            Pack(Path.Combine(mSourcePath, "Cosmos.Common"), xPackagesDir, xVersion);
            Pack(Path.Combine(mSourcePath, "Cosmos.Core"), xPackagesDir, xVersion);
            Pack(Path.Combine(mSourcePath, "Cosmos.Core.Common"), xPackagesDir, xVersion);
            Pack(Path.Combine(mSourcePath, "Cosmos.Core.Memory"), xPackagesDir, xVersion);
            Pack(Path.Combine(mSourcePath, "Cosmos.Core.Plugs"), xPackagesDir, xVersion);
            Pack(Path.Combine(mSourcePath, "Cosmos.Core_Asm"), xPackagesDir, xVersion);
            Pack(Path.Combine(mSourcePath, "Cosmos.Debug.Kernel"), xPackagesDir, xVersion);
            Pack(Path.Combine(mSourcePath, "Cosmos.Debug.Kernel.Plugs.Asm"), xPackagesDir, xVersion);
            Pack(Path.Combine(mSourcePath, "Cosmos.HAL"), xPackagesDir, xVersion);
            Pack(Path.Combine(mSourcePath, "Cosmos.IL2CPU.Plugs"), xPackagesDir, xVersion);
            Pack(Path.Combine(mSourcePath, "Cosmos.System"), xPackagesDir, xVersion);
            Pack(Path.Combine(mSourcePath, "Cosmos.System.Plugs"), xPackagesDir, xVersion);

            Section("Populate bin cache");
            using (var x = new FileMgr(mVsipPath, mBinCachePath)) {
                x.Copy("Cosmos.Assembler.dll");
                x.Copy("Cosmos.Debug.Kernel.dll");
                x.Copy("Cosmos.IL2CPU.dll");
                x.Copy("Cosmos.IL2CPU.Plugs.dll");
                x.Copy("Cosmos.System.dll");
                x.Copy("XSharp.Common.dll");
            }
        }