-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.sh
executable file
·33 lines (24 loc) · 1.01 KB
/
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
#!/bin/bash
__dirname=$(cd "$(dirname "$0")"; pwd -P)
cd "${__dirname}"
flutter clean
flutter build linux
if [ -e ./dist ]; then
rm -fr ./dist
fi
mkdir -p dist
cp -vr --preserve=links linux/AppDir dist/Thermal_Tools.AppDir
mkdir -p dist/Thermal_Tools.AppDir/bundle
cp -vr build/linux/x64/release/bundle/* dist/Thermal_Tools.AppDir/bundle
# Delete windows assets
rm -fr dist/Thermal_Tools.AppDir/bundle/data/flutter_assets/assets/windows
# Set executable flags
chmod +x dist/Thermal_Tools.AppDir/bundle/data/flutter_assets/assets/linux/exiftool/exiftool
chmod +x dist/Thermal_Tools.AppDir/bundle/data/flutter_assets/assets/linux/dji_tools/dji_irp*
if [ ! -f ./installtools/appimagetool ]; then
wget -O ./installtools/appimagetool https://github.com/probonopd/go-appimage/releases/download/continuous/appimagetool-838-x86_64.AppImage
chmod +x ./installtools/appimagetool
fi
export VERSION=$(cat VERSION)
./installtools/appimagetool --overwrite ./dist/Thermal_Tools.AppDir
mv -v *.AppImage ./dist/Thermal_Tools.AppImage