Skip to content

Commit

Permalink
kobold2d 2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
LearnCocos2D committed Aug 18, 2013
0 parents commit ac23ca9
Show file tree
Hide file tree
Showing 2,124 changed files with 442,215 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .gitignore
@@ -0,0 +1,18 @@
# Xcode
.DS_Store
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
*.xcworkspace
!default.xcworkspace
xcuserdata
profile
*.moved-aside
DerivedData
.idea/
5 changes: 5 additions & 0 deletions BuildManagement/README
@@ -0,0 +1,5 @@
BuildManagement

Contains the build scripts used by Hudson. This allows all Kobold2D projects to be continuously built whenever changes are made. Currently, the CI machine is a Mac mini and not accessible to other users, nor will commits to github trigger Hudson.

Given time and enough contributors, the CI machine will be improved to pull the code directly from github and the results will be made publicly available on the Kobold2D homepage. This would allow contributors to check within minutes after their commit to see if all projects still build. It would also allow other contributors to check the status of the current develop or other branches, to avoid pulling code that currently isn't building successfully.
99 changes: 99 additions & 0 deletions BuildManagement/hudson-build.sh
@@ -0,0 +1,99 @@
#!/bin/sh

# BUILD SCRIPT FOR KOBOLD2D v2.x ...

BUILDTOOLXCODE43=/Applications/Xcode43.app/Contents/Developer/usr/bin/xcodebuild
BUILDTOOLXCODE44=/Applications/Xcode_previous_versions/Xcode44.app/Contents/Developer/usr/bin/xcodebuild
BUILDTOOLXCODE45=/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild
KKROOT=/depot-kobold2d/Kobold2D-2.x-Master/Kobold2D/
KKWORKSPACEFILE=Kobold2D.xcworkspace
KKWORKSPACE=${KKROOT}${KKWORKSPACEFILE}

# remove 2.x prefix
JOB_NAME=${JOB_NAME:3}
# bash has got to be the most ridiculous way to perform upper/lowercase conversions
JOB_NAME_LOWERCASE="$(echo ${JOB_NAME} | tr 'A-Z' 'a-z')"

echo Building project: $JOB_NAME

# rename derived data folder for this build job
DERIVED=___DerivedData
DERIVED=/depot-kobold2d/${DERIVED}
DERIVED_XCODE43=${DERIVED}_XCODE43-2.x
DERIVED_XCODE44=${DERIVED}_XCODE44-2.x
DERIVED_XCODE45=${DERIVED}_XCODE45-2.x

function failed()
{
echo "Failed: $@" >&2

if [ "$XCODE" -eq 45 ]; then
mv ${DERIVED} ${DERIVED_XCODE45}
fi
if [ "$XCODE" -eq 44 ]; then
mv ${DERIVED} ${DERIVED_XCODE44}
fi
if [ "$XCODE" -eq 43 ]; then
mv ${DERIVED} ${DERIVED_XCODE43}
fi

exit 1
}

set -ex

COMMON_ARGS="-workspace $KKWORKSPACE -scheme $JOB_NAME ONLY_ACTIVE_ARCH=NO GCC_TREAT_WARNINGS_AS_ERRORS=YES"


if [ -d ${DERIVED} ]; then
rm -rfd ${DERIVED}
fi


# Xcode 4.5
XCODE=45
if [ -d ${DERIVED_XCODE45} ]; then
mv ${DERIVED_XCODE45} ${DERIVED}
fi

