public void Can_download_osx_runtime() { if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) || RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) { RuntimeManager.DownloadRuntimeToDirectory(QmlNetConfig.QtBuildVersion, RuntimeTarget.OSX64, _tempDirectory); File.ReadAllText(Path.Combine(_tempDirectory, "version.txt")).Should().Be($"{QmlNetConfig.QtBuildVersion}-osx-x64"); var permissions = UnixFileInfo .GetFileSystemEntry(Path.Combine(_tempDirectory, "qt", "lib", "QtXml.framework", "Versions", "5", "QtXml")) .FileAccessPermissions; permissions.Should().Be(FileAccessPermissions.UserReadWriteExecute | FileAccessPermissions.GroupRead | FileAccessPermissions.GroupExecute | FileAccessPermissions.OtherRead | FileAccessPermissions.OtherExecute); // Make sure links are setup correctly. Directory.Exists(Path.Combine(_tempDirectory, "qt", "lib", "QtXml.framework", "Versions", "Current")).Should().BeTrue(); } }
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); }
public void Can_download_windows_runtime() { RuntimeManager.DownloadRuntimeToDirectory(QmlNetConfig.QtBuildVersion, RuntimeTarget.Windows64, _tempDirectory); File.ReadAllText(Path.Combine(_tempDirectory, "version.txt")).Should().Be($"{QmlNetConfig.QtBuildVersion}-win-x64"); }