Skip to content

Commit

Permalink
Get references.
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesbetros committed Jan 22, 2017
1 parent c095cbb commit 296ca05
Show file tree
Hide file tree
Showing 86 changed files with 544 additions and 522 deletions.
3 changes: 3 additions & 0 deletions Cosmos.sln
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "Docs", "Docs\", "{67E7DEF0-
Release.AspNetCompiler.FixedNames = "false"
Release.AspNetCompiler.Debug = "False"
VWDPort = "8987"
SlnRelativePath = "Docs\"
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Unit Tests", "Unit Tests", "{9637A680-F8E9-4925-A4E4-00045205EC04}"
Expand All @@ -207,7 +208,9 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{57B83EE4-164F-4BB2-8AFA-76445333A0E4}"
ProjectSection(SolutionItems) = preProject
..\Demos\zMachine\Frotz.Net\source\ColorPicker.dll = ..\Demos\zMachine\Frotz.Net\source\ColorPicker.dll
global.json = global.json
..\Demos\zMachine\Frotz.Net\source\Notes.txt = ..\Demos\zMachine\Frotz.Net\source\Notes.txt
nuget.config = nuget.config
..\Demos\zMachine\Frotz.Net\source\todos.txt = ..\Demos\zMachine\Frotz.Net\source\todos.txt
EndProjectSection
EndProject
Expand Down
57 changes: 57 additions & 0 deletions Demos/Guess/Cosmos.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?xml version="1.0"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">
<PropertyGroup>
<DebugMode Condition="$(DebugMode) == ''">Source</DebugMode>
<DebugEnabled Condition="$(DebugEnabled) == ''">True</DebugEnabled>
<StackCorruptionDetectionEnabled Condition="$(StackCorruptionDetectionEnabled) == ''">True</StackCorruptionDetectionEnabled>
<StackCorruptionDetectionLevel Condition="$(StackCorruptionDetectionLevel) == ''">All</StackCorruptionDetectionLevel>
<IgnoreDebugStubAttribute Condition="$(IgnoreDebugStubAttribute) == ''">False</IgnoreDebugStubAttribute>
<TraceAssemblies Condition="$(TraceAssemblies) == ''">All</TraceAssemblies>
<CosmosDir Condition="$(CosmosDir) == ''">$([MSBuild]::GetRegistryValue("HKEY_LOCAL_MACHINE\Software\Cosmos", "UserKit"))</CosmosDir>
<BuildToolsDir Condition="$(BuildToolsDir) == ''">$(CosmosDir)\Build\Tools</BuildToolsDir>
<VSIPDir Condition="$(VSIPDir) == ''">$(CosmosDir)\Build\VSIP</VSIPDir>
<NasmFile Condition="'$(NasmFile)' == ''">$(BuildToolsDir)\Nasm\nasm.exe</NasmFile>
<PlatformTarget Condition="'$(PlatformTarget)' == ''">AnyCPU</PlatformTarget>
<BinFormat Condition="$(BinFormat) == ''">bin</BinFormat>
<CosmosBuildTaskAssemblyFile Condition="'$(CosmosBuildTaskAssemblyFile)' == ''">$(VSIPDir)\Cosmos.Build.MSBuild.dll</CosmosBuildTaskAssemblyFile>
</PropertyGroup>

<UsingTask TaskName="Cosmos.Build.MSBuild.IL2CPU" AssemblyFile="$(CosmosBuildTaskAssemblyFile)"/>
<UsingTask TaskName="Cosmos.Build.MSBuild.NAsm" AssemblyFile="$(CosmosBuildTaskAssemblyFile)"/>
<UsingTask TaskName="Cosmos.Build.MSBuild.MakeISO" AssemblyFile="$(CosmosBuildTaskAssemblyFile)"/>
<UsingTask TaskName="Cosmos.Build.MSBuild.Ld" AssemblyFile="$(CosmosBuildTaskAssemblyFile)"/>
<UsingTask TaskName="Cosmos.Build.MSBuild.ReadNAsmMapToDebugInfo" AssemblyFile="$(CosmosBuildTaskAssemblyFile)"/>

<Target Name="CosmosDetectDependencies" Outputs="@(CosmosReferences)">
<CreateItem Include="$(TargetDir)$(Configuration)\$(TargetFramework)\*.dll">
<Output TaskParameter="Include" ItemName="CosmosReferences"/>
</CreateItem>
</Target>

<Target Name="CosmosCompile" DependsOnTargets="CosmosDetectDependencies" AfterTargets="Build">
<Error Text="File %(Compile.Identity) is set to compile, but .Cosmos projects don't compile any source themselves!" Condition="$(Compile) != ''"/>
<CreateProperty Value="true" Condition="$(BinFormat) == 'elf'">
<Output PropertyName="IsELF" TaskParameter="Value"/>
</CreateProperty>
<CreateProperty Value="false" Condition="$(BinFormat) == 'bin'">
<Output PropertyName="IsELF" TaskParameter="Value"/>
</CreateProperty>
<Cosmos.Build.MSBuild.IL2CPU DebugMode="$(DebugMode)" DebugEnabled="$(DebugEnabled)" StackCorruptionDetectionEnabled="$(StackCorruptionDetectionEnabled)" StackCorruptionDetectionLevel="$(StackCorruptionDetectionLevel)" TraceAssemblies="$(TraceAssemblies)" IgnoreDebugStubAttribute="$(IgnoreDebugStubAttribute)" DebugCom="1" UseNAsm="true" References="@(CosmosReferences)" OutputFilename="$(TargetDir)$(MSBuildProjectName).asm" EnableLogging="true" EmitDebugSymbols="$(DebugSymbols)" CosmosBuildDir="$(CosmosDir)\Build" WorkingDir="$(TargetDir)"/>
<Cosmos.Build.MSBuild.NAsm InputFile="$(TargetDir)$(MSBuildProjectName).asm" OutputFile="$(TargetDir)$(MSBuildProjectName).obj" IsELF="$(IsELF)" ExePath="$(NasmFile)"/>
<!-- ELF only -->
<!-- 16 MB 0x1000000 as per hpa (syslinux) is a good spot. For now just put some dummy values. 16 and 32 MB. Later size better. -->
<Cosmos.Build.MSBuild.Ld CosmosBuildDir="$(CosmosDir)\Build" WorkingDir="$(TargetDir)" Arguments="-Ttext 0x2000000 -Tdata 0x1000000 -e Kernel_Start -o '$(TargetDir)$(MSBuildProjectName).bin' '$(TargetDir)$(MSBuildProjectName).obj'" Condition="$(IsELF) == 'true'"/>
<Cosmos.Build.MSBuild.ExtractMapFromElfFile InputFile="$(TargetDir)$(MSBuildProjectName).bin" DebugInfoFile="$(TargetDir)$(MSBuildProjectName).cdb" WorkingDir="$(TargetDir)" CosmosBuildDir="$(CosmosDir)\Build" Condition="$(IsELF) == 'true'"/>
<CreateItem Include="$(TargetDir)$(MSBuildProjectName).bin" Condition="$(IsELF) == 'true'">
<Output TaskParameter="Include" ItemName="TempFilesToCopy"/>
</CreateItem>
<!--End of ELF only-->
<!--binary only-->
<Cosmos.Build.MSBuild.ReadNAsmMapToDebugInfo InputBaseDir="$(TargetDir)" DebugInfoFile="$(TargetDir)$(MSBuildProjectName).cdb" Condition="$(IsELF) == 'false'"/>
<Move SourceFiles="$(TargetDir)$(MSBuildProjectName).obj" DestinationFiles="$(TargetDir)$(MSBuildProjectName).bin" Condition="$(IsELF) == 'false'"/>
<!--end of binary only-->
<!-- We dont build ISO in MSBuild any more because not all targets need it and it takes time. But we do delete it, so we dont have out of date outputs. -->
<!-- <MakeISO InputFile="$(TargetDir)$(MSBuildProjectName).bin" OutputFile="$(TargetDir)$(MSBuildProjectName).iso" CosmosBuildDir="$(CosmosDir)\Build" /> -->
<Delete Files="$(TargetDir)$(MSBuildProjectName).iso"/>
</Target>
</Project>
85 changes: 44 additions & 41 deletions Demos/Guess/GuessBoot.Cosmos
Original file line number Diff line number Diff line change
@@ -1,67 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0.25420</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals">
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{5b2c0369-7a84-4113-892c-f71b50e1da12}</ProjectGuid>
<Name>GuessBoot</Name>
<OutputType>Library</OutputType>
<DefaultLanguage>en-US</DefaultLanguage>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
<BinFormat>elf</BinFormat>
<ResolveNuGetPackages>False</ResolveNuGetPackages>
<TargetFrameworkIdentifier>.NETStandard</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v1.6</TargetFrameworkVersion>
<TargetFramework>netstandard1.6</TargetFramework>
<BaseNuGetRuntimeIdentifier>win</BaseNuGetRuntimeIdentifier>
<NoStdLib>true</NoStdLib>
<NoWarn>$(NoWarn);1701</NoWarn>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj\</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<Profile>VMware</Profile>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DebugEnabled>True</DebugEnabled>
<DebugMode>Source</DebugMode>
<TraceMode>User</TraceMode>
<EnableGDB>False</EnableGDB>
<StartCosmosGDB>False</StartCosmosGDB>
<VMWareEdition>Workstation</VMWareEdition>
<OutputPath>bin\Debug\</OutputPath>
<Name>GuessBoot</Name>
<Description>Use VMware Player or Workstation to deploy and debug.</Description>
<Deployment>ISO</Deployment>
<Launch>VMware</Launch>
<VisualStudioDebugPort>Pipe: Cosmos\Serial</VisualStudioDebugPort>
<TraceAssemblies>All</TraceAssemblies>
<VMware_Name>PlaygroundBoot</VMware_Name>
<VMware_Description>Use VMware Player or Workstation to deploy and debug.</VMware_Description>
<VMware_Deployment>ISO</VMware_Deployment>
<VMware_Launch>VMware</VMware_Launch>
<VMware_DebugEnabled>True</VMware_DebugEnabled>
<VMware_DebugMode>Source</VMware_DebugMode>
<VMware_VisualStudioDebugPort>Pipe: Cosmos\Serial</VMware_VisualStudioDebugPort>
<VMware_VMwareEdition>Workstation</VMware_VMwareEdition>
<VMware_OutputPath>bin\Debug\</VMware_OutputPath>
<VMware_TraceAssemblies>All</VMware_TraceAssemblies>
<VMware_EnableGDB>False</VMware_EnableGDB>
<VMware_StartCosmosGDB>False</VMware_StartCosmosGDB>
<StackCorruptionDetectionEnabled>True</StackCorruptionDetectionEnabled>
<VMware_StackCorruptionDetectionEnabled>True</VMware_StackCorruptionDetectionEnabled>
<StackCorruptionDetectionLevel>MethodFooters</StackCorruptionDetectionLevel>
<IgnoreDebugStubAttribute>False</IgnoreDebugStubAttribute>
<CosmosDebugPort>Serial: COM1</CosmosDebugPort>
<VMware_CosmosDebugPort>Serial: COM1</VMware_CosmosDebugPort>
<Launch>VMware</Launch>
<Profile>VMware</Profile>
<Description>Use VMware Player or Workstation to deploy and debug.</Description>
</PropertyGroup>
<ItemGroup>
<None Include="GuessBoot.project.json" />
</ItemGroup>
<ItemGroup>
<Content Include="Cosmos.bxrc">
<SubType>Content</SubType>
</Content>
<None Include="Cosmos.targets" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\source\Cosmos.Core.Plugs\Cosmos.Core.Plugs.csproj">
<Name>Cosmos.Core.Plugs</Name>
<Project>{09273ea1-d3ea-4ccf-aabc-4a209eb367b7}</Project>
<ProjectReference Include="..\..\source\Cosmos.Core.Plugs.Asm\Cosmos.Core.Plugs.Asm.xproj">
<Name>Cosmos.Core.Plugs.Asm</Name>
<Project>{2a24da41-0d3a-48a6-83d5-8584a1d4ca94}</Project>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="..\..\source\Cosmos.System.Plugs\Cosmos.System.Plugs.csproj">
<Name>Cosmos.System.Plugs</Name>
<Project>{e52f6162-5094-49f4-a685-d08e5480bac2}</Project>
<ProjectReference Include="..\..\source\Cosmos.Debug.Kernel.Plugs.Asm\Cosmos.Debug.Kernel.Plugs.Asm.xproj">
<Name>Cosmos.Debug.Kernel.Plugs.Asm</Name>
<Project>{7549d7f8-58a3-4f4f-8544-def2abf79a0b}</Project>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="..\Guess\GuessKernel.xproj">
Expand All @@ -70,10 +67,16 @@
<Private>True</Private>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath)\Cosmos\Cosmos.targets" />
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
<Import Project="Cosmos.targets" />
<!--<Import Project="$(MSBuildExtensionsPath)\Cosmos\Cosmos.targets" />-->
<PropertyGroup>
<NoStdLib>true</NoStdLib>
<NuGetTargetMoniker>.NETPlatform,Version=v5.0;.NETStandard,Version=v1.0;.NETStandard,Version=v1.1;.NETStandard,Version=v1.2;.NETStandard,Version=v1.3;.NETStandard,Version=v1.4;.NETStandard,Version=v1.5;.NETStandard,Version=v1.6;.NETCoreApp,Version=v1.0</NuGetTargetMoniker>
<NuGetTargetMoniker>.NETStandard,Version=v1.6</NuGetTargetMoniker>
<!-- We don't use any of MSBuild's resolution logic for resolving the framework, so just set these two
properties to any folder that exists to skip the GetReferenceAssemblyPaths task (not target) and
to prevent it from outputting a warning (MSB3644).
-->
<_TargetFrameworkDirectories>$(MSBuildThisFileDirectory)</_TargetFrameworkDirectories>
<_FullFrameworkReferenceAssemblyPaths>$(MSBuildThisFileDirectory)</_FullFrameworkReferenceAssemblyPaths>
</PropertyGroup>
</Project>
8 changes: 8 additions & 0 deletions Demos/Guess/GuessBoot.project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"runtimes": {
"win": {}
},
"frameworks": {
"netstandard1.6": {}
}
}
4 changes: 3 additions & 1 deletion Demos/Guess/GuessKernel.xproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
</PropertyGroup>
<ItemGroup>
<DnxInvisibleContent Include="Cosmos.bxrc" />
<DnxInvisibleContent Include="Cosmos.targets" />
<DnxInvisibleContent Include="GuessBoot.Cosmos" />
<DnxInvisibleContent Include="GuessBoot.project.json" />
</ItemGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>
</Project>
16 changes: 16 additions & 0 deletions Demos/Guess/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,22 @@
},
"Cosmos.System": {
"target": "project"
},
"Cosmos.Debug.Kernel.Plugs.Asm": {
"target": "project",
"type": "build"
},
"Cosmos.Core.Plugs": {
"target": "project",
"type": "build"
},
"Cosmos.Core.Plugs.Asm": {
"target": "project",
"type": "build"
},
"Cosmos.System.Plugs": {
"target": "project",
"type": "build"
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion Tests/BoxingTests/BoxingTests.xproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
</PropertyGroup>
<ItemGroup>
<DnxInvisibleContent Include="BoxingTestsBoot.Cosmos" />
<DnxInvisibleContent Include="BoxingTestsBoot.project.json" />
</ItemGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>
</Project>
10 changes: 4 additions & 6 deletions Tests/BoxingTests/BoxingTestsBoot.Cosmos
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,14 @@
<Reference Include="Cosmos.Debug.Kernel.Plugs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BoxingTests\BoxingTests.xproj">
<Name>BoxingTests</Name>
<Project>{f8889473-5866-4913-86ac-8072a1a2558c}</Project>
<Private>True</Private>
</ProjectReference>
<Content Include="BoxingTestsBoot.project.json">
<SubType>Content</SubType>
</Content>
</ItemGroup>
<!--<ItemGroup>
<Content Include="Cosmos.bxrc">
<SubType>Content</SubType>
</Content>
</ItemGroup>-->
<Import Project="$(MSBuildExtensionsPath)\Cosmos\Cosmos.targets" />
</Project>
</Project>
8 changes: 8 additions & 0 deletions Tests/BoxingTests/BoxingTestsBoot.project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"runtimes": {
"win": {}
},
"frameworks": {
"net462": {}
}
}
1 change: 0 additions & 1 deletion Tests/BoxingTests/project.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"version": "1.0.0-*",
"dependencies": {
"NETStandard.Library": "1.6.1"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
</PropertyGroup>
<ItemGroup>
<DnxInvisibleContent Include="Cosmos.Compiler.Tests.BclBoot.Cosmos" />
<DnxInvisibleContent Include="Cosmos.Compiler.Tests.BclBoot.project.json" />
</ItemGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,14 @@
<Reference Include="Cosmos.Debug.Kernel.Plugs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Cosmos.Compiler.Tests.Bcl\Cosmos.Compiler.Tests.Bcl.xproj">
<Name>Cosmos.Compiler.Tests.Bcl</Name>
<Project>{31e3f8e2-7cc0-426c-accb-77b3319af5d3}</Project>
<Private>True</Private>
</ProjectReference>
<Content Include="Cosmos.Compiler.Tests.BclBoot.project.json">
<SubType>Content</SubType>
</Content>
</ItemGroup>
<!--<ItemGroup>
<Content Include="Cosmos.bxrc">
<SubType>Content</SubType>
</Content>
</ItemGroup>-->
<Import Project="$(MSBuildExtensionsPath)\Cosmos\Cosmos.targets" />
</Project>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"runtimes": {
"win": {}
},
"frameworks": {
"net462": {}
}
}
5 changes: 1 addition & 4 deletions Tests/Cosmos.Compiler.Tests.Bcl/project.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"version": "1.0.0-*",
"buildOptions": {
"allowUnsafe": true,
"publicSign": true,
"keyFile": "../../Cosmos.snk"
"allowUnsafe": true
},
"dependencies": {
"NETStandard.Library": "1.6.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
</PropertyGroup>
<ItemGroup>
<DnxInvisibleContent Include="Cosmos.Compiler.Tests.EncryptionBoot.Cosmos" />
<DnxInvisibleContent Include="Cosmos.Compiler.Tests.EncryptionBoot.project.json" />
</ItemGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,9 @@
<Reference Include="Cosmos.Debug.Kernel.Plugs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Cosmos.Compiler.Tests.Encryption\Cosmos.Compiler.Tests.Encryption.xproj">
<Name>Cosmos.Compiler.Tests.Encryption</Name>
<Project>{48ebdeb2-6a6a-4df2-b5f1-db6d299401f2}</Project>
<Private>True</Private>
</ProjectReference>
<Content Include="Cosmos.Compiler.Tests.EncryptionBoot.project.json">
<SubType>Content</SubType>
</Content>
</ItemGroup>
<!--<ItemGroup>
<Content Include="Cosmos.bxrc">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"runtimes": {
"win": {}
},
"frameworks": {
"net462": {}
}
}
Loading

0 comments on commit 296ca05

Please sign in to comment.