Skip to content

Commit

Permalink
mac: setting up permissions for the installed app
Browse files Browse the repository at this point in the history
  • Loading branch information
Cammin committed Sep 24, 2023
1 parent 0695a9e commit f3b29a4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ private string GetCommand()
//Debug.Log($"fromPath {fromPath}");
//Debug.Log($"appPath {appPath}");
//Debug.Log($"relPath {relPath}");

#if UNITY_EDITOR_OSX
//on mac, the command needs to have this in the front: sudo chmod a+x <your sub command file>
relPath = "sudo chmod a+x " + relPath;
#endif

return relPath;
}
Expand Down
6 changes: 6 additions & 0 deletions Assets/LDtkUnity/Editor/Utility/LDtkTilesetExporterUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ public static void UnzipToLibrary()
Debug.Assert(Directory.Exists(destDir), "Directory.Exists(destDir)");

ZipUtil.Extract(pathToZip, destDir);

#if UNITY_EDITOR_OSX
//on mac, the app needs some permission. Use "sudo chmod +x"
Process.Start("/bin/bash", $"-c \" chmod +x {PathToExe()}\" ");
#endif

LDtkDebug.Log($"Extracted the tileset export app to \"{destDir}\"");
}

Expand Down

0 comments on commit f3b29a4

Please sign in to comment.