Beispiel #1
0
 public void Load() => new Action(() =>
 {
     var runtimeDir = Path.Combine(Container.Get <IBootstrapper>().ApplicationDirectory, "qmlnet-qt-runtimes");
     if (!Directory.Exists(runtimeDir))
     {
         var stream = Assembly.GetManifestResourceStream(ResourceName);
         RuntimeManager.ExtractTarGZStream(stream, runtimeDir);
     }
     RuntimeManager.ConfigureRuntimeDirectory(runtimeDir);
 })();
Beispiel #2
0
        static void PrepareRuntime()
        {
            var qtVersion      = QmlNetConfig.QtBuildVersion;
            var runtimeTarget  = RuntimeManager.GetCurrentRuntimeTarget();
            var runtimeVersion = qtVersion + "-" + RuntimeTargetToString(runtimeTarget);
            var runtimePath    = Path.Combine
                                 (
                AppContext.BaseDirectory,
                runtimeVersion
                                 );

            if (!Directory.Exists(runtimePath))
            {
                Directory.CreateDirectory(runtimePath);
                RuntimeManager.DownloadRuntimeToDirectory
                (
                    qtVersion,
                    runtimeTarget,
                    runtimePath
                );
            }

            RuntimeManager.ConfigureRuntimeDirectory(runtimePath);
        }