You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by so...@apache.org on 2017/06/07 08:08:13 UTC

[14/50] incubator-weex git commit: * [all] update build instruction

* [all] update build instruction


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/41e01d78
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/41e01d78
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/41e01d78

Branch: refs/heads/0.14-dev
Commit: 41e01d780091cebadb0315cbe2238575bcafe201
Parents: b3e1fcb
Author: sospartan <so...@apache.org>
Authored: Thu Jun 1 18:03:57 2017 +0800
Committer: sospartan <so...@apache.org>
Committed: Thu Jun 1 18:03:57 2017 +0800

----------------------------------------------------------------------
 HOW-TO-BUILD.md             | 80 ++++++++++++++++++++++++++++++++++++++++
 README_RELEASE.md           | 74 -------------------------------------
 RUN-RAT.md                  | 12 ++++++
 scripts/release_files.rules |  3 +-
 4 files changed, 94 insertions(+), 75 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/41e01d78/HOW-TO-BUILD.md
----------------------------------------------------------------------
diff --git a/HOW-TO-BUILD.md b/HOW-TO-BUILD.md
new file mode 100644
index 0000000..278d3e7
--- /dev/null
+++ b/HOW-TO-BUILD.md
@@ -0,0 +1,80 @@
+# Weex Apache Source Release   
+Weex produce SDKs to integrate to iOS/Android/Mobile web applications. This file will cover how to build Weex from source. You can either use the script we provided or manually build from source step by step.   
+See `README.md` for further information about Weex Framework.
+
+Weex SDK produce 3 different SDKs to use in corresponding system/browser: 
+* Android SDK
+* iOS SDK
+* Mobile Web SDK
+
+See our [guide in our website](http://weex.apache.org/guide/integrate-to-your-app.html) to learn more about how to integrate Weex SDK to your app.
+
+## Build Environment
+The environment required to build weex as follow:   
+* Android SDK:   
+    * NodeJS 4.0+
+    * JDK 1.6+
+    * Android SDK(`$ANDROID_HOME` must be set properly) 
+    * Gradle 2.0+
+* iOS SDK:   
+    * NodeJS 4.0+
+    * XCode & Command Tools 8.0+  
+* Mobile web SDK:
+    * NodeJS 4.0+
+
+This article was tested in MacOSX system.
+
+# Build All by Script
+
+This script will build all 3 SDKs:   
+> `$ bash scripts/build_from_source.sh`
+
+This's may take a while. After that, you can look into `dist/`, `android/sdk/build/output/` and `ios/sdk/Products` for Web/Android/iOS SDK artifacts.
+
+
+# Build for Platforms
+
+You can build all SDKs by one script as described above, or just build for a single platform you want step by step.
+
+## Build Javascript Framework and Html5 SDK
+Javascript Framework is required by native SDKs. **So this must be built first.**  
+Install npm dependencies(You must have node&npm installed):   
+> `$ npm install --production`
+
+Install build tools:   
+> `$ npm run install:buildtools`
+
+Build the javascript libraries:   
+> `$ npm run build:source`
+
+The artifacts are under `dist/`.
+> ```
+> $ ls dist 
+> browser.js        browser.min.js    browser.min.js.gz    
+> native.js         native.min.js     native.min.js.gz
+>```
+
+### Before build Native SDK
+Move `min` version to Native SDK folder, which will be used by native SDK build.   
+> `cp dist/native.min.js ios_sdk/WeexSDK/Resources/main.js`   
+> `cp dist/native.min.js android_sdk/assets/main.js`
+
+## Build Android SDK    
+Make sure you have install gradle, see more details about 'how to install gradle' in [gradle website](https://gradle.org/install).   
+execute root folder of project   
+> `$ gradle wrapper --gradle-version 2.14.1`   
+
+Create a Gradle setting file
+> `$ echo 'include ":android_sdk"'>settings.gradle`
+
+Build the SDK   
+> `$ ./gradlew :android_sdk:assemble -PasfRelease`
+
+Now, you can see the artifacts under `android_sdk/build/output/`.    
+You can now import the aar file to your android project.
+
+## Build iOS SDK 
+Execute command below to compile iOS SDK:   
+> `$ xcodebuild -project ios_sdk/WeexSDK.xcodeproj -target WeexSDK_MTL`
+
+Then you'll found iOS library(Framework file) under `ios_sdk/Products`.

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/41e01d78/README_RELEASE.md
----------------------------------------------------------------------
diff --git a/README_RELEASE.md b/README_RELEASE.md
deleted file mode 100644
index b46abbc..0000000
--- a/README_RELEASE.md
+++ /dev/null
@@ -1,74 +0,0 @@
-# Weex Apache Source Release   
-Weex produce SDKs to integrate to iOS/Android/Mobile web applications. This file will cover how to build Weex from source. You can either use the script we provided or manually build from source step by step.   
-See `README.md` for further information about Weex Framework.
-
-## Build Environment
-The environment required to build weex as follow:   
-* NodeJs 4.0+
-* Gradle 2.0+
-* XCode & Command Tools 8.0+ 
-
-## Build with Script
-
-Run build script:   
-> `$ bash scripts/build_from_source.sh`
-
-This's may take a while. After that, you can look into `dist/`, `android/sdk/build/output/` and `ios/sdk/Products` for Web/Android/iOS SDK artifacts.
-
-## Build Step by Step
-
-### Build Javascript Framework and Html5 SDK
-Javascript Framework is required by SDKs. **So this must be built first.**  
-Install npm dependencies(You must have node&npm installed):   
-> `$ npm install --production`
-
-Install build tools:   
-> `$ npm run install:buildtools`
-
-Build the javascript libraries:   
-> `$ npm run build:source`
-
-The artifacts are under `dist/`.
-> ```
-> $ ls dist 
-> browser.js        browser.min.js    browser.min.js.gz    
-> native.js         native.min.js     native.min.js.gz
->```
-
-### Before build Native SDK
-Move `min` version to Native SDK folder, which will be used by native SDK build.   
-> `cp dist/native.min.js ios_sdk/WeexSDK/Resources/main.js`   
-> `cp dist/native.min.js android_sdk/assets/main.js`
-
-### Build Android SDK    
-Make sure you have install gradle, see more details about 'how to install gradle' in [gradle website](https://gradle.org/install).   
-execute root folder of project   
-> `$ gradle wrapper --gradle-version 2.14.1`   
-
-Create a Gradle setting file
-> `$ echo 'include ":android_sdk"'>settings.gradle`
-
-Build the SDK   
-> `$ ./gradlew :android_sdk:assemble -PasfRelease`
-
-Now, you can see the artifacts under `android_sdk/build/output/`.    
-You can now import the aar file to your android project.
-
-### Build iOS SDK 
-Execute command below to compile iOS SDK:   
-> `$ xcodebuild -project ios_sdk/WeexSDK.xcodeproj -target WeexSDK_MTL`
-
-Then you'll found iOS library(Framework file) under `ios_sdk/Products`.
-
-## Run Apache-Rat
-
-### Download Apache Rat
-Download the binary from [Rat's website](https://creadur.apache.org/rat/download_rat.cgi), decompress it somewhere.   
-We've tested using v0.12.
-
-### Run Rat against Release files
-Just execute in your termial:
-
-> `$ ant -buildfile scripts/rat-ant-build.xml -lib path_to_the_folder_you_place_rat/apache-rat-0.12.jar`
-
-See '`scripts/rat-ant-build.xml`' for details about rules we use.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/41e01d78/RUN-RAT.md
----------------------------------------------------------------------
diff --git a/RUN-RAT.md b/RUN-RAT.md
new file mode 100644
index 0000000..225519e
--- /dev/null
+++ b/RUN-RAT.md
@@ -0,0 +1,12 @@
+# Run Apache-Rat
+
+### Download Apache Rat
+Download the binary from [Rat's website](https://creadur.apache.org/rat/download_rat.cgi), decompress it somewhere.   
+We've tested using v0.12.
+
+### Run Rat against Release files
+Just execute in your termial:
+
+> `$ ant -buildfile scripts/rat-ant-build.xml -lib path_to_the_folder_you_place_rat/apache-rat-0.12.jar`
+
+See '`scripts/rat-ant-build.xml`' for details about rules we use.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/41e01d78/scripts/release_files.rules
----------------------------------------------------------------------
diff --git a/scripts/release_files.rules b/scripts/release_files.rules
index 14190ca..bfc0958 100644
--- a/scripts/release_files.rules
+++ b/scripts/release_files.rules
@@ -20,7 +20,8 @@
 + /POSSIBLE-NOTICES-FOR-BIN-DIST
 + /DISCLAIMER
 + /README.MD
-+ /README_RELEASE.md
++ /HOW-TO-BUILD.md
++ /RUN-RAT.md
 + /package.json
 + /.wwprc
 + /.flowconfig