Add a build phase that automatically calls populate-project for the user.
This commit is contained in:
parent
18687fb762
commit
f32d0c99a4
3 changed files with 41 additions and 6 deletions
18
README.rst
18
README.rst
|
@ -4,8 +4,18 @@ Kivy for IOS
|
|||
(This is a work in progress.)
|
||||
|
||||
#. Build the whole toolchain with `tools/build_all.sh`
|
||||
#. Create an xcode project for your application with `tools/create-xcode-project.sh test`
|
||||
#. Populate the project with your application source code `tools/populate-project.sh test /path/to/app`
|
||||
#. Open your newly xcode project created
|
||||
#. Ensure the code signing is ok
|
||||
#. Create an Xcode project for your application with
|
||||
`tools/create-xcode-project.sh test /path/to/app`
|
||||
#. Open your newly created Xcode project
|
||||
#. Ensure code signing is setup correctly
|
||||
#. Click on play
|
||||
|
||||
Notes
|
||||
-----
|
||||
|
||||
#. A build phase is added to the project that processes and moves your
|
||||
app's files to the Xcode project before every build. If you would
|
||||
like to handle this process manually, remove the "Run Script" build
|
||||
phase from your target and use `tools/populate-project.sh
|
||||
/path/to/app` after every change. You can also change the path to
|
||||
your app by modifying this build phase.
|
||||
|
|
|
@ -7,14 +7,21 @@ try () {
|
|||
. $(dirname $0)/environment.sh
|
||||
|
||||
APPNAME=$1
|
||||
SRCDIR=$2
|
||||
APPID=$(echo $APPNAME | tr '[A-Z]' '[a-z]')
|
||||
TEMPLATESDIR=$(dirname $0)/templates/
|
||||
APPDIR=$KIVYIOSROOT/app-$APPID
|
||||
if [ "X$APPNAME" == "X" ]; then
|
||||
echo $(basename $0) "<appname>"
|
||||
echo $(basename $0) "<appname> <source directory>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "X$SRCDIR" == "X" ]; then
|
||||
echo $(basename $0) "<appname> <source directory>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
echo "-> Create $APPDIR directory"
|
||||
try mkdir $APPDIR
|
||||
|
||||
|
@ -28,6 +35,7 @@ echo "-> Customize templates"
|
|||
try find $APPDIR -type f -exec sed -i '' "s/##APPID##/$APPID/g" {} \;
|
||||
try find $APPDIR -type f -exec sed -i '' "s/##APPNAME##/$APPNAME/g" {} \;
|
||||
try find $APPDIR -type f -exec sed -i '' "s/##SDKVER##/$SDKVER/g" {} \;
|
||||
try find $APPDIR -type f -exec sed -i '' "s^##SRCDIR##^$SRCDIR^g" {} \;
|
||||
|
||||
echo "-> Done !"
|
||||
|
||||
|
|
|
@ -168,10 +168,11 @@
|
|||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
1D6058900D05DD3D006BFB54 /* ##APPID## */ = {
|
||||
1D6058900D05DD3D006BFB54 /* ##APPNAME## */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "##APPID##" */;
|
||||
buildPhases = (
|
||||
113D17E2153E3DB5001310A5 /* ShellScript */,
|
||||
1D60588D0D05DD3D006BFB54 /* Resources */,
|
||||
1D60588E0D05DD3D006BFB54 /* Sources */,
|
||||
1D60588F0D05DD3D006BFB54 /* Frameworks */,
|
||||
|
@ -226,6 +227,22 @@
|
|||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
113D17E2153E3DB5001310A5 /* ShellScript */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 12;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/bash;
|
||||
shellScript = "../tools/populate-project.sh ##APPNAME## ##SRCDIR## ";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
1D60588E0D05DD3D006BFB54 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
|
|
Loading…
Reference in a new issue