I need to call chmod +x from a Unity mac application.
I have a Unity based patcher that downloads and unzips a second Unity project. However, the unzipped project loses its execution rights. Calling "chmod +x MYAPP.app/Contents/MacOS/MYAPP" fixes this. But how to do so automatically?
Options I tried:
- I made a mycom.command file that a user can execute manually. I cannot seem to run this from Unity.
- The .Net file system rights do not seem to be implemented on mac
- And the last option I tried was calling Mono.Posix or Mono.Unix.Native.syscall.chmod but this keeps complaining about missing DLLs up untill missing mscrvt (somthing like that) which is a windows only DLL.
The simplest way is probably to use the System.Diagnostics.Process class, to spawn a process with the "chmod" executable and the proper parameters you need.