From 3f19016bb42ac986532a9a3d2bc1684a17511043 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sun, 9 Feb 2014 02:39:44 +0000 Subject: [PATCH] change docset names, add icons git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@75848 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- build.py | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/build.py b/build.py index a1918255..3e7cc872 100755 --- a/build.py +++ b/build.py @@ -51,6 +51,8 @@ isDarwin = sys.platform == "darwin" baseName = 'wxPython_Phoenix' eggInfoName = baseName + '.egg-info' +pyICON = 'docs/sphinx/_static/images/sphinxdocs/phoenix_title.png' +wxICON = 'docs/sphinx/_static/images/sphinxdocs/mondrian.png' # Some tools will be downloaded for the builds. These are the versions and # MD5s of the tool binaries currently in use. @@ -686,6 +688,7 @@ def cmd_docset_wx(options, args): if os.path.isdir(destname): shutil.rmtree(destname) shutil.move(srcname, destname) + shutil.copyfile(wxICON, posixjoin(destname, 'icon.png')) def cmd_docset_py(options, args): @@ -694,24 +697,22 @@ def cmd_docset_py(options, args): msg('ERROR: No docs/html, has the sphinx build command been run?') sys.exit(1) + # clear out any old docset build + name = 'wxPython-{}'.format(version2) + docset = posixjoin('dist', '{}.docset'.format(name)) + if os.path.isdir(docset): + shutil.rmtree(docset) + # run the docset generator - name = 'wxPython Phoenix' - if os.path.isdir(posixjoin('dist', '{}.docset'.format(name))): - shutil.rmtree(posixjoin('dist', '{}.docset'.format(name))) - VERBOSE = '--verbose' if options.verbose else '' - runcmd('doc2dash {} --name "{}" --destination dist docs/html'.format(VERBOSE, name)) + runcmd('doc2dash {} --name "{}" --icon {} --destination dist docs/html' + .format(VERBOSE, name, pyICON)) - # move it to the name we want to use - destname = os.path.join(os.getcwd(), 'dist/wxPython-Phoenix.docset') - if os.path.isdir(destname): - shutil.rmtree(destname) - shutil.move('dist/{}.docset'.format(name), destname) - # update its Info.plist file - runcmd('defaults write {}/Contents/Info isJavaScriptEnabled true'.format(destname)) - runcmd('defaults write {}/Contents/Info dashIndexFilePath main.html'.format(destname)) - runcmd('defaults write {}/Contents/Info DocSetPlatformFamily wxpy'.format(destname)) + docset = os.path.abspath(docset) + runcmd('defaults write {}/Contents/Info isJavaScriptEnabled true'.format(docset)) + runcmd('defaults write {}/Contents/Info dashIndexFilePath main.html'.format(docset)) + runcmd('defaults write {}/Contents/Info DocSetPlatformFamily wxpy'.format(docset)) def cmd_docset(options, args):