mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-23 06:18:54 +00:00
This commit is contained in:
parent
d5f19259f1
commit
fa1e84a109
16 changed files with 229 additions and 33 deletions
|
|
@ -36,7 +36,8 @@ xcopy /Y ..\..\source\Cosmos\Cosmos.Sys.Plugs\bin\Debug\Cosmos.Sys.Plugs.* .
|
|||
xcopy /Y ..\..\source\Cosmos.Kernel.FileSystems\bin\debug\Cosmos.Sys.FileSystem.* .
|
||||
xcopy /Y ..\..\source2\VSIP\Cosmos.VS.Package\bin\Debug\Cosmos.VS.Package.* .
|
||||
xcopy /Y "..\..\source2\VSIP\Cosmos.VS.Package\obj\Debug\CosmosProject (C#).zip" .
|
||||
xcopy /Y "..\..\source2\VSIP\Cosmos.VS.Package\obj\Debug\CosmosExpress.zip" .
|
||||
xcopy /Y "..\..\source2\VSIP\Cosmos.VS.Package\obj\Debug\Cosmos.zip" .
|
||||
xcopy /Y "..\..\source2\VSIP\Cosmos.VS.Package\obj\Debug\CosmosKernel (C#).zip" .
|
||||
REM splitup compiler:
|
||||
xcopy /Y ..\..\source2\Compiler\Cosmos.Compiler.Assembler\bin\debug\Cosmos.Compiler.Assembler.* .
|
||||
xcopy /Y ..\..\source2\Compiler\Cosmos.Compiler.Assembler.X86\bin\debug\Cosmos.Compiler.Assembler.X86.* .
|
||||
|
|
|
|||
|
|
@ -36,7 +36,9 @@ xcopy /Y ..\..\source\Cosmos\Cosmos.Sys.Plugs\bin\Debug\Cosmos.Sys.Plugs.* .
|
|||
xcopy /Y ..\..\source\Cosmos.Kernel.FileSystems\bin\debug\Cosmos.Sys.FileSystem.* .
|
||||
xcopy /Y ..\..\source2\VSIP\Cosmos.VS.Package\bin\Debug\Cosmos.VS.Package.* .
|
||||
xcopy /Y "..\..\source2\VSIP\Cosmos.VS.Package\obj\Debug\CosmosProject (C#).zip" .
|
||||
xcopy /Y "..\..\source2\VSIP\Cosmos.VS.Package\obj\Debug\CosmosExpress.zip" .
|
||||
xcopy /Y "..\..\source2\VSIP\Cosmos.VS.Package\obj\Debug\Cosmos.zip" .
|
||||
xcopy /Y "..\..\source2\VSIP\Cosmos.VS.Package\obj\Debug\CosmosKernel (C#).zip" .
|
||||
xcopy /Y "..\..\source2\VSIP\Cosmos.VS.Package\obj\Debug\CosmosKernel (C#).zip" ".\CosmosKernel (C#) 2.zip"
|
||||
REM splitup compiler:
|
||||
xcopy /Y ..\..\source2\Compiler\Cosmos.Compiler.Assembler\bin\debug\Cosmos.Compiler.Assembler.* .
|
||||
xcopy /Y ..\..\source2\Compiler\Cosmos.Compiler.Assembler.X86\bin\debug\Cosmos.Compiler.Assembler.X86.* .
|
||||
|
|
@ -53,4 +55,4 @@ IF EXIST "C:\Program Files\Inno Setup 5\ISCC.exe" (
|
|||
) ELSE (
|
||||
"C:\Program Files (x86)\Inno Setup 5\ISCC" /Q ..\..\Setup2\Cosmos.iss /dBuildConfiguration=Userkit
|
||||
)
|
||||
cd ..\..\Setup2
|
||||
cd ..\..\Setup2
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@ var
|
|||
__VSNET2008_PATH,
|
||||
__VSNET2010_PATH,
|
||||
__VSNET2008_BASE_PATH,
|
||||
__VSNET2010_BASE_PATH: string;
|
||||
__VSNET2010_BASE_PATH,
|
||||
__CSharpExpress2008ProjectTemplatePath: string;
|
||||
|
||||
procedure InitializePaths;
|
||||
begin
|
||||
|
|
@ -59,6 +60,10 @@ __NET_FRAMEWORK4_INSTALLED := ExpandConstant('{reg:HKLM\SOFTWARE\Microsoft\.NETF
|
|||
__VSNET2008_BASE_PATH := ExpandFilename(AddBackslash(__VSNET2008_PATH)+'..\..');
|
||||
if __VSNET2010 then
|
||||
__VSNET2010_BASE_PATH := ExpandFilename(AddBackslash(__VSNET2010_PATH)+'..\..');
|
||||
|
||||
RegQueryStringValue(HKCU, 'SOFTWARE\Microsoft\VCSExpress\9.0', 'UserProjectTemplatesLocation', __CSharpExpress2008ProjectTemplatePath);
|
||||
|
||||
StringChangeEx(__CSharpExpress2008ProjectTemplatePath, '%USERPROFILE%', GetEnv('USERPROFILE'), False);
|
||||
|
||||
end;
|
||||
|
||||
|
|
@ -120,12 +125,20 @@ end;
|
|||
|
||||
function Vb2010_Installed: Boolean;
|
||||
begin
|
||||
result := RegValueExists(HKLM,'SOFTWARE\Microsoft\VisualStudio\10.0\Projects\{F184B08F-C81C-45f6-A57F-5ABD9991F28F}','Package');
|
||||
result := RegValueExists(HKLM,'SOFTWARE\Microsoft\VisualStudio\10.0\Projects\{F184B08F-C81C-45f6-A57F-5ABD9991F28F}','Package');
|
||||
end;
|
||||
|
||||
function csharp2008_Installed: Boolean;
|
||||
function booltostr(value: Boolean) : string;
|
||||
begin
|
||||
result := RegValueExists(HKLM,'SOFTWARE\Microsoft\VisualStudio\9.0\Projects\{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}','Package');
|
||||
if value then
|
||||
Result := 'true'
|
||||
else
|
||||
Result := 'false';
|
||||
end;
|
||||
|
||||
function csharp2008_Installed(test: string): Boolean;
|
||||
begin
|
||||
result := RegValueExists(HKLM,'SOFTWARE\Microsoft\VisualStudio\9.0\Projects\{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}','Package');
|
||||
end;
|
||||
|
||||
function csharp2010_Installed: Boolean;
|
||||
|
|
@ -210,6 +223,20 @@ begin
|
|||
Result := __NET_FRAMEWORK4_INSTALLED;
|
||||
end;
|
||||
|
||||
function IsCSharpExpress2008Installed(dummy: string): boolean;
|
||||
begin
|
||||
if (Length(Trim(__CSharpExpress2008ProjectTemplatePath)) > 0) then
|
||||
Result := True
|
||||
else
|
||||
Result := False;
|
||||
end;
|
||||
|
||||
function GetCSharpExpress2008ProjectTemplatePath(dummy: string) : string;
|
||||
begin
|
||||
InitializePaths;
|
||||
Result := __CSharpExpress2008ProjectTemplatePath;
|
||||
SaveStringToFile('c:\setup.log', Format('C# Express TemplatePath: "%s"'#13#10, [Result]), true);
|
||||
end;
|
||||
|
||||
function InitializeSetup: Boolean;
|
||||
begin
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ UninstallLogMode=overwrite
|
|||
ChangesAssociations=yes
|
||||
|
||||
#include "Code.inc"
|
||||
#include "Events.inc"
|
||||
|
||||
[Languages]
|
||||
Name: en; MessagesFile: compiler:Default.isl; InfoBeforeFile: .\setup2\Readme.txt
|
||||
|
|
@ -129,6 +130,7 @@ tw.BeveledLabel=Chinese Traditional
|
|||
|
||||
[Dirs]
|
||||
Name: {code:VSNET2008_PATH|}\ProjectTemplates\Cosmos; Flags: uninsalwaysuninstall
|
||||
Name: {app}; Flags: uninsalwaysuninstall;
|
||||
|
||||
[Files]
|
||||
Source: .\Build\Tools\*.exe; DestDir: {app}\Build\Tools; Flags: ignoreversion uninsremovereadonly
|
||||
|
|
@ -147,10 +149,13 @@ Source: .\Build\ISO\isolinux.*; DestDir: {app}\Build\ISO
|
|||
Source: .\Build\ISO\mboot.c32; DestDir: {app}\Build\ISO
|
||||
|
||||
; Templates
|
||||
Source: ".\Build\VSIP\CosmosProject (C#).zip"; DestDir: {code:VSNET2008_PATH|}\ProjectTemplates\Cosmos; Flags: ignoreversion uninsremovereadonly; Check: csharp2008_Installed;
|
||||
Source: ".\Build\VSIP\CosmosExpress.zip"; DestDir: {code:VSNET2008_PATH|}\ProjectTemplates\Cosmos; Flags: ignoreversion uninsremovereadonly;
|
||||
|
||||
|
||||
; ; Install files into VS Integrated Shell (which includes full Visual Studio)
|
||||
Source: ".\Build\VSIP\CosmosProject (C#).zip"; DestDir: {code:VSNET2008_PATH|}\ProjectTemplates\Cosmos; Flags: ignoreversion uninsremovereadonly; Check: csharp2008_Installed('dummy');
|
||||
Source: ".\Build\VSIP\Cosmos.zip"; DestDir: {code:VSNET2008_PATH|}\ProjectTemplates\Cosmos; Flags: ignoreversion uninsremovereadonly;
|
||||
Source: ".\Build\VSIP\CosmosKernel (C#).zip"; DestDir: {code:VSNET2008_PATH|}\ProjectTemplates\Cosmos; Flags: ignoreversion uninsremovereadonly; Check: csharp2008_Installed('dummy');
|
||||
; ; Install templates into C# Express
|
||||
Source: ".\Build\VSIP\CosmosKernel (C#).zip"; DestDir: {code:GetCSharpExpress2008ProjectTemplatePath|}; DestName: "CosmosKernel (C#).zip"; Flags: ignoreversion uninsremovereadonly; Check: IsCSharpExpress2008Installed('dummy');
|
||||
Source: ".\Build\VSIP\Cosmos.zip"; DestDir: c:\; Flags: ignoreversion uninsremovereadonly
|
||||
|
||||
|
||||
[Registry]
|
||||
|
|
@ -253,5 +258,4 @@ Root: HKCR; SubKey: Cosmos.ProjectFile\shell\open\command; ValueType: string; Va
|
|||
[Run]
|
||||
Filename: {code:VSNET2008_PATH|}\devenv.exe; Parameters: /setup; Flags: waituntilterminated
|
||||
|
||||
[UninstallRun]
|
||||
Filename: {code:VSNET2008_PATH|}\devenv.exe; Parameters: /setup; Flags: waituntilterminated
|
||||
|
||||
|
|
|
|||
|
|
@ -235,17 +235,20 @@ namespace Cosmos.Build.MSBuild
|
|||
if (xType.Name == "Kernel")
|
||||
{
|
||||
var xMethod = xType.GetMethod("Boot");
|
||||
if (!xMethod.IsStatic)
|
||||
if (xMethod != null)
|
||||
{
|
||||
continue;
|
||||
if (!xMethod.IsStatic)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (xInitMethod != null)
|
||||
{
|
||||
// already found an init method. log error.
|
||||
Log.LogError("Project has multiple Kernel.Boot methods!");
|
||||
return false;
|
||||
}
|
||||
xInitMethod = xMethod;
|
||||
}
|
||||
if (xInitMethod != null)
|
||||
{
|
||||
// already found an init method. log error.
|
||||
Log.LogError("Project has multiple Kernel.Boot methods!");
|
||||
return false;
|
||||
}
|
||||
xInitMethod = xMethod;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -175,6 +175,25 @@
|
|||
<None Include="Key.snk" />
|
||||
<Content Include="PLKResponse.html" />
|
||||
<Content Include="Resources\Cosmos.ico" />
|
||||
<Content Include="Templates\Projects\Readme.txt" />
|
||||
<ZipItem Include="Templates\Projects\CosmosKernel %28C#%29\Readme.txt">
|
||||
<RootPath>Templates\Projects\CosmosKernel %28C#%29</RootPath>
|
||||
</ZipItem>
|
||||
<ZipItem Include="Templates\Projects\CosmosKernel %28C#%29\Kernel.ico">
|
||||
<RootPath>Templates\Projects\CosmosKernel %28C#%29</RootPath>
|
||||
</ZipItem>
|
||||
<ZipItem Include="Templates\Projects\CosmosKernel %28C#%29\AssemblyInfo.cs">
|
||||
<RootPath>Templates\Projects\CosmosKernel %28C#%29</RootPath>
|
||||
</ZipItem>
|
||||
<ZipItem Include="Templates\Projects\CosmosKernel %28C#%29\Kernel.cs">
|
||||
<RootPath>Templates\Projects\CosmosKernel %28C#%29</RootPath>
|
||||
</ZipItem>
|
||||
<ZipItem Include="Templates\Projects\CosmosKernel %28C#%29\CSharpProject.csproj">
|
||||
<RootPath>Templates\Projects\CosmosKernel %28C#%29</RootPath>
|
||||
</ZipItem>
|
||||
<ZipItem Include="Templates\Projects\CosmosKernel %28C#%29\CSharpProj.vstemplate">
|
||||
<RootPath>Templates\Projects\CosmosKernel %28C#%29</RootPath>
|
||||
</ZipItem>
|
||||
<ZipItem Include="Templates\Projects\CosmosProject %28C#%29\Kernel.ico">
|
||||
<RootPath>Templates\Projects\CosmosProject %28C#%29</RootPath>
|
||||
</ZipItem>
|
||||
|
|
@ -190,17 +209,16 @@
|
|||
<ZipItem Include="Templates\Projects\CosmosProject %28C#%29\AssemblyInfo.cs">
|
||||
<RootPath>Templates\Projects\CosmosProject %28C#%29</RootPath>
|
||||
</ZipItem>
|
||||
<ZipItem Include="Templates\Projects\CosmosExpress\CosmosProject.Cosmos">
|
||||
<RootPath>Templates\Projects\CosmosExpress</RootPath>
|
||||
</ZipItem>
|
||||
<ZipItem Include="Templates\Projects\CosmosExpress\Kernel.ico">
|
||||
<RootPath>Templates\Projects\CosmosExpress</RootPath>
|
||||
<ZipItem Include="Templates\Projects\Cosmos\CosmosProject.Cosmos">
|
||||
<RootPath>Templates\Projects\Cosmos</RootPath>
|
||||
</ZipItem>
|
||||
<ZipItem Include="Templates\Projects\CosmosExpress\CosmosExpress.vstemplate">
|
||||
<RootPath>Templates\Projects\CosmosExpress</RootPath>
|
||||
</ZipItem>
|
||||
|
||||
<None Include="Templates\Projects\CosmosProject %28C#%29\Proj\CosmosProj.vstemplate">
|
||||
<ZipItem Include="Templates\Projects\Cosmos\Kernel.ico">
|
||||
<RootPath>Templates\Projects\Cosmos</RootPath>
|
||||
</ZipItem>
|
||||
<ZipItem Include="Templates\Projects\Cosmos\Cosmos.vstemplate">
|
||||
<RootPath>Templates\Projects\Cosmos</RootPath>
|
||||
</ZipItem>
|
||||
<None Include="Templates\Projects\CosmosProject %28C#%29\Proj\CosmosProj.vstemplate">
|
||||
<RootPath>Templates\Projects\CosmosProject %28C#%29</RootPath>
|
||||
</None>
|
||||
<EmbeddedResource Include="Templates\CosmosProject.Cosmos">
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<VSTemplate Version="2.0.0" Type="Project" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005">
|
||||
<TemplateData>
|
||||
<Name>Cosmos Express Project</Name>
|
||||
<Name>Cosmos Project</Name>
|
||||
<Description>A project for running your code as operating system. Does not include any language.</Description>
|
||||
<Icon>Kernel.ico</Icon>
|
||||
<ProjectType>Cosmos</ProjectType>
|
||||
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
|
|
@ -0,0 +1,36 @@
|
|||
using System;
|
||||
using System.Reflection;
|
||||
using System.Resources;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Package Name")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Company")]
|
||||
[assembly: AssemblyProduct("Package Name")]
|
||||
[assembly: AssemblyCopyright("")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: ComVisible(false)]
|
||||
[assembly: CLSCompliant(false)]
|
||||
[assembly: NeutralResourcesLanguage("en-US")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
<VSTemplate Version="2.0.0" Type="Project" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005">
|
||||
<TemplateData>
|
||||
<Name>Cosmos Kernel (C#)</Name>
|
||||
<Description>A project for creating a Cosmos Kernel</Description>
|
||||
<Icon>Kernel.ico</Icon>
|
||||
<ProjectType>CSharp</ProjectType>
|
||||
<!--<SortOrder>50</SortOrder>
|
||||
<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>-->
|
||||
<CreateNewFolder>true</CreateNewFolder>
|
||||
<DefaultName>CSharpKernel</DefaultName>
|
||||
<ProvideDefaultName>true</ProvideDefaultName>
|
||||
</TemplateData>
|
||||
<TemplateContent>
|
||||
<Project File="CSharpProject.csproj" ReplaceParameters="true">
|
||||
<ProjectItem ReplaceParameters="true">AssemblyInfo.cs</ProjectItem>
|
||||
<ProjectItem ReplaceParameters="true" OpenInEditor="true">Kernel.cs</ProjectItem>
|
||||
</Project>
|
||||
</TemplateContent>
|
||||
</VSTemplate>
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>$guid1$</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>$safeprojectname$</RootNamespace>
|
||||
<AssemblyName>$safeprojectname$</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System"/>
|
||||
<Reference Include="System.Data"/>
|
||||
<Reference Include="System.Xml"/>
|
||||
|
||||
<Reference Include="Cosmos.Hardware, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983, processorArchitecture=x86" />
|
||||
<Reference Include="Cosmos.Kernel, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983, processorArchitecture=x86" />
|
||||
<Reference Include="Cosmos.Sys, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983, processorArchitecture=x86" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Kernel.cs" />
|
||||
|
||||
<Compile Include="AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace $safeprojectname$
|
||||
{
|
||||
public class Kernel
|
||||
{
|
||||
public static void Boot()
|
||||
{
|
||||
// Boot the Cosmos kernel:
|
||||
Cosmos.Sys.Boot xBoot = new Cosmos.Sys.Boot();
|
||||
xBoot.Execute();
|
||||
|
||||
Console.WriteLine("Cosmos booted successfully. Type a line of text to get it echoed back:");
|
||||
string xResult = Console.ReadLine();
|
||||
Console.Write("Text typed: ");
|
||||
Console.WriteLine(xResult);
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
|
|
@ -0,0 +1,2 @@
|
|||
$GeneratedGuid1$ .Cosmos id
|
||||
$GeneratedGuid2$ .csproj id
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
Overview of templates.
|
||||
|
||||
+ Cosmos
|
||||
Only generates a .Cosmos file
|
||||
+ CosmosKernel (C#)
|
||||
Only generates a .csproj file
|
||||
+ CosmosProject (C#)
|
||||
Generates both a .csproj and a .Cosmos file.
|
||||
Loading…
Reference in a new issue