Merge pull request #148 from unoplatform/dev/jela/mixed-path-backport
Align mixed path separators
This commit is contained in:
Коммит
daa4ffcbb5
|
@ -1,6 +1,6 @@
|
|||
assembly-versioning-scheme: MajorMinorPatch
|
||||
mode: ContinuousDeployment
|
||||
next-version: 1.0.2
|
||||
next-version: 1.0.4
|
||||
continuous-delivery-fallback-tag: ""
|
||||
branches:
|
||||
master:
|
||||
|
|
|
@ -186,6 +186,23 @@ namespace Uno.Wasm.Bootstrap
|
|||
}
|
||||
}
|
||||
|
||||
private void FileCopy(string source, string dest, bool overwrite = false)
|
||||
{
|
||||
// Straigten paths to fix issues with mixed path
|
||||
string FixupPath(string path)
|
||||
=> path.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar);
|
||||
|
||||
try
|
||||
{
|
||||
File.Copy(FixupPath(source), FixupPath(dest), overwrite);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
Log.LogError($"Failed to copy {source} to {dest}");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
private void CleanupDist()
|
||||
{
|
||||
var unusedFiles = new[] {
|
||||
|
@ -375,7 +392,7 @@ namespace Uno.Wasm.Bootstrap
|
|||
if (File.Exists(sourceFileName))
|
||||
{
|
||||
Log.LogMessage(MessageImportance.High, $"Copying {sourceFileName} -> {destFileName}");
|
||||
File.Copy(sourceFileName, destFileName);
|
||||
FileCopy(sourceFileName, destFileName);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -682,10 +699,10 @@ namespace Uno.Wasm.Bootstrap
|
|||
{
|
||||
var dest = Path.Combine(_distPath, Path.GetFileName(sourceFile));
|
||||
Log.LogMessage($"Runtime {sourceFile} -> {dest}");
|
||||
File.Copy(sourceFile, dest, true);
|
||||
FileCopy(sourceFile, dest, true);
|
||||
}
|
||||
|
||||
File.Copy(Path.Combine(MonoWasmSDKPath, "server.py"), Path.Combine(_distPath, "server.py"), true);
|
||||
FileCopy(Path.Combine(MonoWasmSDKPath, "server.py"), Path.Combine(_distPath, "server.py"), true);
|
||||
}
|
||||
|
||||
private void CopyContent()
|
||||
|
@ -738,15 +755,7 @@ namespace Uno.Wasm.Bootstrap
|
|||
var dest = Path.Combine(_distPath, relativePath);
|
||||
Log.LogMessage($"ContentFile {fullSourcePath} -> {dest}");
|
||||
|
||||
try
|
||||
{
|
||||
File.Copy(fullSourcePath, dest, true);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
Log.LogError($"Failed to copy {fullSourcePath} to {dest}");
|
||||
throw;
|
||||
}
|
||||
FileCopy(fullSourcePath, dest, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Hello Uno !
|
|
@ -0,0 +1 @@
|
|||
Hello Uno !
|
|
@ -18,7 +18,7 @@ using System;
|
|||
|
||||
namespace Uno.Wasm.Sample
|
||||
{
|
||||
public static class Program
|
||||
public static class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
|
|
|
@ -26,12 +26,23 @@
|
|||
<EmbeddedResource Include="WasmCSS\**\*.css" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="AdditionalContent\SomeContent01.txt" />
|
||||
<Content Include="AdditionalContent/SomeContent02.txt" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<WasmShellMonoEnvironment Include="MONO_GC_PARAMS" Value="soft-heap-limit=512m,nursery-size=64m,evacuation-threshold=66,major=marksweep" />
|
||||
<WasmShellMonoEnvironment Include="MONO_LOG_LEVEL" Value="debug" />
|
||||
<WasmShellMonoEnvironment Include="MONO_LOG_MASK" Value="gc" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="AfterBuildValidation" AfterTargets="Build">
|
||||
<Error Condition="!exists('bin/$(Configuration)/$(TargetFramework)/dist/AdditionalContent/SomeContent01.txt')" Text="SomeContent01.txt does not exist in dist"/>
|
||||
<Error Condition="!exists('bin/$(Configuration)/$(TargetFramework)/dist/AdditionalContent/SomeContent02.txt')" Text="SomeContent02.txt does not exist in dist"/>
|
||||
<Message Importance="high" Text="Output dist validated" />
|
||||
</Target>
|
||||
|
||||
<ItemGroup>
|
||||
<LinkerDescriptor Include="LinkerConfig.xml" />
|
||||
</ItemGroup>
|
||||
|
|
Загрузка…
Ссылка в новой задаче