Try fixing macOS and support no_console Windows subsystem.
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
<files id="hl">
|
||||
<compilerflag value="-I${HASHLINK_PATH}/src" />
|
||||
|
||||
<file name="src/hashlink_main.c" tag="main"/>
|
||||
<file name="${HASHLINK_PATH}/src/code.c" />
|
||||
<file name="${HASHLINK_PATH}/src/debugger.c" />
|
||||
<file name="${HASHLINK_PATH}/src/jit.c" />
|
||||
@@ -357,6 +358,7 @@
|
||||
<files id="libhl" />
|
||||
<ext value=".${LIBSUFFIX}" />
|
||||
|
||||
<vflag name="-install_name" value="@executable_path/libhl.dylib" if="mac"/>
|
||||
<lib name="-pthread" if="linux" />
|
||||
|
||||
<section if="windows">
|
||||
|
||||
7
project/src/hashlink_main.c
Normal file
7
project/src/hashlink_main.c
Normal file
@@ -0,0 +1,7 @@
|
||||
#ifdef HX_WIN_MAIN
|
||||
extern int wmain(int argc, wchar_t *argv[]);
|
||||
|
||||
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
|
||||
return wmain(__argc, __argv);
|
||||
}
|
||||
#endif
|
||||
@@ -659,7 +659,7 @@ class WindowsPlatform extends PlatformTarget
|
||||
|
||||
if (!targetFlags.exists("32")
|
||||
&& System.hostArchitecture == X64
|
||||
&& (command != "rebuild" || targetType == "cpp" || targetType == "winrt"))
|
||||
&& (command != "rebuild" || targetType == "cpp" || targetType == "hl" || targetType == "winrt"))
|
||||
{
|
||||
if (targetType == "winrt")
|
||||
{
|
||||
|
||||
@@ -1207,7 +1207,7 @@ class PlatformSetup
|
||||
var entitlementsPath = sys.FileSystem.exists(limePath + "/project") ? (limePath +
|
||||
"/project/lib/hashlink/other/osx/entitlements.xml") : (limePath
|
||||
+ "/templates/bin/hl/entitlements.xml");
|
||||
System.runCommand("", "sudo", ["security", "delete-identity", "-c", "hl-cert"], true, false, true);
|
||||
System.runCommand("", "sudo", ["security", "delete-identity", "-c", "hl-cert"], true, true, true);
|
||||
sys.io.File.saveContent(openSSLConf, [
|
||||
"[req]",
|
||||
"distinguished_name=codesign_dn",
|
||||
@@ -1232,7 +1232,7 @@ class PlatformSetup
|
||||
System.runCommand("", "codesign", ["--entitlements", entitlementsPath, "-fs", "hl-cert", hlPath], true, false, true);
|
||||
for (f in [key, cert, openSSLConf])
|
||||
sys.FileSystem.deleteFile(f);
|
||||
Log.println("\nIf you update lime, yo will have to run this again to sign the new hl executable");
|
||||
Log.println("\nIf you update lime, you will have to run this again to sign the new hl executable");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user