Application binary interface.
Esempio n. 1
0
 private static string GetNativeLibraryResource(ABI abi)
 {
     if (abi.Equals(ABI.Windows_X86))
         return "windows/x86/yeppp.dll";
     else if (abi.Equals(ABI.Windows_X86_64))
         return "windows/x86_64/yeppp.dll";
     else if (abi.Equals(ABI.OSX_X86))
         return "osx/x86/libyeppp.dylib";
     else if (abi.Equals(ABI.OSX_X86_64))
         return "osx/x86_64/libyeppp.dylib";
     else if (abi.Equals(ABI.Linux_X86))
         return "linux/x86/libyeppp.so";
     else if (abi.Equals(ABI.Linux_X86_64))
         return "linux/x86_64/libyeppp.so";
     else if (abi.Equals(ABI.Linux_ARMEL))
         return "linux/armel/libyeppp.so";
     else if (abi.Equals(ABI.Linux_ARMHF))
         return "linux/armhf/libyeppp.so";
     else
         return null;
 }
Esempio n. 2
0
 private static INativeLibraryLoader GetNativeLibraryLoader(ABI abi)
 {
     if (abi.IsWindows())
         return new WindowsLibraryLoader();
     else if (abi.IsLinux())
         return new LinuxLibraryLoader();
     else if (abi.IsOSX())
         return new OSXLibraryLoader();
     else
         return null;
 }
Esempio n. 3
0
        internal static void Init()
        {
            Library.processABI = Process.DetectABI();

            #if YEP_BUNDLE_LIBRARY
                Library.nativeLibrary = Loader.LoadNativeLibrary();
                Library.Bind(nativeLibrary);
                Core.Bind(nativeLibrary);
                Math.Bind(nativeLibrary);
            #endif
            Status status = yepLibrary_Init();
            if (status != Status.Ok)
                throw new System.SystemException("Failed to initialize Yeppp! library");
        }