Permalink
Browse files

Create distribution ANT task.

  • Loading branch information...
1 parent b2ce62c commit 3e2d7f39d32d440990afcd9a9c645a7da9e915c7 @mwbrooks mwbrooks committed Jul 26, 2011
Showing with 95 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +58 −0 build.xml
  3. +36 −0 template/dist/README.md
View
@@ -16,6 +16,7 @@ deliverables/
# Generated libraries
build/
+dist/
# OS X
View
@@ -12,9 +12,15 @@
<property name="template.project.dir" location="template/project" />
<property name="template.plugin.dir" location="template/plugin" />
+ <property name="template.dist.dir" location="template/dist" />
+
<property name="build.dir" location="build" />
<property name="update.dir" value="lib/phonegap.${version}" />
+ <property name="dist.path" location="dist" />
+ <property name="dist.www.path" location="${dist.path}/www" />
+ <property name="dist.project.path" location="${dist.path}/sample" />
+
<property name="jar.src" location="framework/ext/src" />
<property name="jar.path" value="ext" />
<property name="jar.basename" value="phonegap.${version}.jar" />
@@ -96,6 +102,54 @@ Getting Started:
</echo>
</target>
+ <!-- DISTRIBUTION -->
+ <target name="dist" depends="">
+ <!-- create a sample project -->
+ <antcall target="create">
+ <param name="project.path" value="${dist.project.path}" />
+ </antcall>
+
+ <!-- copy dist template (README.md) -->
+ <copy todir="${dist.path}">
+ <fileset dir="${template.dist.dir}" />
+ </copy>
+
+ <!-- copy phonegap.jar -->
+ <copy todir="${dist.www.path}/ext">
+ <fileset dir="${build.dir}/${jar.path}" />
+ </copy>
+
+ <!-- copy phonegap.js -->
+ <copy todir="${dist.www.path}">
+ <fileset dir="${build.dir}/${js.path}" />
+ </copy>
+
+ <!-- copy config.xml -->
+ <copy todir="${dist.www.path}">
+ <fileset file="${template.project.dir}/www/config.xml" />
+ </copy>
+
+ <!-- copy plugins.xml -->
+ <copy todir="${dist.www.path}">
+ <fileset file="${template.project.dir}/www/plugins.xml" />
+ </copy>
+
+ <echo>
+Distribution Complete!
+======================
+
+Version:
+--------
+
+ ${version}
+
+Path:
+-----
+
+ ${dist.path}
+ </echo>
+ </target>
+
<!-- UPDATE A PROJECT -->
<target name="update" depends="clean, build-javascript, build-extension">
@@ -194,6 +248,7 @@ Getting Started:
<target name="clean">
<delete dir="${build.dir}" />
+ <delete dir="${dist.path}" />
</target>
<!-- HELP -->
@@ -223,6 +278,9 @@ COMMANDS
ant update PATH
ant update -Dproject.path="C:\dev\my_project"
+ dist ............ Create a PhoneGap distribution build
+ ant dist
+
create-plugin ... Create a new plugin
ant create-plugin PATH
ant create-plugin -Dplugin.path="C:\dev\my_plugin"
View
@@ -0,0 +1,36 @@
+PhoneGap BlackBerry WebWorks Distribution
+=========================================
+
+Directory Structure
+-------------------
+
+ sample/ ... Ready-to-run sample project
+ www/ ...... Barebones needed to create your own project
+
+Ready-to-Run Sample Project
+---------------------------
+
+> Arguably the quickest and best way to start a new project
+
+[Follow the wiki's tutorial on installing the WebWorks SDK and running a project](http://wiki.phonegap.com/w/page/31930982/Getting-Started-with-PhoneGap-BlackBerry-WebWorks#RunthePhoneGapSampleApplication).
+
+Barebones Projects
+------------------
+
+> Taking the hard road or developing with Eclipse
+
+[Follow the wiki's tutorial on developing a WebWorks application with the Eclipse IDE.](http://wiki.phonegap.com/w/page/31930982/Getting-Started-with-PhoneGap-BlackBerry-WebWorks#DevelopaPhoneGapApplicationUsingEclipseIDE)
+
+### config.xml
+
+`www/config.xml` is a sample that you are free to alter.
+
+The necessary PhoneGap sections are `<feature>` and `<access>`:
+
+ <!-- PhoneGap API -->
+ <feature ... />
+ <feature ... />
+
+ <!-- PhoneGap API -->
+ <access ... />
+ <access ... />

0 comments on commit 3e2d7f3

Please sign in to comment.