This repository has been archived by the owner on Jan 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix MacOS local launch errors when there are spaces in paths (#1442)
- Loading branch information
Jamie Brynes
authored
Jul 30, 2020
1 parent
b75637d
commit 146d34a
Showing
2 changed files
with
12 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,8 +91,9 @@ public static void LaunchClient() | |
{ | ||
command = "osascript"; | ||
commandArgs = $@"-e 'tell application ""Terminal"" | ||
set projectDir to ""{Common.SpatialProjectRootDir}"" | ||
activate | ||
do script ""cd {Common.SpatialProjectRootDir} && {Common.SpatialBinary} {commandArgs}"" | ||
do script ""cd "" & quoted form of projectDir & "" && {Common.SpatialBinary} {commandArgs}"" | ||
end tell'"; | ||
unityClientZipName = "[email protected]"; | ||
} | ||
|
@@ -221,7 +222,7 @@ public static void LaunchLocalDeployment() | |
var command = Common.SpatialBinary; | ||
|
||
#if UNITY_EDITOR_OSX | ||
var commandArgs = $"local launch --enable_pre_run_check=false --snapshot '{toolsConfig.CustomSnapshotPath}' --experimental_runtime={toolsConfig.RuntimeVersion}"; | ||
var commandArgs = $"local launch --enable_pre_run_check=false --experimental_runtime={toolsConfig.RuntimeVersion}"; | ||
#else | ||
var commandArgs = $"local launch --enable_pre_run_check=false --snapshot \"{toolsConfig.CustomSnapshotPath}\" --experimental_runtime={toolsConfig.RuntimeVersion}"; | ||
#endif | ||
|
@@ -237,15 +238,17 @@ public static void LaunchLocalDeployment() | |
command = "osascript"; | ||
commandArgs = $@"-e 'tell application ""Terminal"" | ||
activate | ||
do script ""cd {Common.SpatialProjectRootDir} && {Common.SpatialBinary} {commandArgs}"" | ||
set projectDir to ""{Common.SpatialProjectRootDir}"" | ||
set snapshotPath to ""{toolsConfig.CustomSnapshotPath}"" | ||
do script ""cd "" & quoted form of projectDir & "" && {Common.SpatialBinary} {commandArgs} --snapshot "" & quoted form of snapshotPath | ||
end tell'"; | ||
} | ||
|
||
var processInfo = new ProcessStartInfo(command, commandArgs) | ||
{ | ||
CreateNoWindow = false, | ||
UseShellExecute = true, | ||
WorkingDirectory = Common.SpatialProjectRootDir | ||
WorkingDirectory = Common.SpatialProjectRootDir, | ||
}; | ||
|
||
var process = Process.Start(processInfo); | ||
|