Skip to content

Commit

Permalink
Fixed the debug engine.
Browse files Browse the repository at this point in the history
Added kernel packages to installation.
  • Loading branch information
jp2masa committed May 2, 2017
1 parent 2e2f7e2 commit 7cc7a8d
Show file tree
Hide file tree
Showing 19 changed files with 112 additions and 18 deletions.
4 changes: 4 additions & 0 deletions Setup/Cosmos.iss
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ Source: ".\Build\VSIP\Cosmos.Core.*"; DestDir: "{app}\Kernel"; Flags: ignorevers
Source: ".\Build\VSIP\Cosmos.HAL.*"; DestDir: "{app}\Kernel"; Flags: ignoreversion uninsremovereadonly
Source: ".\Build\VSIP\Cosmos.System.*"; DestDir: "{app}\Kernel"; Flags: ignoreversion uninsremovereadonly
Source: ".\Build\VSIP\Cosmos.Common.*"; DestDir: "{app}\Kernel"; Flags: ignoreversion uninsremovereadonly
; Kernel packages
Source: ".\Build\KernelPackages\*"; DestDir: "{app}\Kernel\packages"; Flags: ignoreversion uninsremovereadonly
; Icon
Source: ".\Artwork\Cosmos.ico"; DestDir: "{app}"; Flags: ignoreversion uninsremovereadonly
; XSharp Source
Expand Down Expand Up @@ -128,6 +130,8 @@ Root: HKCU; SubKey: Software\Cosmos; ValueType: none; ValueName: "DevKit"; Flags
UseRelativePaths=True

[Run]
Filename: "{app}\Build\Tools\nuget.exe"; Parameters: "init {app}\Kernel\packages {app}\Kernel\packages"; WorkingDir: "{app}"; Description: "Install Kernel Packages"; StatusMsg: "Installing Kernel Packages"
Filename: "{app}\Build\Tools\nuget.exe"; Parameters: "sources Add -Name ""Cosmos"" -Source {app}\Kernel\packages"; WorkingDir: "{app}"; Description: "Install Kernel Packages"; StatusMsg: "Installing Kernel Packages"
Filename: "{app}\Build\Tools\VSIXBootstrapper.exe"; Parameters: "/a /u:Cosmos.VS.ProjectSystem"; Description: "Remove Cosmos Project System"; StatusMsg: "Removing Visual Studio Extension: Cosmos Project System"
Filename: "{app}\Build\Tools\VSIXBootstrapper.exe"; Parameters: "/a Cosmos.VS.ProjectSystem.vsix"; WorkingDir: "{app}"; Description: "Install Cosmos Project System"; StatusMsg: "Installing Visual Studio Extension: Cosmos Project System"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp1.1</TargetFramework>
<TargetFramework>netcoreapp1.0</TargetFramework>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\Cosmos.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
Expand Down
12 changes: 8 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ build_script:
xcopy /Y "%APPVEYOR_BUILD_FOLDER%\Build\VSIP\Cosmos.targets" "%ProgramFiles(x86)%\MSBuild\Cosmos\"
dotnet publish source/Cosmos.Build.MSBuild -f net462 -r win7-x86 -c Release -o "c:\CosmosRun\Build\VSIP\"
dotnet publish source/Cosmos.Build.MSBuild -f net462 -r win7-x86 -o "c:\CosmosRun\Build\VSIP\"
dotnet publish source/IL2CPU -f netcoreapp1.0 -r win7-x86 -c Release -o "c:\CosmosRun\Build\IL2CPU\"
dotnet publish source/IL2CPU -f netcoreapp1.0 -r win7-x86 -o "c:\CosmosRun\Build\IL2CPU\"
dotnet publish source/XSharp.Compiler -f netcoreapp1.0 -r win7-x86 -c Release -o "c:\CosmosRun\Build\XSharp\"
dotnet publish source/XSharp.Compiler -f netcoreapp1.0 -r win7-x86 -o "c:\CosmosRun\Build\XSharp\"
xcopy /Y "c:\Cosmos\Build\VSIP\Cosmos.Debug.Kernel.*" "c:\CosmosRun\Kernel\"
Expand Down Expand Up @@ -70,7 +70,11 @@ build_script:
# - Cosmos.TestRunner.UnitTest.dll

