52
52
run . sudo yum install -y patch
53
53
run . sudo yum install -y autoconf
54
54
run . sudo yum install -y automake
55
+
56
+ # Needed for Cordova
57
+ run . sudo yum install -y java-1.8.0-openjdk
58
+ # TODO: Gradle for yum
59
+
55
60
elif type apt-get > /dev/null 2> /dev/null
56
61
then
57
62
echo Detected ' apt-get' : Installing packages from there.
84
89
run . sudo apt-get install -y autoconf
85
90
run . sudo apt-get install -y automake
86
91
run . sudo apt-get install -y libtinfo-dev
92
+
93
+ # Needed for Cordova
94
+ run . sudo apt-get install -y default-jdk
95
+ run . sudo apt-get install -y gradle
96
+
87
97
elif type zypper > /dev/null 2> /dev/null
88
98
then
89
99
echo Detected ' zypper' : Installing packages from there.
@@ -113,9 +123,13 @@ then
113
123
run . sudo zypper -n install patch
114
124
run . sudo zypper -n install autoconf
115
125
run . sudo zypper -n install automake
126
+
127
+ # Needed for Cordova
128
+ # TODO: OpenJDK, JRE and Gradle for Zypper
116
129
else
117
130
echo " WARNING: Could not find package manager."
118
131
echo " Make sure necessary packages are installed."
132
+
119
133
fi
120
134
121
135
# Choose the right GHC download
@@ -169,7 +183,6 @@ run $BUILD cabal_install ./ghcjs
169
183
run $BUILD rm -rf ghcjs
170
184
run . ghcjs-boot --dev --ghcjs-boot-dev-branch ghc-8.0 --shims-dev-branch ghc-8.0 --no-prof --no-haddock
171
185
172
- run $BUILD rm -rf downloads
173
186
174
187
# Install and build CodeMirror editor.
175
188
@@ -187,5 +200,30 @@ function build_codemirror {
187
200
188
201
run $BUILD /CodeMirror build_codemirror
189
202
203
+ # Install Android SDK
204
+
205
+ run $DOWNLOADS wget https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip
206
+ run $BUILD unzip $DOWNLOADS /sdk-tools-linux-3859397.zip
207
+ run $BUILD mkdir -p Android/Sdk
208
+ run $BUILD mv tools Android/Sdk/
209
+ run $BUILD yes | ./Android/Sdk/tools/android update
210
+
211
+ # Install Apache Cordova
212
+ run $BUILD mkdir Cordova
213
+ run $BUILD /Cordova npm install -s cordova
214
+
215
+ # Create a fresh template project and copy in files
216
+ run . cordova create android-template
217
+ run android-template cordova platform add android
218
+ run . rm -rf android-template/www android-template/res
219
+ run . cp android-resources/* android-template/ -rf
220
+
221
+ # Install the Android SDK
222
+ run $BUILD sdkmanager " build-tools;26.0.0"
223
+
224
+ # # Remove downloads directory
225
+ run $BUILD rm -rf downloads
226
+
190
227
# Go ahead and run a first build, which installs more local packages.
191
228
./build.sh
229
+
0 commit comments