forked from d-s-x/bomi
-
Notifications
You must be signed in to change notification settings - Fork 1
/
deploy-win
53 lines (40 loc) · 1.03 KB
/
deploy-win
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
44
45
46
47
48
49
50
51
52
#!/bin/sh
cur=$(pwd)
sys=$(echo $MSYSTEM | tr '[:upper:]' '[:lower:]')
bit=
if [ "$sys" = "mingw64" ]; then
arch="x86_64"
bit=64
else
arch="i386"
bit=32
fi
name=bomi-$arch-$(date +%Y%m%d%H%M%S)
dir=build/$name
rsync -av --delete src/bomi/skins build
rsync -av --delete src/bomi/imports build
make translations
install -d $dir
cp build/bomi.exe $dir
cd $dir
cp -r ../skins .
cp -r ../imports .
cp -r ../translations .
cp -r ../../../mpv-fonts fonts
install -d QtQuick
base=/$sys/qt5-static/share/qt5
cp -r $base/qml/QtQuick/{Controls,Layouts,Window.2} QtQuick/
cp -r $base/qml/QtQuick.2 .
cp $base/translations/qt_{ar,ca,cs,da,de,es,fa,fi,fr,gl,he,hu,it,ja,ko,lt,pl,pt,ru,sk,sl,sv,uk,zh_CN,zh_TW}.qm translations/
find QtQuick{,.2} -name 'lib*.a' | xargs rm
dest=$cur/../bomi/windows/packages/net.xylosper.bomi.prog.$arch/data
rm $dest/*
7z a $dest/$name.7z *
cd $cur/build
mv bomi.exe bomi-tmp.exe
mv $name bomi
dest=$cur/../bomi/windows/latest/bomi-${bit}bit.7z
rm $dest
7z a $dest bomi
mv bomi $name
mv bomi-tmp.exe bomi.exe