Fixed the Visual Basic kernel template.

Added an F# kernel template.
This commit is contained in:
José Pedro 2017-12-29 20:27:20 +00:00
parent 534d851a61
commit e5f2b91ed7
No known key found for this signature in database
GPG key ID: B8247B9301707B83
6 changed files with 80 additions and 2 deletions

View file

@ -0,0 +1,36 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<BinFormat>elf</BinFormat>
<DebugEnabled>False</DebugEnabled>
<DebugMode>Source</DebugMode>
<TraceMode>User</TraceMode>
<EnableGDB>False</EnableGDB>
<StartCosmosGDB>False</StartCosmosGDB>
<Deployment>ISO</Deployment>
<VisualStudioDebugPort>Pipe: Cosmos\Serial</VisualStudioDebugPort>
<StackCorruptionDetectionEnabled>True</StackCorruptionDetectionEnabled>
<StackCorruptionDetectionLevel>MethodFooters</StackCorruptionDetectionLevel>
<IgnoreDebugStubAttribute>False</IgnoreDebugStubAttribute>
<CosmosDebugPort>Serial: COM1</CosmosDebugPort>
<Launch>VMware</Launch>
<Profile>VMware</Profile>
<Description>Use VMware Player or Workstation to deploy and debug.</Description>
<PxeInterface>192.168.0.8</PxeInterface>
</PropertyGroup>
<ItemGroup>
<Compile Include="Kernel.fs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Cosmos.Build" Version="*" />
<PackageReference Include="Cosmos.Debug.Kernel" Version="*" />
<PackageReference Include="Cosmos.System2" Version="*" />
</ItemGroup>
</Project>

View file

@ -0,0 +1,21 @@
<VSTemplate Version="3.0.0" Type="Project" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005">
<TemplateData>
<Name Package="{29194faf-90ce-454b-bc53-08b722f1dadf}" ID="7" />
<Description Package="{29194faf-90ce-454b-bc53-08b722f1dadf}" ID="8" />
<Icon Package="{29194faf-90ce-454b-bc53-08b722f1dadf}" ID="9" />
<ProjectType>FSharp</ProjectType>
<CreateNewFolder>true</CreateNewFolder>
<DefaultName>CosmosKernel</DefaultName>
<ProvideDefaultName>true</ProvideDefaultName>
<CreateInPlace>true</CreateInPlace>
<PromptForSaveOnCreation>true</PromptForSaveOnCreation>
</TemplateData>
<TemplateContent>
<Project File="FSharpProject.fsproj">
<ProjectItem ReplaceParameters="true" OpenInEditor="true">Kernel.fs</ProjectItem>
</Project>
</TemplateContent>
</VSTemplate>

View file

@ -0,0 +1,12 @@
namespace $safeprojectname$
open System
type Kernel() =
inherit Cosmos.System.Kernel()
override u.BeforeRun() = (Console.WriteLine("Cosmos booted successfully. Type a line of text to get it echoed back.");)
override u.Run() =
Console.Write("Input: ");
let input = Console.ReadLine();
Console.Write("Text typed: ");
Console.WriteLine(input);

View file

@ -13,7 +13,7 @@
</TemplateData>
<TemplateContent>
<Project File="VBProject.vbproj">
<Project File="VisualBasicProject.vbproj">
<ProjectItem ReplaceParameters="true" OpenInEditor="true">Kernel.vb</ProjectItem>
</Project>
</TemplateContent>

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View file

@ -136,4 +136,13 @@
<data name="6" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\VisualBasicProject.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
<data name="7" xml:space="preserve">
<value>Cosmos Kernel</value>
</data>
<data name="8" xml:space="preserve">
<value>A project for creating an F# Cosmos Kernel.</value>
</data>
<data name="9" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\FSharpProject.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>