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

Side by Side Diff: samples/github/android/compile_mock.sh

Issue 1659163007: Rename fletch -> dartino (Closed) Base URL: https://github.com/dartino/sdk.git@master
Patch Set: address comments Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « samples/github/android/compile.sh ('k') | samples/github/bin/github.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 2
3 # Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file 3 # Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file
4 # for details. All rights reserved. Use of this source code is governed by a 4 # for details. All rights reserved. Use of this source code is governed by a
5 # BSD-style license that can be found in the LICENSE.md file. 5 # BSD-style license that can be found in the LICENSE.md file.
6 6
7 # Build steps 7 # Build steps
8 # - Run servicec. 8 # - Run servicec.
9 # - Build fletch library generators for target platforms (here ia32 and arm). 9 # - Build dartino library generators for target platforms (here ia32 and arm).
10 # - In the servicec java output directory build libfletch using ndk-build. 10 # - In the servicec java output directory build libdartino using ndk-build.
11 # - Copy/link output files servicec to the jni and java directories. 11 # - Copy/link output files servicec to the jni and java directories.
12 # - Generate a snapshot of your Dart program and add it to you resources dir. 12 # - Generate a snapshot of your Dart program and add it to you resources dir.
13 13
14 PROJ=github 14 PROJ=github
15 ANDROID_PROJ=GithubMock 15 ANDROID_PROJ=GithubMock
16 DART_FILE=bin/github_mock_service.dart 16 DART_FILE=bin/github_mock_service.dart
17 17
18 set -ue 18 set -ue
19 19
20 DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) 20 DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
21 21
22 FLETCH_DIR="$(cd "$DIR/../../.." && pwd)" 22 DARTINO_DIR="$(cd "$DIR/../../.." && pwd)"
23 23
24 # TODO(zerny): Support other modes than Release in tools/android_build/jni/Andro id.mk 24 # TODO(zerny): Support other modes than Release in tools/android_build/jni/Andro id.mk
25 TARGET_MODE=Release 25 TARGET_MODE=Release
26 TARGET_DIR="$(cd "$DIR/.." && pwd)" 26 TARGET_DIR="$(cd "$DIR/.." && pwd)"
27 TARGET_GEN_DIR="$TARGET_DIR/generated" 27 TARGET_GEN_DIR="$TARGET_DIR/generated"
28 TARGET_PKG_FILE="$TARGET_DIR/.packages" 28 TARGET_PKG_FILE="$TARGET_DIR/.packages"
29 29
30 SERVICE_GEN_DIR="$TARGET_GEN_DIR/service" 30 SERVICE_GEN_DIR="$TARGET_GEN_DIR/service"
31 31
32 JAVA_DIR=$DIR/$ANDROID_PROJ/app/src/main/java/fletch 32 JAVA_DIR=$DIR/$ANDROID_PROJ/app/src/main/java/dartino
33 JNI_LIBS_DIR=$DIR/$ANDROID_PROJ/app/src/main/jniLibs 33 JNI_LIBS_DIR=$DIR/$ANDROID_PROJ/app/src/main/jniLibs
34 34
35 MOCK_SERVER_SNAPSHOT="$TARGET_DIR/github_mock_service.snapshot" 35 MOCK_SERVER_SNAPSHOT="$TARGET_DIR/github_mock_service.snapshot"
36 36
37 set -x 37 set -x
38 38
39 # Compile dart service file. 39 # Compile dart service file.
40 if [[ $# -eq 0 ]] || [[ "$1" == "service" ]]; then 40 if [[ $# -eq 0 ]] || [[ "$1" == "service" ]]; then
41 rm -rf "$SERVICE_GEN_DIR" 41 rm -rf "$SERVICE_GEN_DIR"
42 $DIR/../compile_mock_service.sh service 42 $DIR/../compile_mock_service.sh service
43 43
44 # TODO(zerny): Change the servicec output directory structure to allow easy 44 # TODO(zerny): Change the servicec output directory structure to allow easy
45 # referencing from Android Studio. 45 # referencing from Android Studio.
46 mkdir -p $JAVA_DIR 46 mkdir -p $JAVA_DIR
47 cp -R $SERVICE_GEN_DIR/java/fletch/*.java $JAVA_DIR/ 47 cp -R $SERVICE_GEN_DIR/java/dartino/*.java $JAVA_DIR/
48 fi 48 fi
49 49
50 # Build the native interpreter src for arm and x86. 50 # Build the native interpreter src for arm and x86.
51 if [[ $# -eq 0 ]] || [[ "$1" == "fletch" ]]; then 51 if [[ $# -eq 0 ]] || [[ "$1" == "dartino" ]]; then
52 cd $FLETCH_DIR 52 cd $DARTINO_DIR
53 ninja 53 ninja
54 ninja -C out/${TARGET_MODE}XARMAndroid fletch_vm_library_generator 54 ninja -C out/${TARGET_MODE}XARMAndroid dartino_vm_library_generator
55 ninja -C out/${TARGET_MODE}IA32Android fletch_vm_library_generator 55 ninja -C out/${TARGET_MODE}IA32Android dartino_vm_library_generator
56 mkdir -p out/${TARGET_MODE}XARMAndroid/obj/src/vm/fletch_vm.gen 56 mkdir -p out/${TARGET_MODE}XARMAndroid/obj/src/vm/dartino_vm.gen
57 mkdir -p out/${TARGET_MODE}IA32Android/obj/src/vm/fletch_vm.gen 57 mkdir -p out/${TARGET_MODE}IA32Android/obj/src/vm/dartino_vm.gen
58 out/${TARGET_MODE}XARMAndroid/fletch_vm_library_generator > \ 58 out/${TARGET_MODE}XARMAndroid/dartino_vm_library_generator > \
59 out/${TARGET_MODE}XARMAndroid/obj/src/vm/fletch_vm.gen/generated.S 59 out/${TARGET_MODE}XARMAndroid/obj/src/vm/dartino_vm.gen/generated.S
60 out/${TARGET_MODE}IA32Android/fletch_vm_library_generator > \ 60 out/${TARGET_MODE}IA32Android/dartino_vm_library_generator > \
61 out/${TARGET_MODE}IA32Android/obj/src/vm/fletch_vm.gen/generated.S 61 out/${TARGET_MODE}IA32Android/obj/src/vm/dartino_vm.gen/generated.S
62 62
63 cd $SERVICE_GEN_DIR/java 63 cd $SERVICE_GEN_DIR/java
64 CPUCOUNT=1 64 CPUCOUNT=1
65 if [[ $(uname) = 'Darwin' ]]; then 65 if [[ $(uname) = 'Darwin' ]]; then
66 CPUCOUNT=$(sysctl -n hw.logicalcpu_max) 66 CPUCOUNT=$(sysctl -n hw.logicalcpu_max)
67 else 67 else
68 CPUCOUNT=$(lscpu -p | grep -vc '^#') 68 CPUCOUNT=$(lscpu -p | grep -vc '^#')
69 fi 69 fi
70 NDK_MODULE_PATH=. ndk-build -j$CPUCOUNT 70 NDK_MODULE_PATH=. ndk-build -j$CPUCOUNT
71 71
(...skipping 10 matching lines...) Expand all
82 SNAPSHOT="$DIR/$ANDROID_PROJ/app/src/main/res/raw/snapshot" 82 SNAPSHOT="$DIR/$ANDROID_PROJ/app/src/main/res/raw/snapshot"
83 mkdir -p `dirname "$SNAPSHOT"` 83 mkdir -p `dirname "$SNAPSHOT"`
84 cp "$MOCK_SERVER_SNAPSHOT" "$SNAPSHOT" 84 cp "$MOCK_SERVER_SNAPSHOT" "$SNAPSHOT"
85 fi 85 fi
86 86
87 set +x 87 set +x
88 88
89 if [[ $# -eq 1 ]]; then 89 if [[ $# -eq 1 ]]; then
90 echo 90 echo
91 echo "Only ran task $1." 91 echo "Only ran task $1."
92 echo "Possible tasks: service, fletch, and snapshot" 92 echo "Possible tasks: service, dartino, and snapshot"
93 echo "If Fletch or any IMMI files changed re-run compile.sh without argument s." 93 echo "If Dartino or any IMMI files changed re-run compile.sh without argumen ts."
94 fi 94 fi
OLDNEW
« no previous file with comments | « samples/github/android/compile.sh ('k') | samples/github/bin/github.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698