forked from geo8bit/nodebob
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.linux.sh
More file actions
executable file
·39 lines (35 loc) · 1.21 KB
/
build.linux.sh
File metadata and controls
executable file
·39 lines (35 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash -e
echo "nodebob v0.1"
echo "---"
echo
CUR_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo "Creating bundle for linux-ia32..."
mkdir -p release.linux-ia32
rm -f release.linux-ia32/app.nw
cd app
zip -r ../release.linux-ia32/app.nw *
cd ..
cat buildTools/nw.linux-ia32/nw release.linux-ia32/app.nw > release.linux-ia32/app
chmod +x release.linux-ia32/app
if [ ! -f release.linux-ia32/nw.pak ]; then
cp buildTools/nw.linux-ia32/nw.pak release.linux-ia32/nw.pak
fi
if [ ! -f release.linux-ia32/libffmpegsumo.so ]; then
cp buildTools/nw.linux-ia32/libffmpegsumo.so release.linux-ia32/libffmpegsumo.so
fi
echo "Creating bundle for linux-x64..."
mkdir -p release.linux-x64
rm -f release.linux-x64/app.nw
zip -b app -r release.linux-x64/app.nw app/*
cat buildTools/nw.linux-x64/nw release.linux-x64/app.nw > release.linux-x64/app
chmod +x release.linux-x64/app
if [ ! -f release.linux-x64/nw.pak ]; then
cp buildTools/nw.linux-x64/nw.pak release.linux-x64/nw.pak
fi
if [ ! -f release.linux-x64/libffmpegsumo.so ]; then
cp buildTools/nw.linux-x64/libffmpegsumo.so release.linux-x64/libffmpegsumo.so
fi
echo "Deleting temporary files..."
rm -f release.linux-ia32/app.nw
rm -f release.linux-x64/app.nw
echo "Done!"