cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject [1/8] ios commit: Change create script to copy CordovaLib into new projects.
Date Tue, 02 Oct 2012 18:16:22 GMT
Updated Branches:
  refs/heads/master 4aea2d5a9 -> 5c08162d0


Change create script to copy CordovaLib into new projects.

Fixes issue: https://issues.apache.org/jira/browse/CB-1526


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/commit/5c08162d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/5c08162d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/5c08162d

Branch: refs/heads/master
Commit: 5c08162d0fea5852e8e5ce7ba9e52c2c8b7507f6
Parents: 88bb559
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Tue Oct 2 14:12:10 2012 -0400
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Tue Oct 2 14:12:10 2012 -0400

----------------------------------------------------------------------
 bin/create                    |    9 ++++++++-
 bin/update_cordova_subproject |   11 +++++++----
 2 files changed, 15 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/5c08162d/bin/create
----------------------------------------------------------------------
diff --git a/bin/create b/bin/create
index efeac87..b1e9af1 100755
--- a/bin/create
+++ b/bin/create
@@ -106,5 +106,12 @@ R=$PROJECT_PATH/$PROJECT_NAME
 
 "$BINDIR/replaces" "$R/$PROJECT_NAME-Info.plist" --ID-- $PACKAGE
 
+# Copy in the CordovaLib directory.
+mkdir -p "$PROJECT_PATH/CordovaLib/CordovaLib.xcodeproj"
+cp -r "$BINDIR/../CordovaLib/Classes" "$PROJECT_PATH/CordovaLib"
+cp "$BINDIR/../CordovaLib/VERSION" "$PROJECT_PATH/CordovaLib"
+cp "$BINDIR/../CordovaLib/CordovaLib_Prefix.pch" "$PROJECT_PATH/CordovaLib"
+cp "$BINDIR/../CordovaLib/CordovaLib.xcodeproj/project.pbxproj" "$PROJECT_PATH/CordovaLib/CordovaLib.xcodeproj"
+
 # Make the sub-project reference to Cordova have the correct path.
-"$BINDIR/update_cordova_subproject" "$R.xcodeproj/project.pbxproj" > /dev/null
+"$BINDIR/update_cordova_subproject" "$R.xcodeproj/project.pbxproj" "$PROJECT_PATH/CordovaLib/CordovaLib.xcodeproj/project.pbxproj"
> /dev/null

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/5c08162d/bin/update_cordova_subproject
----------------------------------------------------------------------
diff --git a/bin/update_cordova_subproject b/bin/update_cordova_subproject
index ab5655a..fca4700 100755
--- a/bin/update_cordova_subproject
+++ b/bin/update_cordova_subproject
@@ -20,7 +20,7 @@ under the License.
 """
 Updates the subproject path of the CordovaLib entry to point to this script's version of
Cordova.
 
-Usage: CordovaVersion/bin/update_cordova_project path/to/your/app.xcodeproj
+Usage: CordovaVersion/bin/update_cordova_project path/to/your/app.xcodeproj [path/to/CordovaLib.xcodeproj]
 """
 
 import fileinput
@@ -54,14 +54,17 @@ def AbsProjectPath(relative_path):
   return project_path
 
 def main(argv):
-  if len(argv) != 2:
+  if len(argv) < 2 or len(argv) > 3:
     Usage()
 
-  framework_path = AbsFrameworkPath(argv[0])
   project_path = AbsProjectPath(argv[1])
+  if len(argv) < 3:
+    framework_path = AbsFrameworkPath(argv[0])
+    cordova_lib_xcode_path = os.path.join(framework_path, 'CordovaLib', 'CordovaLib.xcodeproj')
+  else:
+    cordova_lib_xcode_path = AbsProjectPath(argv[2])
 
   parent_project_path = AbsParentPath(project_path)
-  cordova_lib_xcode_path = os.path.join(framework_path, 'CordovaLib', 'CordovaLib.xcodeproj')
   subproject_path = os.path.relpath(cordova_lib_xcode_path, parent_project_path)
 
   # /* CordovaLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project";
path = CordovaLib.xcodeproj; sourceTree = "<group>"; };


Mime
View raw message