Moving all mobile demos into demos/mobile.
HTML for both demos is now checked in as demos/mobile/html/index.html. Updated android and ios scripts to copy webview.html from above.
@@ -1,29 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<!-- HTML file to host Blockly in a mobile WebView. -->
|
||||
<html>
|
||||
<head>
|
||||
<style type="text/css">
|
||||
html, body, #blocklyDiv {
|
||||
border: 0;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
<script src="blockly_compressed.js"></script>
|
||||
<script src="blocks_compressed.js"></script>
|
||||
<!-- TODO: Select msg file based on locale. -->
|
||||
<script src="msg/js/en.js"></script>
|
||||
<script src="toolbox_standard.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="blocklyDiv"></div>
|
||||
<script type="text/javascript">
|
||||
var workspacePlayground = Blockly.inject('blocklyDiv', {
|
||||
media: 'media/',
|
||||
toolbox: BLOCKLY_TOOLBOX_XML['standard']
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -4,3 +4,4 @@
|
||||
src/main/assets/blockly/blockly_compressed.js
|
||||
src/main/assets/blockly/blocks_compressed.js
|
||||
src/main/assets/blockly/media
|
||||
src/main/assets/blockly/webview.html
|
||||
@@ -20,8 +20,16 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
task copyBlocklyWebFiles(type: Copy) {
|
||||
from('../../..') {
|
||||
task copyBlocklyHtmlFile(type: Copy) {
|
||||
from('../../html') {
|
||||
include 'index.html'
|
||||
}
|
||||
into project(':app').file('./src/main/assets/blockly')
|
||||
rename('index.html', 'webview.html')
|
||||
}
|
||||
|
||||
task copyBlocklyMoreFiles(type: Copy) {
|
||||
from('../../../..') {
|
||||
include 'blockly_compressed.js', 'blocks_compressed.js', 'msg/js/**', 'media/**'
|
||||
exclude 'media/test_*'
|
||||
}
|
||||
@@ -29,7 +37,7 @@ task copyBlocklyWebFiles(type: Copy) {
|
||||
}
|
||||
|
||||
project.afterEvaluate {
|
||||
preBuild.dependsOn copyBlocklyWebFiles
|
||||
preBuild.dependsOn(copyBlocklyHtmlFile, copyBlocklyMoreFiles)
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 9.0 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
@@ -3,6 +3,7 @@
|
||||
/Resources/Non-Localized/Blockly/blocks_compressed.js
|
||||
/Resources/Non-Localized/Blockly/media
|
||||
/Resources/Non-Localized/Blockly/msg
|
||||
/Resources/Non-Localized/Blockly/webview.html
|
||||
|
||||
|
||||
# Xcode.gitignore
|
||||
@@ -1,10 +1,10 @@
|
||||
#!/bin/bash
|
||||
set -eux
|
||||
|
||||
BLOCKLY_ROOT=../..
|
||||
BLOCKLY_ROOT=../../..
|
||||
IOS_RESOURCES=Resources/Non-Localized/Blockly
|
||||
|
||||
FILES_TO_COPY=(
|
||||
MORE_FILES_TO_COPY=(
|
||||
"blockly_compressed.js"
|
||||
"blocks_compressed.js"
|
||||
"media"
|
||||
@@ -13,7 +13,8 @@ FILES_TO_COPY=(
|
||||
|
||||
mkdir -p $IOS_RESOURCES/media
|
||||
mkdir -p $IOS_RESOURCES/msg/js
|
||||
for i in "${FILES_TO_COPY[@]}"; do # The quotes are necessary here
|
||||
rsync -rp ../html/index.html $IOS_RESOURCES/webview.html
|
||||
for i in "${MORE_FILES_TO_COPY[@]}"; do # The quotes are necessary here
|
||||
TARGET_DIR=$(dirname $IOS_RESOURCES/$i)
|
||||
rsync -rp $BLOCKLY_ROOT/$i $TARGET_DIR
|
||||
done
|
||||