Skip to content

Commit 877f8ff

Browse files
committed
Bundle some libraries with the board manager package
#282 SD #283 Adafruit_ILI9341 #290 OneWire
1 parent dd58d72 commit 877f8ff

File tree

2 files changed

+30
-7
lines changed

2 files changed

+30
-7
lines changed

build/.gitignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
*.zip
2+
linux/*tar.gz
3+
linux/dist/*tgz
4+
macosx/*tar.gz
5+
macosx/dist/*tgz
6+
windows/*zip
7+
windows/dist/*tgz

build/build_board_manager_package.sh

+23-7
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,29 @@ outdir=esp8266-$ver
55
srcdir=../hardware/esp8266com/esp8266/
66
mkdir -p $outdir
77
cp -R $srcdir/* $outdir/
8+
9+
cp -R ../libraries/SD $outdir/libraries/
10+
cp -R ../libraries/Adafruit_ILI9341 $outdir/libraries/
11+
cp -R ../libraries/OneWire $outdir/libraries/
12+
813
cat $srcdir/platform.txt | \
914
gsed 's/runtime.tools.xtensa-lx106-elf-gcc.path={runtime.platform.path}\/tools\/xtensa-lx106-elf//g' | \
1015
gsed 's/runtime.tools.esptool.path={runtime.platform.path}\/tools//g' | \
1116
gsed 's/tools.esptool.path={runtime.platform.path}\/tools/tools.esptool.path=\{runtime.tools.esptool.path\}/g' \
1217
> $outdir/platform.txt
1318

1419
zip -r $outdir.zip $outdir
20+
rm -rf $outdir
1521
sha=`shasum -a 256 $outdir.zip | cut -f 1 -d ' '`
1622
size=`/bin/ls -l $outdir.zip | awk '{print $5}'`
1723
echo Size: $size
1824
echo SHA-256: $sha
1925

20-
scp $outdir.zip dl:apps/download_files/download/
21-
26+
if [ ! -z "$do_upload" ]; then
27+
remote="http://arduino.esp8266.com"
28+
else
29+
remote="http://localhost:8000"
30+
fi
2231

2332
cat << EOF > package_esp8266com_index.json
2433
{
@@ -36,7 +45,7 @@ cat << EOF > package_esp8266com_index.json
3645
"architecture":"esp8266",
3746
"version":"$ver",
3847
"category":"ESP8266",
39-
"url":"http://arduino.esp8266.com/$outdir.zip",
48+
"url":"$remote/$outdir.zip",
4049
"archiveFileName":"$outdir.zip",
4150
"checksum":"SHA-256:$sha",
4251
"size":"$size",
@@ -85,11 +94,11 @@ cat << EOF > package_esp8266com_index.json
8594
"size":"12513"
8695
},
8796
{
88-
"host":"i686-pc-linux-gnu",
89-
"url":"https://github.com/igrr/esptool-ck/releases/download/0.4.4/esptool-0.4.4-linux32.tar.gz",
97+
"host":"i686-pc-linux-gnu",
98+
"url":"https://github.com/igrr/esptool-ck/releases/download/0.4.4/esptool-0.4.4-linux32.tar.gz",
9099
"archiveFileName":"esptool-0.4.4-linux32.tar.gz",
91100
"checksum":"SHA-256:4aa81b97a470641771cf371e5d470ac92d3b177adbe8263c4aae66e607b67755",
92-
"size":"12044"
101+
"size":"12044"
93102
}
94103
]
95104
},
@@ -131,5 +140,12 @@ cat << EOF > package_esp8266com_index.json
131140
}
132141
EOF
133142

134-
scp package_esp8266com_index.json dl:apps/download_files/download
143+
if [ ! -z "$do_upload" ]; then
144+
scp $outdir.zip dl:apps/download_files/download/
145+
scp package_esp8266com_index.json dl:apps/download_files/download
146+
else
147+
python -m SimpleHTTPServer
148+
fi
149+
150+
135151

0 commit comments

Comments
 (0)