test_script:
- dotnet test Tests\Cosmos.TestRunner.UnitTest\Cosmos.TestRunner.UnitTest.csproj
- ps1 >-
dotnet test Tests\Cosmos.TestRunner.UnitTest\Cosmos.TestRunner.UnitTest.csproj --logger "trx;LogFileName=.\TestResult.xml"

$wc = New-Object 'System.Net.WebClient'
$wc.UploadFile("https://ci.appveyor.com/api/testresults/nunit3/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\TestResult.xml))

notifications:
- provider: Webhook
Expand Down
31 changes: 30 additions & 1 deletion source/Cosmos.Build.Builder/CosmosTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,21 @@ private void CreateScriptToUseChangesetWhichTaskIsUse()
}
}

private void DotnetPack(string project, string destDir, string versionSuffix)
{
string xParams = $"pack {project} --version-suffix {Quoted(versionSuffix)} -o {Quoted(destDir)}";

if (!App.NoMSBuildClean)
{
StartConsole("dotnet", $"clean {project}");
}

StartConsole("dotnet", xParams);
}

private void DotnetPublish(string project, string framework, string runtime, string destDir)
{
string xParams = $"publish {project} -f {framework} -r {runtime} -c Release -o {Quoted(destDir)}";
string xParams = $"publish {project} -f {framework} -r {runtime} -o {Quoted(destDir)}";

if (!App.NoMSBuildClean)
{
Expand All @@ -306,14 +318,31 @@ private void CompileCosmos()
Section("Compiling Cosmos");

string xVSIPDir = Path.Combine(mCosmosDir, "Build", "VSIP");

if (!Directory.Exists(xVSIPDir))
{
Directory.CreateDirectory(xVSIPDir);
}

DotnetPublish(Path.Combine(mCosmosDir, "source", "Cosmos.Build.MSBuild"), "net462", "win7-x86", Path.Combine(xVSIPDir, "MSBuild"));
DotnetPublish(Path.Combine(mCosmosDir, "source", "IL2CPU"), "netcoreapp1.0", "win7-x86", Path.Combine(xVSIPDir, "IL2CPU"));
DotnetPublish(Path.Combine(mCosmosDir, "Tools", "NASM"), "netcoreapp1.0", "win7-x86", Path.Combine(xVSIPDir, "NASM"));
DotnetPublish(Path.Combine(mCosmosDir, "source", "XSharp.Compiler"), "netcoreapp1.0", "win7-x86", Path.Combine(xVSIPDir, "XSharp"));

string xPackagesDir = Path.Combine(xVSIPDir, "KernelPackages");
string xVersionSuffix = App.IsUserKit ? "" : "devkit";

DotnetPack(Path.Combine(mCosmosDir, "source", "Cosmos.Common"), xPackagesDir, xVersionSuffix);
DotnetPack(Path.Combine(mCosmosDir, "source", "Cosmos.Core"), xPackagesDir, xVersionSuffix);
DotnetPack(Path.Combine(mCosmosDir, "source", "Cosmos.Core.Common"), xPackagesDir, xVersionSuffix);
DotnetPack(Path.Combine(mCosmosDir, "source", "Cosmos.Core.Memory"), xPackagesDir, xVersionSuffix);
DotnetPack(Path.Combine(mCosmosDir, "source", "Cosmos.Core.Plugs"), xPackagesDir, xVersionSuffix);
DotnetPack(Path.Combine(mCosmosDir, "source", "Cosmos.Core.Plugs.Asm"), xPackagesDir, xVersionSuffix);
DotnetPack(Path.Combine(mCosmosDir, "source", "Cosmos.Debug.Kernel"), xPackagesDir, xVersionSuffix);
DotnetPack(Path.Combine(mCosmosDir, "source", "Cosmos.Debug.Kernel.Plugs.Asm"), xPackagesDir, xVersionSuffix);
DotnetPack(Path.Combine(mCosmosDir, "source", "Cosmos.HAL"), xPackagesDir, xVersionSuffix);
DotnetPack(Path.Combine(mCosmosDir, "source", "Cosmos.System"), xPackagesDir, xVersionSuffix);
DotnetPack(Path.Combine(mCosmosDir, "source", "Cosmos.System.Plugs"), xPackagesDir, xVersionSuffix);

MSBuild(Path.Combine(mCosmosDir, @"Build.sln"), "Debug");
}
Expand Down
2 changes: 2 additions & 0 deletions source/Cosmos.Common/Cosmos.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<TargetFramework>netstandard1.5</TargetFramework>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\Cosmos.snk</AssemblyOriginatorKeyFile>
<Authors>Cosmos</Authors>
<Company>Cosmos</Company>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 2 additions & 0 deletions source/Cosmos.Core.Common/Cosmos.Core.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<TargetFramework>netstandard1.5</TargetFramework>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\Cosmos.snk</AssemblyOriginatorKeyFile>
<Authors>Cosmos</Authors>
<Company>Cosmos</Company>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
Expand Down
2 changes: 2 additions & 0 deletions source/Cosmos.Core.Memory/Cosmos.Core.Memory.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<TargetFramework>netstandard1.5</TargetFramework>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\Cosmos.snk</AssemblyOriginatorKeyFile>
<Authors>Cosmos</Authors>
<Company>Cosmos</Company>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
Expand Down
2 changes: 2 additions & 0 deletions source/Cosmos.Core.Plugs.Asm/Cosmos.Core.Plugs.Asm.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<TargetFramework>netstandard1.5</TargetFramework>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\Cosmos.snk</AssemblyOriginatorKeyFile>
<Authors>Cosmos</Authors>
<Company>Cosmos</Company>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
Expand Down
2 changes: 2 additions & 0 deletions source/Cosmos.Core.Plugs/Cosmos.Core.Plugs.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<TargetFramework>netstandard1.5</TargetFramework>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\Cosmos.snk</AssemblyOriginatorKeyFile>
<Authors>Cosmos</Authors>
<Company>Cosmos</Company>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
Expand Down
2 changes: 2 additions & 0 deletions source/Cosmos.Core/Cosmos.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<TargetFramework>netstandard1.5</TargetFramework>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\Cosmos.snk</AssemblyOriginatorKeyFile>
<Authors>Cosmos</Authors>
<Company>Cosmos</Company>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<TargetFramework>netstandard1.5</TargetFramework>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\Cosmos.snk</AssemblyOriginatorKeyFile>
<Authors>Cosmos</Authors>
<Company>Cosmos</Company>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
Expand Down
2 changes: 2 additions & 0 deletions source/Cosmos.Debug.Kernel/Cosmos.Debug.Kernel.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<TargetFramework>netstandard1.5</TargetFramework>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\Cosmos.snk</AssemblyOriginatorKeyFile>
<Authors>Cosmos</Authors>
<Company>Cosmos</Company>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
Expand Down
2 changes: 2 additions & 0 deletions source/Cosmos.HAL/Cosmos.HAL.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<TargetFramework>netstandard1.5</TargetFramework>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\Cosmos.snk</AssemblyOriginatorKeyFile>
<Authors>Cosmos</Authors>
<Company>Cosmos</Company>
</PropertyGroup>

<ItemGroup>
Expand Down
8 changes: 5 additions & 3 deletions source/Cosmos.System.Plugs/Cosmos.System.Plugs.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
<TargetFramework>netstandard1.5</TargetFramework>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\Cosmos.snk</AssemblyOriginatorKeyFile>
<Authors>Cosmos</Authors>
<Company>Cosmos</Company>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Cosmos.Common\Cosmos.Common.csproj" />
<ProjectReference Include="..\Cosmos.IL2CPU.Plugs\Cosmos.IL2CPU.Plugs.csproj" />
<ProjectReference Include="..\Cosmos.System\Cosmos.System.csproj" />
<ProjectReference Include="..\Cosmos.Common\Cosmos.Common.csproj" />
<ProjectReference Include="..\Cosmos.IL2CPU.Plugs\Cosmos.IL2CPU.Plugs.csproj" />
<ProjectReference Include="..\Cosmos.System\Cosmos.System.csproj" />
</ItemGroup>

</Project>
2 changes: 2 additions & 0 deletions source/Cosmos.System/Cosmos.System.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<TargetFramework>netstandard1.5</TargetFramework>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\Cosmos.snk</AssemblyOriginatorKeyFile>
<Authors>Cosmos</Authors>
<Company>Cosmos</Company>
</PropertyGroup>

<ItemGroup>
Expand Down
6 changes: 5 additions & 1 deletion source/Cosmos.VS.DebugEngine/Cosmos.VS.DebugEngine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<RootNamespace>Cosmos.VS.DebugEngine</RootNamespace>
<AssemblyName>Cosmos.VS.DebugEngine</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<GeneratePkgDefFile>true</GeneratePkgDefFile>
<GeneratePkgDefFile>false</GeneratePkgDefFile>
<IncludeAssemblyInVSIXContainer>true</IncludeAssemblyInVSIXContainer>
<IncludeDebugSymbolsInVSIXContainer>true</IncludeDebugSymbolsInVSIXContainer>
<IncludeDebugSymbolsInLocalVSIXDeployment>true</IncludeDebugSymbolsInLocalVSIXDeployment>
Expand Down Expand Up @@ -105,6 +105,10 @@
</None>
</ItemGroup>
<ItemGroup>
<Content Include="Cosmos.VS.DebugEngine.pkgdef">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
<Content Include="Resources\Cosmos.ico">
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
Expand Down
39 changes: 39 additions & 0 deletions source/Cosmos.VS.DebugEngine/Cosmos.VS.DebugEngine.pkgdef
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[$RootKey$\InstalledProducts\CosmosDebugEnginePackage]
@="#110"
"Package"="{a82b45e9-2a89-43bd-925d-c7f0edd212aa}"
"PID"="1.0"
"ProductDetails"="#112"
"LogoID"="#400"
[$RootKey$\Packages\{a82b45e9-2a89-43bd-925d-c7f0edd212aa}]
@="CosmosDebugEnginePackage"
"InprocServer32"="$WinDir$\SYSTEM32\MSCOREE.DLL"
"Class"="Cosmos.VS.DebugEngine.CosmosDebugEnginePackage"
"CodeBase"="$PackageFolder$\Cosmos.VS.DebugEngine.dll"
[$RootKey$\Menus]
"{a82b45e9-2a89-43bd-925d-c7f0edd212aa}"=", Menus.ctmenu, 1"

[$RootKey$\AD7Metrics\Engine\{FA1DA3A6-66FF-4C65-B077-E65F7164EF83}]
@="Cosmos Debug Engine"
; "AddressBP"=dword:00000001
"AlwaysLoadLocal"=dword:00000001
"AlwaysLoadProgramProviderLocal"=dword:00000001
; "CallStackBP"=dword:00000001
; "ConditionalBP"=dword:00000001
"DataBP"=dword:00000001
"Disassembly"=dword:00000001
"EnginePriority"=dword:00000050
"Exceptions"=dword:00000001
; "FunctionBP"=dword:00000001
; "HitCountBP"=dword:00000001
; "JustMyCodeStepping"=dword:00000001
"Name"="Cosmos Debug"
"SetNextStatement"=dword:00000001
; "SuspendThread"=dword:00000001
"CLSID"="{f129e39e-168e-4cbc-a966-90988ebda375}"
"GlobalVisualizersDirectory"="$PackageFolder$"

[$RootKey$\CLSID\{f129e39e-168e-4cbc-a966-90988ebda375}]
"Assembly"="Cosmos.VS.DebugEngine"
"Class"="Cosmos.VS.DebugEngine.AD7.Impl.AD7Engine"
"InprocServer32"="$WinDir$\SYSTEM32\MSCOREE.DLL"
"CodeBase"="$PackageFolder$\Cosmos.VS.DebugEngine.dll"
5 changes: 0 additions & 5 deletions source/Cosmos.VS.DebugEngine/source.extension.vsixmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@
<Dependency Id="Microsoft.VisualStudio.MPF.15.0" DisplayName="Visual Studio MPF 15.0" d:Source="Installed" Version="[15.0]" />
</Dependencies>
<Assets>
<Asset Type="Microsoft.VisualStudio.Assembly" d:Source="Project" d:ProjectName="Cosmos.Debug.Common" Path="|Cosmos.Debug.Common|" AssemblyName="|Cosmos.Debug.Common;AssemblyName|" />
<Asset Type="Microsoft.VisualStudio.Assembly" d:Source="Project" d:ProjectName="Cosmos.Build.Common" Path="|Cosmos.Build.Common|" AssemblyName="|Cosmos.Build.Common;AssemblyName|" />
<Asset Type="Microsoft.VisualStudio.Assembly" d:Source="Project" d:ProjectName="Cosmos.Debug.DebugConnectors" Path="|Cosmos.Debug.DebugConnectors|" AssemblyName="|Cosmos.Debug.DebugConnectors;AssemblyName|" />
<Asset Type="Microsoft.VisualStudio.Assembly" d:Source="Project" d:ProjectName="Cosmos.Debug.Symbols" Path="|Cosmos.Debug.Symbols|" AssemblyName="|Cosmos.Debug.Symbols;AssemblyName|" />
<Asset Type="Microsoft.VisualStudio.Assembly" d:Source="Project" d:ProjectName="Cosmos.Debug.Hosts" Path="|Cosmos.Debug.Hosts|" AssemblyName="|Cosmos.Debug.Hosts;AssemblyName|" />
<Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="Project" d:ProjectName="%CurrentProject%" Path="|%CurrentProject%;PkgdefProjectOutputGroup|" />
<Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="Project" d:ProjectName="Cosmos.VS.Windows" Path="|Cosmos.VS.Windows;PkgdefProjectOutputGroup|" />
</Assets>
Expand Down
3 changes: 0 additions & 3 deletions source/Cosmos.VS.ProjectSystem/source.extension.vsixmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@
<Assets>
<Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="Project" d:ProjectName="%CurrentProject%" Path="|%CurrentProject%;PkgdefProjectOutputGroup|" />
<Asset Type="Microsoft.VisualStudio.ProjectTemplate" d:Source="Project" d:ProjectName="%CurrentProject%" d:TargetPath="|%CurrentProject%;TemplateProjectOutputGroup|" Path="ProjectTemplates" d:VsixSubPath="ProjectTemplates" />
<Asset Type="Microsoft.VisualStudio.Assembly" d:Source="Project" d:ProjectName="Cosmos.VS.Wizards" Path="|Cosmos.VS.Wizards|" AssemblyName="|Cosmos.VS.Wizards;AssemblyName|" />
<Asset Type="Microsoft.VisualStudio.Assembly" d:Source="Project" d:ProjectName="Cosmos.Build.Common" Path="|Cosmos.Build.Common|" AssemblyName="|Cosmos.Build.Common;AssemblyName|" />
<Asset Type="Microsoft.VisualStudio.Assembly" d:Source="Project" d:ProjectName="Cosmos.Debug.Common" Path="|Cosmos.Debug.Common|" AssemblyName="|Cosmos.Debug.Common;AssemblyName|" />
<Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="Project" d:ProjectName="Cosmos.VS.DebugEngine" Path="|Cosmos.VS.DebugEngine;PkgdefProjectOutputGroup|" />
</Assets>
</PackageManifest>

0 comments on commit 7cc7a8d

Please sign in to comment.