mirror of
https://github.com/Pathoschild/SMAPI.git
synced 2026-10-12 02:08:51 +00:00
sign SMAPI on install to avoid new macOS security restrictions
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
* For players:
|
||||
* Updated mod compatibility list.
|
||||
* Fixed crash with some rare combinations of mods involving Harmony and mod APIs.
|
||||
* Fixed compatibility with newer macOS security restrictions.
|
||||
|
||||
* For mod authors:
|
||||
* Added `PathUtilities.CreateSlug` to turn an arbitrary string into a safe 'slug' that can be used in special contexts like URLs and file paths.
|
||||
|
||||
@@ -415,6 +415,21 @@ internal class InteractiveInstaller
|
||||
}
|
||||
}.Start();
|
||||
}
|
||||
|
||||
// sign SMAPI on macOS
|
||||
// This avoids 'StardewModdingAPI will damage your computer' errors in newer versions.
|
||||
if (context.Platform is Platform.Mac)
|
||||
{
|
||||
new Process
|
||||
{
|
||||
StartInfo = new ProcessStartInfo
|
||||
{
|
||||
FileName = "codesign",
|
||||
Arguments = $"--force --sign - \"{paths.UnixSmapiExecutablePath}\"",
|
||||
CreateNoWindow = true
|
||||
}
|
||||
}.Start();
|
||||
}
|
||||
}
|
||||
|
||||
// copy the game's deps.json file
|
||||
|
||||
Reference in New Issue
Block a user