now builds a complete Customizable package
authorKevin Dangoor <kdangoor@mozilla.com>
Wed, 13 Jan 2010 08:47:57 -0500
changeset 573 aee853d0a16a0ee5186091927bf0904980e3219e
parent 572 be3cbd921222b55e9bff8811a8596c8a44c16f48
child 574 c76479d3d7da7dc961592444cb292e8e578d2235
push id256
push userkdangoor@mozilla.com
push dateWed, 13 Jan 2010 16:15:39 +0000
now builds a complete Customizable package
embedded/README-Customizable.txt
embedded/dryice.py
embedded/sample.json
pavement.py
new file mode 100644
--- /dev/null
+++ b/embedded/README-Customizable.txt
@@ -0,0 +1,11 @@
+Bespin Embedded Customizable
+============================
+
+The "Customizable" Bespin Embedded release allows you to change which features
+are built into your Bespin Embedded script, even including your own custom
+features.
+
+You'll need either Python 2.5 with simplejson or Python 2.6 to build your own
+custom Bespin.
+
+For more information, look in the docs directory.
\ No newline at end of file
new file mode 100755
--- /dev/null
+++ b/embedded/dryice.py
@@ -0,0 +1,12 @@
+#!/usr/bin/env python
+
+# Simple script to run dryice conveniently in the Customizable package
+
+import sys
+import os
+
+mydir = os.path.dirname(__file__)
+sys.path.insert(0, os.path.join(mydir, "lib"))
+
+from dryice import tool
+tool.main()
new file mode 100644
--- /dev/null
+++ b/embedded/sample.json
@@ -0,0 +1,5 @@
+{
+    "output_dir": "tmp",
+    "plugins": ["BespinEmbedded"],
+    "include_sample": true
+}
\ No newline at end of file
--- a/pavement.py
+++ b/pavement.py
@@ -497,29 +497,66 @@ def hidefiles():
 
 @task
 @needs(['build_docs', 'fetch_compiler'])
 def release_embed(options):
     builddir = options.builddir
     if not builddir.exists():
         builddir.mkdir()
     
+    yui_compressor = path("abbot/vendor/yui-compressor/yuicompressor-2.4.2.jar")
+    closure_compiler = options.fetch_compiler.dest_dir / "compiler.jar"
+    
     version = options.version.number
     outputdir = builddir / ("BespinEmbedded-DropIn-%s" 
         % (version))
     
     info("Building DropIn using dryice")
-    info(sh('dryice -Doutput_dir=\\"%s\\" dropin.json' % (outputdir), capture=True, ignore_error=True))
+    info(sh('dryice -Doutput_dir=\\"%s\\" dropin.json' % (outputdir), 
+        capture=True, ignore_error=True))
     
     path("LICENSE.txt").copy(outputdir / "LICENSE.txt")
     path("embedded/README-DropIn.txt").copy(outputdir / "README.txt")
     (builddir / "docs").copytree(outputdir / "docs")
     sh("tar czf BespinEmbedded-DropIn-%s.tar.gz BespinEmbedded-DropIn-%s" % \
         (version, version), cwd="tmp")
     
+    outputdir = builddir / ("BespinEmbedded-Customizable-%s" % (version))
+    info("Building Customizable package")
+    if outputdir.exists():
+        outputdir.rmtree()
+    outputdir.mkdir()
+    path("LICENSE.txt").copy(outputdir / "LICENSE.txt")
+    path("embedded/README-Customizable.txt").copy(outputdir / "README.txt")
+    (builddir / "docs").copytree(outputdir / "docs")
+    
+    frameworks_dir = outputdir / "frameworks"
+    frameworks_dir.mkdir()
+    path("frameworks/bespin").copytree(frameworks_dir / "bespin")
+    path("sproutcore").copytree(outputdir / "sproutcore")
+    
+    libdir = outputdir / "lib"
+    libdir.mkdir()
+    dryice_dest = libdir / "dryice"
+    path("dryice").copytree(dryice_dest)
+    for f in dryice_dest.walkfiles("*.pyc"):
+        f.unlink()
+        
+    path("embedded/dryice.py").copy(outputdir / "dryice.py")
+    path("plugins").copytree(outputdir / "plugins")
+    path("embedded/sample.json").copy(outputdir / "sample.json")
+    
+    compressors_dir = outputdir / "compressors"
+    compressors_dir.mkdir()
+    
+    yui_compressor.copy(compressors_dir / "yuicompressor.jar")
+    closure_compiler.copy(compressors_dir / "compiler.jar")
+    
+    sh("tar czf BespinEmbedded-Customizable-%s.tar.gz BespinEmbedded-Customizable-%s" % \
+        (version, version), cwd="tmp")
     
 def _fetchfile(name, dest_dir, download_location, download_url):
     external = path("external")
     if not dest_dir.exists():
         external.mkdir()
         if not download_location.exists():
             info("Downloading %s from %s", name, download_url)
             zi = urllib2.urlopen(download_url)