From 91cab0f7a4c5ef2f810af189a4a8741c86194d28 Mon Sep 17 00:00:00 2001 From: Gary Mathews Date: Mon, 19 Jan 2015 13:43:40 -0800 Subject: [PATCH 1/3] Add command to append windows apis to yaml and jsca --- SConstruct | 6 +++--- site_scons/package.py | 12 +++++++----- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/SConstruct b/SConstruct index 8b4589cd94f..1b6c5f9cb35 100644 --- a/SConstruct +++ b/SConstruct @@ -226,10 +226,10 @@ def package_sdk(target, source, env): packager = package.Packager(build_jsca=build_jsca) if package_all: print "...on All platforms" - packager.build_all_platforms(os.path.abspath('dist'), version, module_apiversion, android, iphone, ipad, mobileweb, blackberry, tizen, windows, ivi, version_tag) - else: + packager.build_all_platforms(os.path.abspath('dist'), version, module_apiversion, android, iphone, ipad, mobileweb, blackberry, tizen, ivi, windows, version_tag) + else:windows print "...on specified platforms" - packager.build(os.path.abspath('dist'), version, module_apiversion, android, iphone, ipad, mobileweb, blackberry, tizen, windows, ivi, version_tag) + packager.build(os.path.abspath('dist'), version, module_apiversion, android, iphone, ipad, mobileweb, blackberry, tizen, ivi, windows, version_tag) if install and not clean: print "...Installing SDK" install_mobilesdk(version_tag) diff --git a/site_scons/package.py b/site_scons/package.py index c4b100aa958..e3ad307fd82 100755 --- a/site_scons/package.py +++ b/site_scons/package.py @@ -56,8 +56,10 @@ def ignore(file): return True return False -def generate_jsca(): - process_args = [sys.executable, os.path.join(doc_dir, 'docgen.py'), '-f', 'jsca', '--stdout'] +def generate_jsca(windows): + process_args = ['node', os.path.join(doc_dir, 'docgen.js'), '-f', 'jsca', '--stdout'] + if windows: + process_args.extend(['-a', os.path.join(top_dir, 'windows', 'doc', 'Titanium')]) print "Generating JSCA..." print " ".join(process_args) jsca_temp_file = tempfile.TemporaryFile() @@ -452,7 +454,7 @@ def zip_mobilesdk(dist_dir, osname, version, module_apiversion, android, iphone, # check if we should build the content assist file if build_jsca: - jsca = generate_jsca() + jsca = generate_jsca(windows) if jsca is None: # This is fatal. If we were meant to build JSCA # but couldn't, then packaging fails. @@ -507,7 +509,7 @@ def build(self, dist_dir, version, module_apiversion, android=True, iphone=True, if version_tag == None: version_tag = version - zip_mobilesdk(dist_dir, os_names[platform.system()], version, module_apiversion, android, iphone, ipad, mobileweb, blackberry, tizen, windows, ivi, version_tag, self.build_jsca) + zip_mobilesdk(dist_dir, os_names[platform.system()], version, module_apiversion, android, iphone, ipad, mobileweb, blackberry, tizen, ivi, windows, version_tag, self.build_jsca) def build_all_platforms(self, dist_dir, version, module_apiversion, android=True, iphone=True, ipad=True, mobileweb=True, blackberry=True, tizen=True, ivi=True, windows=True, version_tag=None): global packaging_all @@ -519,7 +521,7 @@ def build_all_platforms(self, dist_dir, version, module_apiversion, android=True remove_existing_zips(dist_dir, version_tag) for os in os_names.values(): - zip_mobilesdk(dist_dir, os, version, module_apiversion, android, iphone, ipad, mobileweb, blackberry, tizen, windows, ivi, version_tag, self.build_jsca) + zip_mobilesdk(dist_dir, os, version, module_apiversion, android, iphone, ipad, mobileweb, blackberry, tizen, ivi, windows, version_tag, self.build_jsca) if __name__ == '__main__': Packager().build(os.path.abspath('../dist'), "1.1.0") From c43c6f21f36ae8dae5cc8eae1773c49ccc92994e Mon Sep 17 00:00:00 2001 From: Gary Mathews Date: Mon, 19 Jan 2015 13:45:52 -0800 Subject: [PATCH 2/3] Fix typo in SConstruct --- SConstruct | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SConstruct b/SConstruct index 1b6c5f9cb35..d377c354929 100644 --- a/SConstruct +++ b/SConstruct @@ -227,7 +227,7 @@ def package_sdk(target, source, env): if package_all: print "...on All platforms" packager.build_all_platforms(os.path.abspath('dist'), version, module_apiversion, android, iphone, ipad, mobileweb, blackberry, tizen, ivi, windows, version_tag) - else:windows + else: print "...on specified platforms" packager.build(os.path.abspath('dist'), version, module_apiversion, android, iphone, ipad, mobileweb, blackberry, tizen, ivi, windows, version_tag) if install and not clean: From e19c6fe2dab7abdb3fbe7afa653749e0bd878b6c Mon Sep 17 00:00:00 2001 From: Gary Mathews Date: Tue, 20 Jan 2015 11:23:21 -0800 Subject: [PATCH 3/3] Allow package.py to install npm packages --- site_scons/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/site_scons/package.py b/site_scons/package.py index e3ad307fd82..9c2c382aba5 100755 --- a/site_scons/package.py +++ b/site_scons/package.py @@ -31,6 +31,10 @@ buildtime = datetime.datetime.now() ts = buildtime.strftime("%m/%d/%y %H:%M") +print "Installing npm packages..." +p = subprocess.Popen(["npm","install"],cwd=doc_dir) +p.wait() + # get the githash for the build so we can always pull this build from a specific # commit gitCmd = "git"