Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-18338] Add command to append windows apis to yaml and jsca #6583

Merged
merged 3 commits into from Jan 20, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions SConstruct
Expand Up @@ -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)
packager.build_all_platforms(os.path.abspath('dist'), version, module_apiversion, android, iphone, ipad, mobileweb, blackberry, tizen, ivi, windows, version_tag)
else:
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)
Expand Down
16 changes: 11 additions & 5 deletions site_scons/package.py
Expand Up @@ -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"
Expand All @@ -56,8 +60,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()
Expand Down Expand Up @@ -452,7 +458,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.
Expand Down Expand Up @@ -507,7 +513,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
Expand All @@ -519,7 +525,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")