case $JOB_NAME_LOWERCASE in
*-ios)
echo "============ RUNNING IOS BUILDS ============"
$BUILDTOOLXCODE45 $COMMON_ARGS -sdk iphoneos -configuration Release || failed IPHONEOS-RELEASE_XCODE45
$BUILDTOOLXCODE45 $COMMON_ARGS -sdk iphoneos -configuration Debug || failed IPHONEOS-DEBUG_XCODE45
$BUILDTOOLXCODE45 $COMMON_ARGS VALID_ARCHS=i386 ARCHS=i386 GCC_VERSION=com.apple.compilers.llvm.clang.1_0.compiler -sdk iphonesimulator -configuration Debug || failed IPHONESIMULATOR-DEBUG_XCODE45
;;
*-mac)
echo "============ RUNNING MAC OS BUILDS ============"
$BUILDTOOLXCODE45 $COMMON_ARGS -sdk macosx -configuration Release || failed MACOSX-RELEASE_XCODE45
$BUILDTOOLXCODE45 $COMMON_ARGS -sdk macosx -configuration Debug || failed MACOSX-DEBUG_XCODE45
;;
esac

# keep the build folder for the next run
mv ${DERIVED} ${DERIVED_XCODE45}


# Xcode 4.4
XCODE=44
if [ -d ${DERIVED_XCODE44} ]; then
mv ${DERIVED_XCODE44} ${DERIVED}
fi

case $JOB_NAME_LOWERCASE in
*-ios)
echo "============ RUNNING IOS BUILDS ============"
$BUILDTOOLXCODE44 $COMMON_ARGS -sdk iphoneos -configuration Release || failed IPHONEOS-RELEASE_XCODE44
$BUILDTOOLXCODE44 $COMMON_ARGS -sdk iphoneos -configuration Debug || failed IPHONEOS-DEBUG_XCODE44
$BUILDTOOLXCODE44 $COMMON_ARGS VALID_ARCHS=i386 ARCHS=i386 GCC_VERSION=com.apple.compilers.llvm.clang.1_0.compiler -sdk iphonesimulator -configuration Debug || failed IPHONESIMULATOR-DEBUG_XCODE44
;;
*-mac)
echo "============ RUNNING MAC OS BUILDS ============"
$BUILDTOOLXCODE44 $COMMON_ARGS -sdk macosx -configuration Release || failed MACOSX-RELEASE_XCODE44
$BUILDTOOLXCODE44 $COMMON_ARGS -sdk macosx -configuration Debug || failed MACOSX-DEBUG_XCODE44
;;
esac

# keep the build folder for the next run
mv ${DERIVED} ${DERIVED_XCODE44}

4 changes: 4 additions & 0 deletions BuildManagement/hudson-start.sh
@@ -0,0 +1,4 @@
#!/bin/sh

java -jar /Applications/hudson.war --httpPort=8081
# -Xms500m -Xmn500m -Xmx2000m
6 changes: 6 additions & 0 deletions Kobold2D/Kobold2D Documentation.html
@@ -0,0 +1,6 @@
<head>
<meta HTTP-EQUIV="REFRESH" content="0; url=__Kobold2D__/docs/docs.html">
</head>

<body>
</body>
46 changes: 46 additions & 0 deletions Kobold2D/Kobold2D Project Starter.app/Contents/Info.plist
@@ -0,0 +1,46 @@
<?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>BuildMachineOSBuild</key>
<string>11D50</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>Kobold2D Project Starter</string>
<key>CFBundleIdentifier</key>
<string>com.kobold2d.Kobold2D-Project-Starter</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Kobold2D Project Starter</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>4E2002</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>11D50a</string>
<key>DTSDKName</key>
<string>macosx10.7</string>
<key>DTXcode</key>
<string>0432</string>
<key>DTXcodeBuild</key>
<string>4E2002</string>
<key>LSMinimumSystemVersion</key>
<string>10.6</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>
Binary file not shown.
1 change: 1 addition & 0 deletions Kobold2D/Kobold2D Project Starter.app/Contents/PkgInfo
@@ -0,0 +1 @@
APPL????
@@ -0,0 +1,29 @@
{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;}
{\colortbl;\red255\green255\blue255;}
\paperw9840\paperh8400
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural

\f0\b\fs24 \cf0 Engineering:
\b0 \
Some people\
\

\b Human Interface Design:
\b0 \
Some other people\
\

\b Testing:
\b0 \
Hopefully not nobody\
\

