From 379c9d71220fb27ac897b2be159ee9a860e94ce1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=B2=D0=B0=D0=BD=20=D0=91=D1=83=D1=85=D0=BE=D0=B2?= Date: Fri, 17 Apr 2015 18:26:54 +0300 Subject: [PATCH 1/2] Removed mono references from documentation. --- README.md | 2 -- docs/man_pages/lib-management/library-add.md | 1 - 2 files changed, 3 deletions(-) diff --git a/README.md b/README.md index 3b919c1fdc..8b49918970 100644 --- a/README.md +++ b/README.md @@ -141,7 +141,6 @@ If you have installed Chocolatey, you can complete these steps to set up JDK, Ap * For iOS development * [Latest Xcode][12] * [Xcode command-line tools][12] - * (Optional for working with third-party libraries) [64-bit Mono][Mono] installed via Homebrew * For Android development * [JDK 7][JDK 7] or a later stable official release * [Apache Ant 1.8][Apache Ant 1.8] or a later stable official release @@ -530,4 +529,3 @@ This software is licensed under the Apache 2.0 license, quoted Date: Fri, 17 Apr 2015 15:52:11 +0300 Subject: [PATCH 2/2] CLI no longer calls metadata generator on library add. The metadata generation process is now a build step in the project template and there is no need to call it explicitly. --- lib/services/ios-project-service.ts | 34 ----------------------------- 1 file changed, 34 deletions(-) diff --git a/lib/services/ios-project-service.ts b/lib/services/ios-project-service.ts index c922402546..339f039ce7 100644 --- a/lib/services/ios-project-service.ts +++ b/lib/services/ios-project-service.ts @@ -174,8 +174,6 @@ class IOSProjectService implements IPlatformProjectService { this.$fs.ensureDirectoryExists(targetPath).wait(); shell.cp("-R", libraryPath, targetPath); - this.generateFrameworkMetadata(platformData.projectRoot, targetPath, frameworkName, umbrellaHeader).wait(); - var pbxProjPath = path.join(platformData.projectRoot, this.$projectData.projectName + ".xcodeproj", "project.pbxproj"); var project = new xcode.project(pbxProjPath); project.parseSync(); @@ -257,38 +255,6 @@ class IOSProjectService implements IPlatformProjectService { }).future()(); } - private generateFrameworkMetadata(projectRoot: string, frameworkDir: string, frameworkName: string, umbrellaHeader: string): IFuture { - return (() => { - if (!this.$fs.exists("/usr/local/lib/libmonoboehm-2.0.1.dylib").wait()) { - this.$errors.failWithoutHelp("NativeScript needs Mono 3.10 or newer installed in /usr/local"); - } - - var yamlOut = path.join(frameworkDir, "Metadata"); - this.$fs.createDirectory(yamlOut).wait(); - - var tempHeader = path.join(yamlOut, "Metadata.h"); - this.$fs.writeFile(tempHeader, util.format("#import <%s/%s>", frameworkName, umbrellaHeader)).wait(); - - this.$logger.info("Generating metadata for %s.framework. This can take a minute.", frameworkName); - var sdkPath = this.$childProcess.exec("xcrun -sdk iphoneos --show-sdk-path").wait().trim(); - // MetadataGenerator P/Invokes libclang.dylib, so we need to instruct the Mach-O loader where to find it. - // Without this Mono will fail with a DllNotFoundException. - // Once the MetadataGenerator is rewritten in C++ and starts linking Clang statically, this will become superfluous. - var generatorExecOptions = { - env: { - DYLD_FALLBACK_LIBRARY_PATH: this.$childProcess.exec("xcode-select -p").wait().trim() + "/Toolchains/XcodeDefault.xctoolchain/usr/lib" - } - }; - this.$childProcess.exec(util.format('%s/Metadata/MetadataGenerator -s %s -u %s -o %s -cflags="-F%s"', projectRoot, sdkPath, tempHeader, yamlOut, frameworkDir), generatorExecOptions).wait(); - - var metadataFileName = frameworkName + ".yaml"; - this.$fs.copyFile(path.join(yamlOut, "Metadata-armv7", metadataFileName), path.join(projectRoot, "Metadata", "Metadata-armv7", metadataFileName)).wait(); - this.$fs.copyFile(path.join(yamlOut, "Metadata-arm64", metadataFileName), path.join(projectRoot, "Metadata", "Metadata-arm64", metadataFileName)).wait(); - - this.$fs.deleteDirectory(yamlOut).wait(); - }).future()(); - } - private replaceFileContent(file: string): IFuture { return (() => { var fileContent = this.$fs.readText(file).wait();