From 8d1752ff7a27d428a3c3263806ba716c5dd0e60b Mon Sep 17 00:00:00 2001
From: Eric Miller
Date: Thu, 1 Feb 2018 13:08:15 -0600
Subject: [PATCH 1/3] Fix issue with Unity Data folder creating extraneous
folders in Xcode project
---
.../UBKit/Files/Unity/UnityEditorBuildScript.swift | 2 +-
Sources/UBKit/Workers/XcodeProject.swift | 14 ++++++++++----
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/Sources/UBKit/Files/Unity/UnityEditorBuildScript.swift b/Sources/UBKit/Files/Unity/UnityEditorBuildScript.swift
index 126e6cb..2fa4f24 100644
--- a/Sources/UBKit/Files/Unity/UnityEditorBuildScript.swift
+++ b/Sources/UBKit/Files/Unity/UnityEditorBuildScript.swift
@@ -67,7 +67,7 @@ extension File {
var pbxPath = Path.Combine(iOSProjectRoot, PbxFilePath);
pbx.ReadFromFile(pbxPath);
- var folderGuid = pbx.AddFolderReference(Path.Combine(folderRootPath, "Data"), Path.Combine(iOSProjectRoot, DataProjectPath), PBXSourceTree.Absolute);
+ var folderGuid = pbx.AddFolderReference(Path.Combine(folderRootPath, "Data"), DataProjectPath, PBXSourceTree.Absolute);
var targetGiud = pbx.TargetGuidByName(iOSProjectName);
var resourceGiud = pbx.GetResourcesBuildPhaseByTarget(targetGiud);
pbx.AddFileToBuildSection(targetGiud, resourceGiud, folderGuid);
diff --git a/Sources/UBKit/Workers/XcodeProject.swift b/Sources/UBKit/Workers/XcodeProject.swift
index 4679b1b..d201ccf 100644
--- a/Sources/UBKit/Workers/XcodeProject.swift
+++ b/Sources/UBKit/Workers/XcodeProject.swift
@@ -31,6 +31,8 @@ class XcodeProject {
private let unityVersion: String
private let projectPath: String
private let vendorFolderPath: String
+ private let vendorClassesFolderPath: String
+ private let vendorLibrariesFolderPath: String
private let specFileName: String
private let bridgingFilesPath: String
@@ -45,6 +47,8 @@ class XcodeProject {
self.projectPath = workingPath.appending(projectName).appending("/")
self.vendorFolderPath = workingPath.appending("Vendor/UBK/")
+ self.vendorClassesFolderPath = vendorFolderPath.appending("Classes")
+ self.vendorLibrariesFolderPath = vendorFolderPath.appending("Libraries")
self.specFileName = "project.yml"
self.bridgingFilesPath = projectPath.appending("UnityBridge/")
}
@@ -80,9 +84,9 @@ class XcodeProject {
return unityFilesResult
}
- let unityFolderResult = createUnityVendorFolder()
- guard unityFolderResult == .success else {
- return unityFolderResult
+ let unityFoldersResult = createUnityVendorFolders()
+ guard unityFoldersResult == .success else {
+ return unityFoldersResult
}
let projectGenerationResult = generateXcodeProject()
@@ -211,9 +215,11 @@ private extension XcodeProject {
}
}
- func createUnityVendorFolder() -> Result {
+ func createUnityVendorFolders() -> Result {
do {
try fileManager.createDirectory(atPath: vendorFolderPath, withIntermediateDirectories: true, attributes: nil)
+ try fileManager.createDirectory(atPath: vendorClassesFolderPath, withIntermediateDirectories: true, attributes: nil)
+ try fileManager.createDirectory(atPath: vendorLibrariesFolderPath, withIntermediateDirectories: true, attributes: nil)
return .success
} catch {
From e605cf4c4239d89989e1a15f440ff42d1cfdf587 Mon Sep 17 00:00:00 2001
From: Eric Miller
Date: Thu, 1 Feb 2018 13:09:17 -0600
Subject: [PATCH 2/3] Rev version to 1.1.1
---
Makefile | 2 +-
UnityBuildKit.xcodeproj/UBKit_Info.plist | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 7677a6a..baad4d8 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
TOOL_NAME = UnityBuildKit
-VERSION = 0.7.0
+VERSION = 1.1.1
PREFIX = /usr/local
INSTALL_PATH = $(PREFIX)/bin/$(TOOL_NAME)
diff --git a/UnityBuildKit.xcodeproj/UBKit_Info.plist b/UnityBuildKit.xcodeproj/UBKit_Info.plist
index a6f720e..c6f194e 100644
--- a/UnityBuildKit.xcodeproj/UBKit_Info.plist
+++ b/UnityBuildKit.xcodeproj/UBKit_Info.plist
@@ -15,7 +15,7 @@
CFBundlePackageType
FMWK
CFBundleShortVersionString
- 1.1
+ 1.1.1
CFBundleSignature
????
CFBundleVersion
From a88a016cd6d44d54b2d62b9e8c8270de7e3c5442 Mon Sep 17 00:00:00 2001
From: Eric Miller
Date: Thu, 1 Feb 2018 13:09:59 -0600
Subject: [PATCH 3/3] Updating README
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index cc23e62..0940beb 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
-
+