\b Documentation:
\b0 \
Whoever\
\

\b With special thanks to:
\b0 \
Mom\
}
Binary file not shown.
Binary file not shown.
48 changes: 48 additions & 0 deletions Kobold2D/Kobold2D Project Upgrader.app/Contents/Info.plist
@@ -0,0 +1,48 @@
<?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>BuildMachineOSBuild</key>
<string>11D50</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>Kobold2D Project Upgrader</string>
<key>CFBundleIdentifier</key>
<string>com.kobold2d.Kobold2D-Project-Upgrader</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Kobold2D Project Upgrader</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>4E2002</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>11D50a</string>
<key>DTSDKName</key>
<string>macosx10.7</string>
<key>DTXcode</key>
<string>0432</string>
<key>DTXcodeBuild</key>
<string>4E2002</string>
<key>LSMinimumSystemVersion</key>
<string>10.6</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2011 __MyCompanyName__. All rights reserved.</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>
Binary file not shown.
1 change: 1 addition & 0 deletions Kobold2D/Kobold2D Project Upgrader.app/Contents/PkgInfo
@@ -0,0 +1 @@
APPL????
@@ -0,0 +1,29 @@
{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;}
{\colortbl;\red255\green255\blue255;}
\paperw9840\paperh8400
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural

\f0\b\fs24 \cf0 Engineering:
\b0 \
Some people\
\

\b Human Interface Design:
\b0 \
Some other people\
\

\b Testing:
\b0 \
Hopefully not nobody\
\

\b Documentation:
\b0 \
Whoever\
\

\b With special thanks to:
\b0 \
Mom\
}
Binary file not shown.
Binary file not shown.
32 changes: 32 additions & 0 deletions Kobold2D/README
@@ -0,0 +1,32 @@
Kobold2D README for the version pulled from Github


===> If you want to start a new Kobold2D project <===

- copy all _XXXX-Template_ folders to ./__Kobold2D__/templates/project/
- open the ./__Kobold2D__/tools/Kobold2D Project Starter/Kobold2D Project Starter.xcodeproj
- build & run the Kobold2D Project Starter project
- Kobold2D Project Starter tool GUI: create a new .xcworkspace (enter a name other than Kobold2D.xcworkspace)
- This will avoid having to load the Kobold2D.xcworkspace which contains ALL template projects.

IMPORTANT: do not modify any of the files in one of the projects named _XXXX-Template_.xcodeproj unless you plan to commit your improvements / bugfixes back to the Kobold2D project. Do not start a work project without creating a new project via the Kobold2D Project Starter tool. Because eventually you will want to start a new project based on that same template. And pulling the latest code may merge undesirable changes into any _XXX-Template_ project, possibly rendering it inoperable if you also made changes to that project.

IMPORTANT for contributors: do not remove projects from the Kobold2D.xcworkspace. This would make integration of your changes harder. Instead, work in a custom .xcworkspace. If you are creating a new template project, simply add that project to the Kobold2D.xcworkspace once and then work from the custom .xcworkspace to reduce memory load.

