Skip to content

Commit 5538634

Browse files
committed
Created READMEs folder for all readme docs.
Made a scripts folder and added a createrelease.py script, which creates a full release for Mac and iPhone.
1 parent 1abf6a4 commit 5538634

3 files changed

Lines changed: 88 additions & 0 deletions

File tree

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf320
2+
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
3+
{\colortbl;\red255\green255\blue255;}
4+
\paperw12240\paperh15840\margl1440\margr1440\vieww17480\viewh10900\viewkind0
5+
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
6+
7+
\f0\fs36 \cf0 To Install Documentation
8+
\fs24 \
9+
\
10+
1. Quit Xcode\
11+
\
12+
2. Copy the
13+
\b com.CorePlot.Framework.docset
14+
\b0 bundle into
15+
\b ~/Library/Developer/Shared/Documentation/DocSets/
16+
\b0 \
17+
\
18+
3. Launch Xcode, and browse Core Plot documentation in the Documentation browser}

scripts/createrelease.py

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
#!/usr/bin/env python
2+
3+
from os import mkdir, makedirs, environ, chdir, getcwd, system
4+
from os.path import join
5+
from shutil import copy, copytree, move
6+
7+
# Usage
8+
def Usage():
9+
return 'Usage: createversion.py <version>'
10+
11+
# Run Xcode
12+
def RunXcode(project, target):
13+
system('/usr/bin/xcodebuild -project "%s" -target "%s" -configuration Release clean build' % (project, target))
14+
15+
16+
# Get version from args
17+
import sys
18+
if len(sys.argv) <= 1:
19+
print Usage()
20+
exit(1)
21+
version = sys.argv[1]
22+
23+
# Change to root dir of Core Plot
24+
chdir('..')
25+
projectRoot = getcwd()
26+
27+
# Make directory bundle
28+
desktopDir = join(environ['HOME'], 'Desktop')
29+
releaseRootDir = join(desktopDir, 'alpharelease_' + version)
30+
mkdir(releaseRootDir)
31+
32+
# Copy license and READMEs
33+
copy('License.txt', releaseRootDir)
34+
copytree('READMEs', join(releaseRootDir, 'READMEs'))
35+
36+
# Add source code
37+
sourceDir = join(releaseRootDir, 'Source')
38+
copytree('framework', join(sourceDir, 'framework'))
39+
copytree('examples', join(sourceDir, 'examples'))
40+
41+
# Binaries
42+
binariesDir = join(releaseRootDir, 'Binaries')
43+
macosDir = join(binariesDir, 'MacOS')
44+
iosDir = join(binariesDir, 'iOS')
45+
makedirs(macosDir)
46+
mkdir(iosDir)
47+
48+
# Build Mac Framework
49+
chdir('framework')
50+
RunXcode('CorePlot.xcodeproj', 'CorePlot')
51+
macProductsDir = join(projectRoot, 'build/Release')
52+
macFramework = join(macProductsDir, 'CorePlot.framework')
53+
copytree(macFramework, join(macosDir, 'CorePlot.framework'))
54+
55+
# Build iOS SDK
56+
RunXcode('CorePlot-CocoaTouch.xcodeproj', 'Build SDK')
57+
sdkZipFile = join(desktopDir, 'CorePlot.zip')
58+
move(sdkZipFile, iosDir)
59+
60+
# Build Docs
61+
RunXcode('CorePlot.xcodeproj', 'Documentation')
62+
RunXcode('CorePlot-CocoaTouch.xcodeproj', 'Documentation')
63+
64+
# Copy Docs
65+
homeDir = environ['HOME']
66+
docsetsDir = join(homeDir, 'Library/Developer/Shared/Documentation/DocSets')
67+
docDir = join(releaseRootDir, 'Documentation')
68+
copytree(join(docsetsDir, 'com.CorePlot.Framework.docset'), join(docDir, 'com.CorePlot.Framework.docset'))
69+
copytree(join(docsetsDir, 'com.CorePlotTouch.Framework.docset'), join(docDir, 'com.CorePlotTouch.Framework.docset'))
70+

0 commit comments

Comments
 (0)