From 67043fdb54c1ab7e321d1374a3c4383b01af3589 Mon Sep 17 00:00:00 2001 From: Ben Wheeler Date: Mon, 23 Mar 2020 12:14:24 -0400 Subject: [PATCH] reorganized android and ios setup steps --- README.md | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index e261adc..fbe8a2e 100644 --- a/README.md +++ b/README.md @@ -36,30 +36,39 @@ This repository has the following directory structure: * ios/ - XCode project for iOS build. (Make sure to open ScratchJr.xcworkspace not ScratchJr.xcodeproj) ## Building ScratchJr -To build the Android version, you need to have a system equipped with Android Studio. To build the iOS version, you need to have a Mac with XCode. -Ensure you have node and npm [installed](http://blog.npmjs.org/post/85484771375/how-to-install-npm). +### Initial setup -With all of the code checked out, you must install npm dependencies for bundling the JavaScript: -* npm install +Regardless of whether you are doing iOS development or Android development, you should do these steps. -The build caches .png files out of the .svg files to improve performance. To enable this build step, you need to install a few dependencies. +*These instructions assume you are building both versions on Mac OSX, with [Homebrew](http://brew.sh) installed.* -On Ubuntu: +1. Clone or update the code for this repo +2. Ensure you have node and npm [installed](http://blog.npmjs.org/post/85484771375/how-to-install-npm). +3. Run sudo easy_install pysvg to install python svg libraries +4. Run brew install librsvg to install commandline `rsvg-convert` +5. Run brew install imagemagick to install commandline `magick` +6. In the top level of the scratchjr repo directory, install npm dependencies for bundling the JavaScript: npm install -* Run sudo easy_install pysvg to install python svg libraries -* Run sudo apt-get install librsvg2-bin to install rsvg-convert -* Run sudo apt-get install imagemagick to install ImageMagick +### iOS -On OS X: +1. To build the iOS version, you need to have a Mac with XCode +2. Run brew install cocoapods to install CocoaPods +3. Run pod install to install the Firebase Analytics dependencies +4. Open XCode +5. In XCode, open ios/ScratchJr.xcworkspace -* Install [Homebrew](http://brew.sh). -* Run sudo easy_install pysvg to install python svg libraries -* Run brew install librsvg to install rsvg-convert -* Run brew install imagemagick to install ImageMagick -* Run brew install cocoapods to install CocoaPods if you are building for iOS +### Android -Once these are installed, select the appropriate target in XCode or the appropriate flavor/build variant in Android Studio. To build in Android Studio, open the project android/ScratchJr. To build for iOS in XCode, open ios/ScratchJr.xcworkspace as ScratchJr uses CocoaPods. Before you build for iOS, you will need to run pod install to install the Firebase Analytics dependencies. +1. Install or update Android Studio +2. In Android Studio, open the project android/ScratchJr +3. Choose the appropriate flavor/build variant in Android Studio + +*Note: you can still do Android development on Ubuntu. Instead of the install commands above, run:* + +1. sudo easy_install pysvg to install python svg libraries +2. sudo apt-get install librsvg2-bin to install rsvg-convert +3. sudo apt-get install imagemagick to install ImageMagick ## Where and how to make changes