Skip to content

Commit

Permalink
Project build fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
jp2masa committed May 13, 2017
1 parent 2d0ab5b commit 9553ab3
Show file tree
Hide file tree
Showing 10 changed files with 429 additions and 406 deletions.
3 changes: 1 addition & 2 deletions Cosmos.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26403.7
VisualStudioVersion = 15.0.26430.6
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Assembler", "Assembler", "{BBB4022B-CC17-4A35-8881-65657260442F}"
EndProject
Expand Down Expand Up @@ -634,7 +634,6 @@ Global
{E35E0DBF-555F-4D38-8F28-ACDFA9DC97BD}.Release|x86.ActiveCfg = Release|Any CPU
{E35E0DBF-555F-4D38-8F28-ACDFA9DC97BD}.Release|x86.Build.0 = Release|Any CPU
{77DD08F5-0751-4EFC-B222-78F9F06E1F7C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{77DD08F5-0751-4EFC-B222-78F9F06E1F7C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{77DD08F5-0751-4EFC-B222-78F9F06E1F7C}.Debug|x86.ActiveCfg = Debug|Any CPU
{77DD08F5-0751-4EFC-B222-78F9F06E1F7C}.Debug|x86.Build.0 = Debug|Any CPU
{77DD08F5-0751-4EFC-B222-78F9F06E1F7C}.Release|Any CPU.ActiveCfg = Debug|Any CPU
Expand Down
7 changes: 3 additions & 4 deletions Demos/Guess/GuessKernel.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
</PropertyGroup>

<ItemGroup>
<None Remove="*" />
<None Remove="GuessKernelBoot.Cosmos" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Cosmos.Common" Version="1.0.0" />
<PackageReference Include="Cosmos.System" Version="1.0.0" />
<PackageReference Include="Cosmos.Debug.Kernel" Version="1.0.0" />
<ProjectReference Include="..\..\source\Cosmos.Debug.Kernel\Cosmos.Debug.Kernel.csproj" />
<ProjectReference Include="..\..\source\Cosmos.System\Cosmos.System.csproj" />
</ItemGroup>

</Project>
15 changes: 12 additions & 3 deletions source/Cosmos.Build.Builder/CosmosTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ protected void CheckIfBuilderRunning()
protected void CheckIfUserKitRunning()
{
Echo("Check if User Kit Installer is already running.");
if (NumProcessesContainingName("CosmosUserKit") > 1)
if (NumProcessesContainingName("CosmosUserKit") > 0)
{
throw new Exception("Another instance of the user kit installer is running.");
}
Expand Down Expand Up @@ -292,13 +292,22 @@ private void CreateScriptToUseChangesetWhichTaskIsUse()

private void DotnetPack(string project, string destDir, string versionSuffix)
{
string xParams = $"pack {project} --version-suffix {Quoted(versionSuffix)} -o {Quoted(destDir)} --no-build";
if (String.IsNullOrWhiteSpace(versionSuffix))
{
versionSuffix = "";
}
else
{
versionSuffix = $"--version-suffix {Quoted(versionSuffix)} ";
}

string xParams = $"pack {Quoted(project)} " + versionSuffix + $"-o {Quoted(destDir)} --no-build";
StartConsole("dotnet", xParams);
}

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

Expand Down
7 changes: 5 additions & 2 deletions source/Cosmos.Build.MSBuild/Cosmos.Build.MSBuild.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,15 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="NETStandard.Library" Version="1.6.0" />
<PackageReference Include="System.Data.Common" Version="4.1.0.0" />
<PackageReference Include="Microsoft.Build" Version="15.1.1012" />
<PackageReference Include="Microsoft.Build.Framework" Version="15.1.1012" />
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="15.1.1012" />
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="15.1.1012" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="1.1.1" />
<PackageReference Include="System.Data.Common" Version="4.1.0" />
<PackageReference Include="System.IO" Version="4.1.0" />
<PackageReference Include="System.Reflection" Version="4.1.0" />
<PackageReference Include="System.Runtime" Version="4.1.0" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 2 additions & 0 deletions source/Cosmos.Build.MSBuild/Cosmos.targets
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<UsingTask TaskName="Cosmos.Build.MSBuild.MakeISO" AssemblyFile="$(CosmosBuildTaskAssemblyFile)"/>
<UsingTask TaskName="Cosmos.Build.MSBuild.Ld" AssemblyFile="$(CosmosBuildTaskAssemblyFile)"/>
<UsingTask TaskName="Cosmos.Build.MSBuild.ReadNAsmMapToDebugInfo" AssemblyFile="$(CosmosBuildTaskAssemblyFile)"/>
<UsingTask TaskName="Cosmos.Build.MSBuild.ExtractMapFromElfFile" AssemblyFile="$(CosmosBuildTaskAssemblyFile)"/>

<Target Name="CoreCompile">
<Error Text="File %(Compile.Identity) is set to compile, but .Cosmos projects don't compile any source themselves!" Condition="$(Compile) != ''"/>
Expand Down Expand Up @@ -52,4 +53,5 @@
</Target>

<Target Name="CreateManifestResourceNames" />

</Project>
2 changes: 1 addition & 1 deletion source/Cosmos.Debug.Symbols/Cosmos.Debug.Symbols.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<ItemGroup>
<PackageReference Include="Dapper.StrongName" Version="1.50.2" />
<PackageReference Include="DapperExtensions.StrongName" Version="1.50.2" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="1.1.0" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="1.1.1" />
<PackageReference Include="System.ComponentModel.Annotations" Version="4.3.0" />
<PackageReference Include="System.Reflection.Metadata" Version="1.4.2" />
<PackageReference Include="System.Runtime.Serialization.Primitives" Version="4.3.0" />
Expand Down
16 changes: 12 additions & 4 deletions source/Cosmos.VS.DebugEngine/AD7.Impl/AD7Process.cs
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,8 @@ private void CreateDebugConnector()
{
mDbgConnector = null;

string xPort = mDebugInfo[BuildPropertyNames.VisualStudioDebugPortString];
string xPort;
mDebugInfo.TryGetValue(BuildPropertyNames.VisualStudioDebugPortString, out xPort);

// using (var xDebug = new StreamWriter(@"e:\debug.info", false))
// {
Expand All @@ -295,7 +296,7 @@ private void CreateDebugConnector()

if (String.IsNullOrWhiteSpace(xPort))
{
xPort = mDebugInfo[BuildPropertyNames.CosmosDebugPortString];
mDebugInfo.TryGetValue(BuildPropertyNames.CosmosDebugPortString, out xPort);
}

var xParts = (null == xPort) ? null : xPort.Split(' ');
Expand Down Expand Up @@ -451,12 +452,19 @@ internal AD7Process(Dictionary<string, string> aDebugInfo, EngineCallback aCallb
case LaunchType.Bochs:
// The project has been created on another machine or Bochs has been uninstalled since the project has
// been created.
if (!BochsSupport.BochsEnabled) { throw new Exception(Resources.BochsIsNotInstalled); }
string bochsConfigurationFileName = mDebugInfo[BuildProperties.BochsEmulatorConfigurationFileString];
if (!BochsSupport.BochsEnabled)
{
throw new Exception(Resources.BochsIsNotInstalled);
}

string bochsConfigurationFileName;
mDebugInfo.TryGetValue(BuildProperties.BochsEmulatorConfigurationFileString, out bochsConfigurationFileName);

if (string.IsNullOrEmpty(bochsConfigurationFileName))
{
bochsConfigurationFileName = BuildProperties.BochsDefaultConfigurationFileName;
}

if (!Path.IsPathRooted(bochsConfigurationFileName))
{
// Assume the configuration file name is relative to project output path.
Expand Down
Loading

0 comments on commit 9553ab3

Please sign in to comment.