Put hashlink binaries in templates/bin again.
Add setup script for macOS codesigning.
This commit is contained in:
@@ -208,6 +208,14 @@ class MacPlatform extends PlatformTarget
|
||||
// System.copyFile(targetDirectory + "/obj/ApplicationMain" + (project.debug ? "-Debug" : "") + ".hl",
|
||||
// Path.combine(executableDirectory, project.app.file + ".hl"));
|
||||
System.recursiveCopyTemplate(project.templatePaths, "bin/hl/mac", executableDirectory);
|
||||
// let's not keep around hxcpp's hash files
|
||||
for (file in System.readDirectory(applicationDirectory))
|
||||
{
|
||||
if (Path.extension(file) == "hash")
|
||||
{
|
||||
System.deleteFile(file);
|
||||
}
|
||||
}
|
||||
System.copyFile(targetDirectory + "/obj/ApplicationMain.hl", Path.combine(executableDirectory, "hlboot.dat"));
|
||||
System.renameFile(Path.combine(executableDirectory, "hl"), executablePath);
|
||||
}
|
||||
@@ -382,25 +390,6 @@ class MacPlatform extends PlatformTarget
|
||||
if (targetFlags.exists("hl"))
|
||||
{
|
||||
CPPHelper.rebuild(project, commands, null, "BuildHashlink.xml");
|
||||
// TODO
|
||||
|
||||
// Sys.command("sudo", ["security", "delete-identity", "-c", "hl-cert"]);
|
||||
// sys.io.File.saveContent("openssl.cnf", "[req]\ndistinguished_name=codesign_dn\n[codesign_dn]\ncommonName=hl-cert\n[v3_req]\nkeyUsage=critical,digitalSignature\nextendedKeyUsage=critical,codeSigning");
|
||||
// Sys.command("openssl", [
|
||||
// "req", "-x509", "-newkey", "rsa:4096", "-keyout", "key.pem", "-nodes", "-days", "365", "-subj", "/CN=hl-cert", "-outform", "der", "-out",
|
||||
// "cert.cer", "-extensions", "v3_req", "-config", "openssl.cnf"
|
||||
// ]);
|
||||
// Sys.command("sudo", [
|
||||
// "security",
|
||||
// "add-trusted-cert",
|
||||
// "-d",
|
||||
// "-k /Library/Keychains/System.keychain",
|
||||
// "cert.cer"
|
||||
// ]);
|
||||
// Sys.command("sudo", ["security", "import", "key.pem", "-k", "/Library/Keychains/System.keychain", "-A"]);
|
||||
// Sys.command("codesign", ["--entitlements", "other/osx/entitlements.xml", "-fs", "hl-cert", "hl"]);
|
||||
// for (f in ["key.pem", "cert.cer", "openssl.cnf"])
|
||||
// sys.FileSystem.deleteFile(f);
|
||||
}
|
||||
|
||||
CPPHelper.rebuild(project, commands);
|
||||
|
||||
Reference in New Issue
Block a user