Skip to content

Commit

Permalink
New ObjC-codebase Installer for Xcode6
Browse files Browse the repository at this point in the history
Replaces non-functional version as of Feb 2015.

Can be modified to include optional Swift version at later date.
  • Loading branch information
traviskirton committed Feb 9, 2015
1 parent f1d75bc commit beebcbf
Show file tree
Hide file tree
Showing 222 changed files with 1,712 additions and 1,351 deletions.
75 changes: 75 additions & 0 deletions base/C4 Application Base.xctemplate/TemplateInfo.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Kind</key>
<string>Xcode.Xcode3.ProjectTemplateUnitKind</string>
<key>Identifier</key>
<string>com.c4.applicationBase</string>
<key>Ancestors</key>
<array>
<string>com.apple.dt.unit.bundleBase</string>
</array>
<key>Targets</key>
<array>
<dict>
<key>ProductType</key>
<string>com.apple.product-type.application</string>
<key>BuildPhases</key>
<array>
<dict>
<key>Class</key>
<string>Sources</string>
</dict>
<dict>
<key>Class</key>
<string>Frameworks</string>
</dict>
<dict>
<key>Class</key>
<string>Resources</string>
</dict>
</array>
</dict>
</array>
<key>Options</key>
<array>
<dict>
<key>Identifier</key>
<string>languageChoice</string>
<key>Units</key>
<dict>
<key>Objective-C</key>
<dict>
</dict>
</dict>
</dict>
</array>
<key>Nodes</key>
<array>
<string>Info.plist:PackageType</string>
</array>
<key>Definitions</key>
<dict>
<key>Info.plist:PackageType</key>
<string>&lt;key&gt;CFBundlePackageType&lt;/key&gt;
&lt;string&gt;APPL&lt;/string&gt;
</string>
<!-- This is defined globally for templates that don't want language choice -->
<key>main.m</key>
<dict>
<key>Group</key>
<string>Supporting Files</string>
</dict>
<key>main.m:main</key>
<dict>
<key>Beginning</key>
<string>int main(int argc, const char * argv[]) {</string>
<key>End</key>
<string>}</string>
<key>Indent</key>
<integer>1</integer>
</dict>
</dict>
</dict>
</plist>
147 changes: 147 additions & 0 deletions base/C4 Language Choice.xctemplate/TemplateInfo.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Kind</key>
<string>Xcode.Xcode3.ProjectTemplateUnitKind</string>
<key>Identifier</key>
<string>com.c4.languageChoice</string>
<key>Options</key>
<array>
<dict>
<key>Identifier</key>
<string>languageChoice</string>
<key>Required</key>
<true/>
<key>Name</key>
<string>Language:</string>
<key>Description</key>
<string>Your primary implementation language.</string>
<key>Type</key>
<string>popup</string>
<key>Default</key>
<string>Objective-C</string>
<key>Values</key>
<array>
<string>Objective-C</string>
</array>
<key>Variables</key>
<dict>
<!-- <key>Swift</key>
<dict>
<key>ibCustomModuleProvider</key>
<string>target</string>
<key>moduleNamePrefixForClasses</key>
<string>$(PRODUCT_MODULE_NAME).</string>
</dict> -->
<key>Objective-C</key>
<dict>
<key>ibCustomModuleProvider</key>
<string></string>
<key>moduleNamePrefixForClasses</key>
<string></string>
</dict>
</dict>
<key>Units</key>
<dict>
<key>Objective-C</key>
<dict>
<key>Definitions</key>
<dict>
<!-- What would be in here is actually in the Base template so that even those not adopting languageChoice can see the Obj-C basics. -->
</dict>
</dict>
<!-- <key>Swift</key>
<dict>
<key>Project</key>
<dict>
<key>Configurations</key>
<dict>
<key>Debug</key>
<dict>
<key>SWIFT_OPTIMIZATION_LEVEL</key>
<string>-Onone</string>
</dict>
</dict>
</dict>
<key>Definitions</key>
<dict>
<key>*:imports:importHeader:*</key>
<string/>
<key>*:imports:importFramework:*</key>
<string>import ___*___</string>
<key>*:class:*</key>
<string/>
<key>*:implementation</key>
<dict>
<key>Beginning</key>
<string>class ___*___ {
</string>
<key>End</key>
<string>
}
</string>
<key>Indent</key>
<integer>1</integer>
</dict>
<key>*:implementation:methods:init</key>
<dict>
<key>Beginning</key>
<string>override init() {
super.init()
</string>
<key>End</key>
<string>}
</string>
<key>Indent</key>
<integer>1</integer>
</dict>
<key>*:implementation:methods:*</key>
<dict>
<key>Beginning</key>
<string>___*___ {</string>
<key>End</key>
<string>}
</string>
<key>Indent</key>
<integer>1</integer>
</dict>
</dict>
</dict> -->
</dict>
</dict>
</array>
<!-- Definitions that are language-sepcific, but turn out to be the same for Obj-C and Swift -->
<key>Definitions</key>
<dict>
<key>*:implementation:methods</key>
<dict>
<key>Beginning</key>
<string></string>
<key>End</key>
<string></string>
</dict>
<key>*:implementation:methods:*</key>
<dict>
<key>Beginning</key>
<string>___*___ {</string>
<key>End</key>
<string>}
</string>
<key>Indent</key>
<integer>1</integer>
</dict>
<key>*:implementation:properties</key>
<dict>
<key>Beginning</key>
<string></string>
<key>End</key>
<string>
</string>
</dict>
</dict>
</dict>
</plist>
8 changes: 6 additions & 2 deletions buildInstaller.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# buildInstaller.sh
# buildIn/Users/travis/Development/C4iOSInstaller/buildInstaller.shstaller.sh
#
# Created by Travis Kirton on 14-06-02.