Only add projects to the Kobold2D.xcworkspace that are properly named using the same format as the other templates: _XXX-YYY-ZZZ-Template_ whereas XXX-YYY-ZZZ can be anything but without any special characters (including: !#$+_) and all spaces replaced by - (dashes). The same name must be used for the project's folder, the project's .xcodeproj file, the name of the project within Xcode Project Navigator (first item in the tree view) and all targets of the project.


===> Upgrading to a newer Kobold2D version <===

Your project should reside in a custom .xcworkspace, as the Kobold2D.xcworkspace may be updated and references to your project may be removed. If this happens, you can always add your .xcodeproj back in, it won't be deleted. But adding a .xcodeproj correctly to a .xcworkspace is a bit finicky because you have to drop it on the far left side of the Project Navigator pane, otherwise it will be added to another .xcodeproj instead of the .xcodeworkspace, rendering the project inoperable untill you re-add it correctly.

Then just synch the latest version from github.

However, if this causes your project to stop working and you want to go back to a previous version, it will be easier to do so with the Project Upgrader tool provided by the Kobold2D installer version if you're not sufficiently experienced with github to rollback to a previous version.


===> Take care of what you're committing <===

Some bash scripts and your work may create files that should not be pushed back to the Kobold2D repository, due to filesize, security concerns or merely avoiding to add clutter. Take care what you submit, if necessary update the .gitignore file accordingly.

For example, running the documentation script may create several hundred megabytes worth of HTML and docset files. If you accidentally commit these, your github repository will likely consume more memory than free accounts are allowed to contain (limit as of Nov 2011: 0.3 GB). The commit may be successful since github uses soft limits, but you may get a message from github suggesting to upgrade to a commercial plan.
@@ -0,0 +1,13 @@
//
// Kobold2D™ --- http://www.kobold2d.org
//
// Copyright (c) 2010-2011 Steffen Itterheim.
// Released under MIT License in Germany (LICENSE-Kobold2D.txt).
//


#include "../__Kobold2D__/buildsettings/HeaderSearchPaths.xcconfig"
#include "../__Kobold2D__/buildsettings/Common-Debug.xcconfig"
#include "../__Kobold2D__/buildsettings/Common-Mac.xcconfig"

#include "BuildSettings-Mac.xcconfig"
@@ -0,0 +1,13 @@
//
// Kobold2D™ --- http://www.kobold2d.org
//
// Copyright (c) 2010-2011 Steffen Itterheim.
// Released under MIT License in Germany (LICENSE-Kobold2D.txt).
//


#include "../__Kobold2D__/buildsettings/HeaderSearchPaths.xcconfig"
#include "../__Kobold2D__/buildsettings/Common-Debug.xcconfig"
#include "../__Kobold2D__/buildsettings/Common-iOS.xcconfig"

#include "BuildSettings-iOS.xcconfig"
@@ -0,0 +1,34 @@
//
// Kobold2D™ --- http://www.kobold2d.org
//
// Copyright (c) 2010-2011 Steffen Itterheim.
// Released under MIT License in Germany (LICENSE-Kobold2D.txt).
//

#include "../__Kobold2D__/buildsettings/FrameworksAndLibraries.xcconfig"

// ***************************************
// Actual compiler settings filled in here
// ***************************************

OTHER_LDFLAGS = $(inherited) $(KKFRAMEWORKS_MAC)

INFOPLIST_FILE = Projectfiles-Mac/Resources/Info.plist
GCC_PREFIX_HEADER = Projectfiles/Prefix-Mac.pch

// avoid "no packager exists for this type of archive" error
// see: http://stackoverflow.com/questions/5271496/xcode4-ios-4-3-no-packager-exists-for-the-type-of-archive
SKIP_INSTALL = NO

// Treating warnings as errors is considered a best practice as it forces you to fix all potentially fatal problems.
// Getting into the bad habit of ignoring warnings will cause you to miss the really important warnings.
// However, Kobold2D understands that beginning game developers have a different priority: getting the code to run.
// It is highly recommended to turn on "treat warnings as errors" for experienced developers.
// See this article for rationale: http://www.artima.com/cppsource/codestandards.html
GCC_TREAT_WARNINGS_AS_ERRORS = NO

// Enable automatic reference counting (ARC)
// How does ARC work? http://stackoverflow.com/questions/6385212/how-does-the-new-automatic-reference-counting-mechanism-work
// Transitioning to ARC: http://developer.apple.com/library/ios/#releasenotes/ObjectiveC/RN-TransitioningToARC/_index.html
// ARC is available on iOS 4 or newer, Mac OS X 10.6 (32-Bit & 64-Bit) and Mac OS X 10.7 (64-Bit only)
CLANG_ENABLE_OBJC_ARC[arch=x86_64] = YES

0 comments on commit ac23ca9

Please sign in to comment.