-
-
Notifications
You must be signed in to change notification settings - Fork 109
/
Copy pathappimage.build.sh
executable file
·43 lines (36 loc) · 1.58 KB
/
appimage.build.sh
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
40
41
42
43
#!/bin/bash
export BUILD_FOLDER=/tmp/build
export SOURCE_FOLDER="$PWD"
wget -nv https://github.com/ossia/sdk/releases/download/sdk29/sdk-linux.tar.xz
tar xaf sdk-linux.tar.xz
rm -rf sdk-linux.tar.xz
mkdir -p $BUILD_FOLDER
ln -s $BUILD_FOLDER build
docker pull ossia/score-package-linux
docker run \
-v "$SOURCE_FOLDER/cmake/Deployment/Linux/AppImage/Recipe.llvm:/Recipe" \
-e TOOLCHAIN=appimage \
--mount type=bind,source="$PWD/opt/ossia-sdk",target=/opt/ossia-sdk \
--mount type=bind,source="$SOURCE_FOLDER",target=/score \
--mount type=bind,source="$BUILD_FOLDER",target=/build \
ossia/score-package-linux \
/bin/bash /Recipe
sudo chown -R $(whoami) $BUILD_FOLDER
wget -nv "https://github.com/probonopd/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
chmod a+x appimagetool-x86_64.AppImage
wget -nv "https://github.com/probonopd/AppImageKit/releases/download/continuous/AppRun-x86_64"
chmod a+x AppRun-x86_64
cp AppRun-x86_64 build/score.AppDir/AppRun
cp "$SOURCE_FOLDER/cmake/Deployment/Linux/AppImage/ossia-score.desktop" build/score.AppDir/
cp "$SOURCE_FOLDER/src/lib/resources/ossia-score.png" build/score.AppDir/
cp "$SOURCE_FOLDER/src/lib/resources/ossia-score.png" build/score.AppDir/.DirIcon
if [[ ! -f "build/score.AppDir/usr/bin/ossia-score" ]]; then
echo "Build failure, ossia-score main binary missing ! "
exit 1
fi
./appimagetool-x86_64.AppImage -n "build/score.AppDir" "Score.AppImage"
chmod a+rwx Score.AppImage
(
cd $BUILD_FOLDER/SDK
zip -r -q -9 $SOURCE_FOLDER/linux-sdk.zip usr
)