From: Jean-Philippe Bruyère Date: Sat, 21 Aug 2021 20:56:21 +0000 (+0200) Subject: PATH environment split char is ';' on windows and ':' on unix X-Git-Tag: v0.2.1-beta~1 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=2464d2765a22946e7064d2c3fafe0eb33e6eeb36;p=jp%2Fvke.net.git PATH environment split char is ';' on windows and ':' on unix --- diff --git a/.vscode/launch.json b/.vscode/launch.json index 8bb526e..d5a945d 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -26,6 +26,17 @@ "stopAtEntry": false, "console": "internalConsole" }, + { + "name": ".NET Core Launch (Textured)", + "type": "coreclr", + "request": "launch", + "preLaunchTask": "build Textured", + "program": "${workspaceFolder}/build/Debug/netcoreapp3.1/Textured", + "args": [], + "cwd": "${workspaceFolder}/build/Debug/netcoreapp3.1/", + "stopAtEntry": false, + "console": "internalConsole" + }, { "name": ".NET Core Launch (pbr)", "type": "coreclr", diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 1c80658..9f2434f 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -15,6 +15,20 @@ ], "problemMatcher": "$msCompile" }, + { + "label": "build Textured", + "command": "dotnet", + "type": "process", + "args": [ + "build", + "${workspaceFolder}/samples/Textured/Textured.csproj", + "/property:GenerateFullPaths=true", + "/property:SolutionDir=${workspaceFolder}/", + "/property:Configuration=Debug", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + }, { "label": "build ClearScreen", "command": "dotnet", diff --git a/SpirVTasks/CompileGLSLTask.cs b/SpirVTasks/CompileGLSLTask.cs index ea71ca9..51e840c 100644 --- a/SpirVTasks/CompileGLSLTask.cs +++ b/SpirVTasks/CompileGLSLTask.cs @@ -144,7 +144,7 @@ namespace SpirVTasks { } string glslcExec = "glslc"; - if (Environment.OSVersion.Platform.ToString ().StartsWith ("Win", StringComparison.Ordinal)) + if (Environment.OSVersion.Platform.ToString ().StartsWith ("Win", StringComparison.Ordinal)) glslcExec = glslcExec + ".exe"; string vkSdk = Environment.GetEnvironmentVariable ("VULKAN_SDK"); @@ -157,7 +157,7 @@ namespace SpirVTasks { string envStrPathes = Environment.GetEnvironmentVariable ("PATH"); if (!string.IsNullOrEmpty (envStrPathes)) { - foreach (string path in envStrPathes.Split (':')) { + foreach (string path in envStrPathes.Split (Environment.OSVersion.Platform == PlatformID.Unix ? ':' : ';')) { glslcPath = Path.Combine (path, glslcExec); if (File.Exists (glslcPath)) return true;