fix: Use ProgramData path on Windows if user path has a space
This commit is contained in:
Родитель
7f085d4136
Коммит
9c79e7509f
|
@ -65,6 +65,20 @@ jobs:
|
|||
OverWrite: false
|
||||
flattenFolders: false
|
||||
|
||||
- pwsh: |
|
||||
cd $(build.sourcesdirectory)/src/Uno.Wasm.SampleNet5
|
||||
$customMonoTempPath="/tmp/with a space/test"
|
||||
mkdir $customMonoTempPath
|
||||
dotnet msbuild /r /p:Configuration=Release "/p:WasmShellMonoTempFolder=$customMonoTempPath" /p:DISABLE_CLIHOST_NET6=true /p:WasmShellEmccLinkOptimization=false /t:Publish /m:1 /bl:$(build.artifactstagingdirectory)/SampleNet5-win-temp-with-space.binlog
|
||||
displayName: Build SampleNet5 Sample with Spaces
|
||||
|
||||
- pwsh: |
|
||||
cd $(build.sourcesdirectory)/src/Uno.Wasm.AotTests.net5
|
||||
$customMonoTempPath="/tmp/with a space/test2"
|
||||
mkdir $customMonoTempPath
|
||||
dotnet msbuild /r /p:Configuration=Release "/p:WasmShellMonoTempFolder=$customMonoTempPath" /p:DISABLE_CLIHOST_NET6=true /p:WasmShellEmccLinkOptimization=false /t:Publish /m:1 /bl:$(build.artifactstagingdirectory)/aottest-win-temp-with-space.binlog
|
||||
displayName: Build Raytracer Sample with Spaces
|
||||
|
||||
## Raytracer validation
|
||||
- bash: |
|
||||
$(build.sourcesdirectory)/build/scripts/run-tests.sh \
|
||||
|
|
|
@ -42,6 +42,20 @@ jobs:
|
|||
dotnet msbuild /r /p:Configuration=Release /p:DISABLE_CLIHOST_NET6=true
|
||||
displayName: Build bootstrap
|
||||
|
||||
- pwsh: |
|
||||
cd $(build.sourcesdirectory)/src/Uno.Wasm.SampleNet5
|
||||
$customMonoTempPath="$env:temp\with a space\test"
|
||||
mkdir $customMonoTempPath
|
||||
dotnet msbuild /r /p:Configuration=Release "/p:WasmShellMonoTempFolder=$customMonoTempPath" /p:DISABLE_CLIHOST_NET6=true /p:WasmShellEmccLinkOptimization=false /t:Publish /m:1 /bl:$(build.artifactstagingdirectory)/SampleNet5-win-temp-with-space.binlog
|
||||
displayName: Build Raytracer Sample with Spaces
|
||||
|
||||
- pwsh: |
|
||||
cd $(build.sourcesdirectory)/src/Uno.Wasm.AotTests.net5
|
||||
$customMonoTempPath="$env:temp\with a space\test2"
|
||||
mkdir $customMonoTempPath
|
||||
dotnet msbuild /r /p:Configuration=Release "/p:WasmShellMonoTempFolder=$customMonoTempPath" /p:DISABLE_CLIHOST_NET6=true /p:WasmShellEmccLinkOptimization=false /t:Publish /m:1 /bl:$(build.artifactstagingdirectory)/aottest-win-temp-with-space.binlog
|
||||
displayName: Build Raytracer Sample with Spaces
|
||||
|
||||
- pwsh: |
|
||||
cd $(build.sourcesdirectory)/src/Uno.Wasm.AotTests.net5
|
||||
dotnet msbuild /r /p:Configuration=Release /p:DISABLE_CLIHOST_NET6=true /p:WasmShellEmccLinkOptimization=false /t:Publish /m:1 /bl:$(build.artifactstagingdirectory)/SampleNet5-win.binlog
|
||||
|
@ -76,5 +90,5 @@ jobs:
|
|||
condition: always()
|
||||
inputs:
|
||||
PathtoPublish: $(build.artifactstagingdirectory)
|
||||
ArtifactName: uno-wasm-bootstrap-linux-aot
|
||||
ArtifactName: uno-wasm-bootstrap-windows-test
|
||||
ArtifactType: Container
|
||||
|
|
|
@ -127,11 +127,6 @@ namespace Uno.Wasm.Bootstrap
|
|||
|
||||
public string? EmccLinkOptimizationLevel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Path override for the mono-wasm SDK folder
|
||||
/// </summary>
|
||||
public string? MonoTempFolder { get; private set; }
|
||||
|
||||
public string AssembliesFileExtension { get; set; } = "clr";
|
||||
|
||||
public Microsoft.Build.Framework.ITaskItem[]? Assets { get; set; }
|
||||
|
@ -286,7 +281,6 @@ namespace Uno.Wasm.Bootstrap
|
|||
BaseIntermediateOutputPath = TryConvertLongPath(Path.GetFullPath(BaseIntermediateOutputPath));
|
||||
DistPath = TryConvertLongPath(DistPath);
|
||||
CurrentProjectPath = TryConvertLongPath(CurrentProjectPath);
|
||||
MonoTempFolder = TryConvertLongPath(MonoTempFolder!);
|
||||
CustomDebuggerPath = TryConvertLongPath(CustomDebuggerPath!);
|
||||
}
|
||||
|
||||
|
@ -1076,7 +1070,7 @@ namespace Uno.Wasm.Bootstrap
|
|||
|
||||
var result = RunProcess(
|
||||
"bash",
|
||||
$"-c \"chmod +x {emscriptenSetupScript}; {emscriptenSetupScript} \\\"{emsdkHostFolder}\\\" {CurrentEmscriptenVersion}\"");
|
||||
$"-c \"chmod +x \"{emscriptenSetupScript}\"; \"{emscriptenSetupScript}\" \\\"{emsdkHostFolder}\\\" {CurrentEmscriptenVersion}\"");
|
||||
|
||||
if (result.exitCode == 0)
|
||||
{
|
||||
|
|
|
@ -244,7 +244,7 @@ namespace Uno.Wasm.Bootstrap
|
|||
{
|
||||
if (IsOSUnixLike)
|
||||
{
|
||||
Process.Start("chmod", $"-R +x {SdkPath}");
|
||||
Process.Start("chmod", $"-R +x \"{SdkPath}\"");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -373,6 +373,12 @@ namespace Uno.Wasm.Bootstrap
|
|||
{
|
||||
var path = string.IsNullOrWhiteSpace(MonoTempFolder) ? Path.GetTempPath() : MonoTempFolder!;
|
||||
|
||||
// Workaround for https://github.com/unoplatform/Uno.Wasm.Bootstrap/issues/418
|
||||
if(EnableEmscriptenWindows && path.Contains(" "))
|
||||
{
|
||||
path = Path.Combine(Environment.GetEnvironmentVariable("ProgramData"), "UnoPlatform");
|
||||
}
|
||||
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
return path;
|
||||
|
|
|
@ -196,7 +196,6 @@
|
|||
MixedModeExcludedAssembly="@(MonoRuntimeMixedModeExcludedAssembly)"
|
||||
ExtraEmccFlags="@(WasmShellExtraEmccFlags)"
|
||||
MonoILLinker="$(WasmShellILLinkerEnabled)"
|
||||
MonoTempFolder="$(WasmShellMonoTempFolder)"
|
||||
GenerateCompressedFiles="$(WasmShellGenerateCompressedFiles)"
|
||||
DistCompressionLayoutMode="$(WasmShellCompressionLayoutMode)"
|
||||
CompressedExtensions="@(WasmShellCompressedExtension)"
|
||||
|
|
Загрузка…
Ссылка в новой задаче