All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.qt.activex.QtJambi_LibraryUtilities Maven / Gradle / Ivy

package io.qt.activex;

import io.qt.*;
import static io.qt.QtUtilities.*;

/**
 * @hidden
 */
final class QtJambi_LibraryUtilities {

    final static int qtMajorVersion = 6;

    final static int qtMinorVersion = 8;

    final static int qtJambiPatch = 0;

    final static InternalAccess internal;

    static{
        try {
            initializePackage("io.qt.core");
            loadQtLibrary("DBus", LibraryRequirementMode.ProvideOnly, "macos", "linux");
            loadQtLibrary("EglFSDeviceIntegration", LibraryRequirementMode.ProvideOnly, "linux");
            loadQtLibrary("Network", LibraryRequirementMode.ProvideOnly);
            loadQtLibrary("OpenGL", LibraryRequirementMode.ProvideOnly, "linux");
            loadQtLibrary("Pdf", LibraryRequirementMode.ProvideOnly);
            loadQtLibrary("Svg", LibraryRequirementMode.ProvideOnly);
            loadQtLibrary("WaylandClient", LibraryRequirementMode.ProvideOnly, "linux");
            loadQtLibrary("WaylandEglClientHwIntegration", LibraryRequirementMode.ProvideOnly, "linux");
            loadQtLibrary("WlShellIntegration", LibraryRequirementMode.ProvideOnly, "linux");
            loadQtLibrary("XcbQpa", LibraryRequirementMode.ProvideOnly, "linux");
            loadUtilityLibrary("d3dcompiler_47", LibraryRequirementMode.ProvideOnly, "windows");
            loadUtilityLibrary("libEGL", LibraryRequirementMode.ProvideOnly, "windows");
            loadUtilityLibrary("libGLESv2", LibraryRequirementMode.ProvideOnly, "windows");
            loadUtilityLibrary("opengl32sw", LibraryRequirementMode.ProvideOnly, "windows");
            loadQtLibrary("Gui", LibraryRequirementMode.Mandatory);
            loadQtLibrary("Widgets", LibraryRequirementMode.Mandatory);
            loadQtJambiLibrary("ActiveX");
        } catch(Error t) {
            throw t;
        } catch(Throwable t) {
            throw new ExceptionInInitializerError(t);
        }
        internal = internalAccess();

        int version = qtCompileVersion();
        int majorVersion = (version >> 16) & 0xff;
        int minorVersion = (version >> 8) & 0xff;
        int patchVersion = version & 0xff;
        io.qt.core.QVersionNumber runtimeVersion = io.qt.core.QLibraryInfo.version();
        if(runtimeVersion.majorVersion()!=majorVersion || runtimeVersion.minorVersion()!=minorVersion || runtimeVersion.microVersion()!=patchVersion)
            throw new Error(String.format("Cannot mix incompatible Qt library. This library has been built with Qt %1$s.%2$s.%3$s and cannot run with Qt %4$s.%5$s.%6$s",
                                            majorVersion, minorVersion, patchVersion,
                                            runtimeVersion.majorVersion(), runtimeVersion.minorVersion(), runtimeVersion.microVersion()
                                        ));
    }

    private static native int qtCompileVersion();
    private static native InternalAccess internalAccess();

    static void initialize() { };

    private QtJambi_LibraryUtilities() throws InstantiationError { throw new InstantiationError("Cannot instantiate QtJambi_LibraryUtilities."); }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy