Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: site/user/quick/ios.md

Issue 834353003: Adding user doc section and core files for new site (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: One more fix to android.md Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « site/user/quick/index.md ('k') | site/user/quick/macos.md » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: site/user/quick/ios.md
diff --git a/site/user/quick/ios.md b/site/user/quick/ios.md
new file mode 100644
index 0000000000000000000000000000000000000000..e060a28725b75dbfd84b526bbb77bdd8ccab5e5d
--- /dev/null
+++ b/site/user/quick/ios.md
@@ -0,0 +1,104 @@
+iOS
+===
+
+Prerequisites
+-------------
+
+_These steps should closely follow building on Mac OS X. Those steps seem slightly out of date._
+
+Build and run SampleApp in the XCode IDE
+----------------------------------------
+
+### XCode 4.5
+
+
+To build SampleApp on XCode 4.5 using the IDE these steps should work:
+
+ GYP_DEFINES="skia_os='ios' skia_arch_type='arm' armv7=1 arm_neon=0" ./gyp_skia
+ xed out/gyp/SampleApp.xcodeproj # opens the SampleApp project in the IDE
+
+Note that if you run make at the command line the gyp\_skia script will rerun
+and you'll lose the effect of the GYP\_DEFINES. To avoid this do:
+
+ export GYP_DEFINES="skia_os='ios' skia_arch_type='arm' armv7=1 arm_neon=0"
+
+### XCode 3
+
+Use GYP\_DEFINES to tell gyp\_skia how to build for iOS. Here's a bash shell
+snippet that sets the world up to build SampleApp with XCode 3:
+
+ function buildSampleApp()
+ {
+ sdkVersion="4.3"
+ if [[ "$1" == "sim" ]] ; then
+ export GYP_DEFINES="skia_os='ios' skia_arch_type='x86' \
+ ios_sdk_dir='/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator' \
+ ios_sdk_version='$sdkVersion'"
+ elif [[ "$1" == "iphone" ]] ; then
+ export GYP_DEFINES="skia_os='ios' skia_arch_type='arm' armv7='1' arm_neon='0' \
+ ios_sdk_dir='/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS' \
+ ios_sdk_version='$sdkVersion'"
+ elif [[ "$1" == "mac" ]] ; then
+ export GYP_DEFINES=""
+ else
+ echo "buildSampleApp expects 'sim', 'iphone', or 'mac'"
+ fi
+ if [[ "$1" == "sim" ]] || [[ "$1" == "iphone" ]] || [[ "$1" == "mac" ]] ; then
+ save=`pwd`
+ cd /chrome/nih/skia/trunk
+ echo "$GYP_DEFINES ./gyp_skia gyp/SampleApp.gyp"
+ ./gyp_skia gyp/SampleApp.gyp
+ cd $save
+ fi
+ if [[ "$1" == "sim" ]] ; then
+ setiossdk iphonesimulator$sdkVersion
+ elif [[ "$1" == "iphone" ]] ; then
+ setiossdk iphoneos$sdkVersion
+ fi
+ }
+
+The script function setiossdk called by buildSampleApp is a
+not-completely-working hackery. When gyp builds an iOS-targeted project, it is
+hard-coded for the iOS simulator. To point the project at either the iOS
+simulator, or an iOS device, the project file must be opened to create a
+custom pbxuser file.
+
+This is accomplished by:
+
+ function setiossdk()
+ {
+ osascript -e 'tell app "Xcode" to quit'
+ osascript -e 'repeat until appIsRunning("Xcode") is false' -e \
+ 'do shell script "sleep 1"' -e 'end repeat'
+ save=`pwd`
+ skia
+ cd out/gyp
+ for project in *.xcodeproj; do
+ open $project
+ done
+ osascript -e 'tell app "Xcode" to quit'
+ osascript -e 'repeat until appIsRunning("Xcode") is false' -e \
+ 'do shell script "sleep 1"' -e 'end repeat'
+ for project in *.xcodeproj; do
+ lsave=`pwd`
+ cd $project
+ filename=`eval whoami`.pbxuser
+ while [[ ! -s $filename ]] ; do
+ sleep 1
+ echo -n "."
+ done
+ sed -e '/activeSDKPreference/ d' <$filename | sed -e '/activeTarget/ i\
+ \ activeSDKPreference = '$1';' >x$filename
+ if [[ -s x$filename ]] ; then
+ mv x$filename $filename
+ else
+ echo "mv x$filename $project/$filename failed"
+ fi
+ cd $lsave
+ done
+ open SampleApp.xcodeproj
+ cd $save
+ }
+
+In particular, the calls to osascript to wait for Xcode to quit use faulty syntax.
+
« no previous file with comments | « site/user/quick/index.md ('k') | site/user/quick/macos.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698