remove main.cc since not found the way to code sign it since g++ no ENABLE_HARDENED_RUNTIME
This commit is contained in:
parent
dcd4d0886e
commit
d407dfed0a
1
build.py
1
build.py
@ -426,7 +426,6 @@ def build_flutter_dmg(version, features):
|
||||
"create-dmg --volname \"RustDesk Installer\" --window-pos 200 120 --window-size 800 400 --icon-size 100 --app-drop-link 600 185 --icon RustDesk.app 200 190 --hide-extension RustDesk.app rustdesk.dmg ./build/macos/Build/Products/Release/RustDesk.app")
|
||||
os.rename("rustdesk.dmg", f"../rustdesk-{version}.dmg")
|
||||
'''
|
||||
#system2("g++ main.cc -O3 && mv a.out flutter/build/macos/Build/Products/Release/RustDesk.app/Contents/MacOS/serve")
|
||||
os.chdir("..")
|
||||
|
||||
|
||||
|
27
main.cc
27
main.cc
@ -1,27 +0,0 @@
|
||||
#include <dlfcn.h>
|
||||
#include <iostream>
|
||||
|
||||
int main()
|
||||
{
|
||||
void *handle = dlopen("../Frameworks/liblibrustdesk.dylib", RTLD_LAZY);
|
||||
if (!handle)
|
||||
{
|
||||
std::cerr << "Cannot open library: " << dlerror() << '\n';
|
||||
return 1;
|
||||
}
|
||||
|
||||
// use dlsym to get a symbol from the library
|
||||
typedef int (*some_func_t)();
|
||||
some_func_t some_func = (some_func_t)dlsym(handle, "rustdesk_core_main");
|
||||
const char *dlsym_error = dlerror();
|
||||
if (dlsym_error)
|
||||
{
|
||||
std::cerr << "Cannot load symbol 'some_func': " << dlsym_error << '\n';
|
||||
dlclose(handle);
|
||||
return 1;
|
||||
}
|
||||
|
||||
some_func();
|
||||
|
||||
dlclose(handle);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user