Expand All @@ -10,10 +10,12 @@ sh buildPackageComponents.sh $VERSION

# defines the names of the component packages, this matches their names defined in the buildPackageComponents.sh script
TEMPLATES_PKG="INSTALL_TEMPLATES_0_02.pkg"
IOSBASE_PKG="INSTALL_IOS_BASE_0_01.pkg"
APPBASE_PKG="INSTALL_APP_BASE_0_01.pkg"
DOCSET_PKG="INSTALL_DOCSET_0_01.pkg"

#builds the distribution xml
productbuild --synthesize --package $TEMPLATES_PKG --package $DOCSET_PKG distribution.xml
productbuild --synthesize --package $TEMPLATES_PKG --package $IOSBASE_PKG --package $APPBASE_PKG --package $DOCSET_PKG distribution.xml

#modifies the distribution
sh updateDistributionXML.sh
Expand All @@ -28,5 +30,7 @@ productsign --sign "Developer ID Installer: Travis Stuart Kirton (75C7KVJZ99)" u
mv signed.pkg C4Installer_$VERSION.pkg

rm -Rf $TEMPLATES_PKG
rm -Rf $IOSBASE_PKG
rm -Rf $APPBASE_PKG
rm -Rf $DOCSET_PKG
rm -Rf unsigned.pkg
10 changes: 10 additions & 0 deletions buildPackageComponents.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ PROJECT_TEMPLATES_NAME="INSTALL_TEMPLATES_0_02.pkg"
#TEMPLATES_DESTINATION="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/Project Templates/Application"
pkgbuild --root $PROJECT_TEMPLATES_LOCATION --identifier com.c4ios.installer.templates --version $INSTALLER_VERSION --install-location /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/Project\ Templates/iOS/Application $PROJECT_TEMPLATES_NAME

IOS_BASE_VERSION="$1"
IOS_BASE_LOCATION="./iosBase"
IOS_BASE_NAME="INSTALL_IOS_BASE_0_01.pkg"
pkgbuild --root $IOS_BASE_LOCATION --identifier com.c4ios.installer.iosbase --version $INSTALLER_VERSION --install-location /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/Project\ Templates/iOS $IOS_BASE_NAME

APP_BASE_VERSION="$1"
APP_BASE_LOCATION="./base"
APP_BASE_NAME="INSTALL_APP_BASE_0_01.pkg"
pkgbuild --root $APP_BASE_LOCATION --identifier com.c4ios.installer.appbase --version $INSTALLER_VERSION --install-location /Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates/Project\ Templates/Base $APP_BASE_NAME

DOCSET_VERSION="$1"
DOCSET_LOCATION="./docs"
DOCSET_NAME="INSTALL_DOCSET_0_01.pkg"
Expand Down
12 changes: 12 additions & 0 deletions distribution.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<installer-gui-script minSpecVersion="1">
<pkg-ref id="com.c4ios.installer.templates"/>
<pkg-ref id="com.c4ios.installer.iosbase"/>
<pkg-ref id="com.c4ios.installer.appbase"/>
<pkg-ref id="com.c4ios.installer.docset"/>
<options customize="never" require-scripts="false"/>
<choices-outline>
<line choice="default">
<line choice="com.c4ios.installer.templates"/>
<line choice="com.c4ios.installer.iosbase"/>
<line choice="com.c4ios.installer.appbase"/>
<line choice="com.c4ios.installer.docset"/>
</line>
</choices-outline>
Expand All @@ -14,6 +18,14 @@
<pkg-ref id="com.c4ios.installer.templates"/>
</choice>
<pkg-ref id="com.c4ios.installer.templates" version="0_02" onConclusion="none">INSTALL_TEMPLATES_0_02.pkg</pkg-ref>
<choice id="com.c4ios.installer.iosbase" visible="false">
<pkg-ref id="com.c4ios.installer.iosbase"/>
</choice>
<pkg-ref id="com.c4ios.installer.iosbase" version="0_02" onConclusion="none">INSTALL_IOS_BASE_0_01.pkg</pkg-ref>
<choice id="com.c4ios.installer.appbase" visible="false">
<pkg-ref id="com.c4ios.installer.appbase"/>
</choice>
<pkg-ref id="com.c4ios.installer.appbase" version="0_02" onConclusion="none">INSTALL_APP_BASE_0_01.pkg</pkg-ref>
<choice id="com.c4ios.installer.docset" visible="false">
<pkg-ref id="com.c4ios.installer.docset"/>
</choice>
Expand Down
Loading

0 comments on commit beebcbf

Please sign in to comment.