mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-19 20:39:01 +00:00
79 lines
2.6 KiB
C#
79 lines
2.6 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using Cosmos.Build.Installer;
|
|
using System.IO;
|
|
|
|
namespace Cosmos.Build.Builder {
|
|
public class CosmosTask : Task {
|
|
protected string mCosmosPath;
|
|
|
|
public CosmosTask(string aCosmosPath) {
|
|
mCosmosPath = aCosmosPath;
|
|
}
|
|
|
|
protected override void DoRun() {
|
|
string xOutputPath = mCosmosPath + @"\Build\VSIP";
|
|
|
|
Section("Compiling Cosmos");
|
|
StartConsole(Paths.Windows + @"\Microsoft.NET\Framework\v4.0.30319\msbuild.exe", mCosmosPath + @"\source\Cosmos.sln /maxcpucount /verbosity:normal /nologo /p:Configuration=Bootstrap /p:Platform=x86 /p:OutputPath=" + Quoted(xOutputPath));
|
|
|
|
CD(xOutputPath);
|
|
|
|
Section("Copying files");
|
|
// Copy templates
|
|
// .iss does some of this as well.. why some here? And why is VB disabled in .iss?
|
|
SrcPath = mCosmosPath + @"source2\VSIP\Cosmos.VS.Package\obj\x86\Debug";
|
|
Copy("CosmosProject (C#).zip");
|
|
Copy("CosmosKernel (C#).zip");
|
|
Copy("CosmosProject (F#).zip");
|
|
Copy("Cosmos.zip");
|
|
Copy("CosmosProject (VB).zip");
|
|
Copy("CosmosKernel (VB).zip");
|
|
|
|
Echo();
|
|
Echo();
|
|
Echo();
|
|
|
|
Echo("Removing old Cosmos");
|
|
//IF NOT EXIST ..\..\Setup2\Output\CosmosUserKit.exe goto afterSetupDelete
|
|
// ren ..\..\Setup2\Output\CosmosUserKit.exe tmp 2> nul
|
|
// if ERRORLEVEL 1 (
|
|
// echo Old COSMOS setup could not be removed, it is locked.
|
|
// pause
|
|
// exit /B 1
|
|
// )
|
|
// del /F ..\..\Setup2\Output\tmp
|
|
//:afterSetupDelete
|
|
|
|
Echo("Searching for Inno");
|
|
//IF NOT EXIST "%ProgFiles%\Inno Setup 5\ISCC.exe" (
|
|
// echo Cannot find Inno Setup!
|
|
// pause
|
|
// exit
|
|
//)
|
|
|
|
Echo("Creating setup.exe");
|
|
//"%ProgFiles%\Inno Setup 5\ISCC" /Q ..\..\Setup2\Cosmos.iss /dBuildConfiguration=Devkit
|
|
|
|
Echo("Running setup.exe");
|
|
//..\..\Setup2\Output\CosmosUserKit.exe /SILENT
|
|
|
|
Echo("Install Completed.");
|
|
|
|
// Relaunch VS
|
|
//IF EXIST "%ProgFiles%\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe" (
|
|
// IF "%1"=="HIVE" goto ResetHive
|
|
// goto ResetHiveAfter
|
|
//:ResetHive
|
|
Echo("Resetting hive keys");
|
|
// "%ProgFiles%\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe" /setup /rootsuffix Exp /ranu
|
|
//:ResetHiveAfter
|
|
Echo("Launching Visual Studio");
|
|
// echo You can close this window now.
|
|
// "%ProgFiles%\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe" ..\..\source\Cosmos.sln
|
|
//)
|
|
}
|
|
}
|
|
}
|