Including GTK # Dll with Static Connection (mkbundle) Mono Exe on Mac

I have a C # encoded application using Mono Framework and GTK # for UI. I am trying to create a static package for MacOSX (including gtk # and mono runtime)

I just linked Mono with my exe file using

mkbundle --static hello.exe -o --deps hello2.exe

I got the exe file, but when I dragged it and put it on the terminal, I got System.DllNotFound Exception:glibsharpglue-2

I understand that I need to enable the gtk # libraries. But I don’t know how to do this with statically linked mono runtime.Is there is an option to do this with mkbundle. All I need to get is the final standalone package, ready to work on Mac.

Please help me.

UPDATE: Shell script I am currently using Platypus to create a .app package

export DYLD_FALLBACK_LIBRARY_PATH="/Library/Frameworks/Mono.framework/Versions/Current/lib:$DYLD_FALLBACK_LIBRARY_PATH:/usr/lib"    
exec /Library/Frameworks/Mono.framework/Versions/Current/bin/mono myapp.exe

, , myapp.exe. DLL, GTK? , .

+4
2

, GTK (SO/dylib).

mkbundle:

32- Mono AS CC. clang x86_64, Mono arch.

export AS="as -arch i386"
export CC="cc -arch i386 -framework CoreFoundation -lobjc -liconv"

mkbundle gtkdesigner.exe --deps -o gtkdemo

Mono ( /dylib ).

--static, , , LGPL Mono ( CIL, Mono, , Xamarin)

mkbundle --static gtkdesigner.exe --deps -o gtkdemo

Mono, /dylib .

GTK/GTK #:

GTK # - , /dylibs GTK (.. gtkdemo ):

, ./gtkdemo, , libc.dylib, libgtksharpglue-2.so .. .., , .

dylib GTK, # CIL (GTK #), . Mono OS-X, GTK, /Library/Frameworks/Mono.framework/Versions/Current/lib. GTK , . std C.

export DYLD_FALLBACK_LIBRARY_PATH="/Library/Frameworks/Mono.framework/Versions/Current/lib:/usr/lib"
./gtkdemo

. gtkdemo OS-X, packager, http://sveinbjorn.org/platypus. GTK so/dylib app script, DYLIB, GTK-, app. app, , GTK.

+2

gkt # - , ? git : git clone https://github.com/mono/gtk-sharp

gtk-sharp .

. , - gtk OSX, gtk-sharp - .

0

Source: https://habr.com/ru/post/1611158/


All Articles