Fix build dist paths

This commit is contained in:
Frank A. Krueger 2018-03-13 15:58:18 -07:00
parent 358e412d96
commit b45015541b
No known key found for this signature in database
GPG Key ID: 0471C67474FFE664
3 changed files with 5 additions and 25 deletions

View File

@ -20,6 +20,8 @@ namespace Ooui.Wasm.Build.Tasks
[Required] [Required]
public string Assembly { get; set; } public string Assembly { get; set; }
[Required]
public string OutputPath { get; set; }
public string ReferencePath { get; set; } public string ReferencePath { get; set; }
public override bool Execute () public override bool Execute ()
@ -78,8 +80,7 @@ namespace Ooui.Wasm.Build.Tasks
void CreateDist () void CreateDist ()
{ {
var fullAsmPath = Path.GetFullPath (Assembly); var outputPath = Path.GetFullPath (OutputPath);
var outputPath = Path.GetDirectoryName (fullAsmPath);
distPath = Path.Combine (outputPath, "dist"); distPath = Path.Combine (outputPath, "dist");
managedPath = Path.Combine (distPath, "managed"); managedPath = Path.Combine (distPath, "managed");
Directory.CreateDirectory (managedPath); Directory.CreateDirectory (managedPath);

View File

@ -1,22 +0,0 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask TaskName="Ooui.Wasm.Build.Tasks.BuildDistTask" AssemblyFile="$(MSBuildThisFileDirectory)Ooui.Wasm.Build.Tasks.dll" />
<!-- BuildDist -->
<PropertyGroup>
<CompileDependsOn>
$(CompileDependsOn);
BuildDist;
</CompileDependsOn>
</PropertyGroup>
<Target Name="BuildDist" AfterTargets="AfterCompile" Condition="'$(_BuildDistAlreadyExecuted)'!='true'">
<PropertyGroup>
<_BuildDistAlreadyExecuted>true</_BuildDistAlreadyExecuted>
</PropertyGroup>
<BuildDistTask
Assembly = "$(OutputPath)$(TargetFileName)"
ReferencePath = "@(ReferencePath)" />
</Target>
</Project>

View File

@ -15,7 +15,8 @@
<_BuildDistAlreadyExecuted>true</_BuildDistAlreadyExecuted> <_BuildDistAlreadyExecuted>true</_BuildDistAlreadyExecuted>
</PropertyGroup> </PropertyGroup>
<BuildDistTask <BuildDistTask
Assembly = "$(OutputPath)$(TargetFileName)" Assembly = "$(IntermediateOutputPath)$(TargetFileName)"
OutputPath = "$(OutputPath)"
ReferencePath = "@(ReferencePath)" /> ReferencePath = "@(ReferencePath)" />
</Target> </Target>