Browse files

Early tests with just a list of apps and base versions

- just builds a package for each item, of the latest HD update for that version
  • Loading branch information...
timsutton committed Nov 4, 2016
1 parent 1b601d0 commit 277fd458bb1cd9a3403c4254af013cc4756f425b
Showing with 132 additions and 0 deletions.
  1. +132 −0 ccp_auto
132 ccp_auto
@@ -0,0 +1,132 @@
import json
import os
import shutil
import subprocess
import tempfile
import urllib2
from distutils.version import LooseVersion as LV
from pprint import pprint
from string import Template
from xml.etree import ElementTree
# Let's try a manifest of (SAPCode, BaseVersion) pairs for HD installers
# Note there is zero sanity checking for whether these are HD! RIBS won't work!
('AEFT', '13.8.0'),
('AEFT', '14.0.0'),
('AME', '10.3.0'),
('AME', '11.0.0'),
('AUDT', '9.2.0'),
('AUDT', '10.0.0'),
('DRWV', '17.0.0'),
('FLPR', '16.0'),
('KBRG', '6.3'),
('ILST', '20.0.0'),
('ILST', '21.0.0'),
('PHSP', '17.0'),
('PHSP', '18.0'),
('PPRO', '10.3.0'),
('PPRO', '11.0.0'),
('PRLD', '5.0.0'),
OUTPUT_DIR = "~/Desktop/CC"
TEMPLATE_XML = """<CCPPackage>
<organizationName>Concordia University, Quebec</organizationName>
<!-- ProductCategory should be left 'Custom' -->
URL = ''
req = urllib2.Request(URL, headers={
'User-Agent': 'Creative Cloud',
'x-adobe-app-id': 'AUSST_4_0',
data = json.loads(urllib2.urlopen(req).read())
ccm_data = {}
for channel in data['channel']:
if channel['name'] == 'ccm':
# Yes, the products dict has one key, 'product', which is an array
print "Product list:"
for prod in ccm_data['products']['product']:
print "%s - %s - %s" % (prod['displayName'], prod['id'], prod['version'])
manifests = []
# It would be more efficient to iterate through the entire set once
for pkg in PACKAGES:
sap, base_version = pkg[0], pkg[1]
matching_prods = []
for prod in ccm_data['products']['product']:
if prod['id'] != sap:
# baseVersion may not exist for some obscure entries like AdobeSetup
if prod['platforms']['platform'][0]['languageSet'][0].get('baseVersion') == base_version:
# Now sort products by 'version' descending
newest_product = sorted(matching_prods, key=lambda k: LV(k['version']), reverse=True)[0]
# pprint(newest_product)
'sap_code': newest_product['id'],
'version': newest_product['version'],
'display_name': newest_product['displayName'],
'minimum_os_version': newest_product['platforms']['platform'][0]['systemCompatibility']['operatingSystem']['range'][0].split('-')[0],
output_dir = os.path.expanduser(OUTPUT_DIR)
for manifest in manifests:
# should probably normalize the pkg name to something without spaces, parens
pkg_name = manifest['display_name']
if os.path.exists(os.path.join(output_dir, pkg_name)):
shutil.rmtree(os.path.join(output_dir, pkg_name))
xml_data = Template(TEMPLATE_XML).safe_substitute(
(xml_fd, xml_path) = tempfile.mkstemp()
os.write(xml_fd, xml_data)
cmd = ['/Applications/Utilities/Adobe Application Manager/core/Adobe Application',
'--pkgConfigFile=%s' % xml_path]

0 comments on commit 277fd45

Please sign in to comment.