-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdeploy.sh
executable file
·44 lines (30 loc) · 3.5 KB
/
deploy.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
44
#!/bin/bash
set -ev
OPWD=$PWD
NAME=entry
qtdeploy -docker build windows_64_static && rm -rf rcc* moc* vendor && git clean -f && git reset --hard && docker rmi therecipe/qt:windows_64_static
cd $OPWD/deploy/windows && zip -9qrXy ../${NAME}_windows_amd64.zip * && cd $OPWD && rm -rf $OPWD/deploy/windows
qtdeploy -docker build linux_static && rm -rf rcc* moc* vendor && git clean -f && git reset --hard && docker rmi therecipe/qt:linux_static
cd $OPWD/deploy/linux && zip -9qrXy ../${NAME}_linux_amd64.zip * && cd $OPWD && rm -rf $OPWD/deploy/linux
cd $(go env GOPATH)/src/github.com/therecipe/qt/internal/docker/darwin && ./build_static.sh && cd $OPWD
qtdeploy -docker build darwin_static && rm -rf rcc* moc* vendor && git clean -f && git reset --hard && docker rmi therecipe/qt:darwin_static
cd $OPWD/deploy/darwin && zip -9qrXy ../${NAME}_darwin_amd64.zip * && cd $OPWD && rm -rf $OPWD/deploy/darwin
rm $OPWD/qml/*.qml && qtdeploy -docker -tags=xp build windows_32_shared_xp && rm -rf rcc* moc* vendor && git clean -f && git reset --hard && docker rmi therecipe/qt:windows_32_shared_xp
cd $OPWD/deploy/windows && zip -9qrXy ../${NAME}_windows_386_xp.zip * && cd $OPWD && rm -rf $OPWD/deploy/windows
rm $OPWD/qml/*.qml && qtdeploy -docker build js && rm -rf rcc* moc* vendor && git clean -f && git reset --hard && docker rmi therecipe/qt:js
cd $OPWD/deploy/js && zip -9qrXy ../${NAME}_js.zip * && cd $OPWD && rm -rf $OPWD/deploy/js
mkdir $OPWD/deploy/darwin && cp $OPWD/deploy/*_amd64*.* $OPWD/deploy/darwin
cd $OPWD/deploy/darwin && find . -name "*.zip" -exec unzip {} \; && mv ${NAME} linux && mv ${NAME}.exe windows && zip -9qrXy payload.zip linux windows
SRC=./${NAME}.app/Contents/MacOS/${NAME} && cat $SRC payload.zip > ${SRC}_new && zip -A ${SRC}_new && rm $SRC && bbe -e 's/_PLACEH_/'$(stat -f "%z" payload.zip)'/g' ${SRC}_new > $SRC && rm ${SRC}_new && chmod +x $SRC
ZNAME=$(ls *darwin*) && rm -r linux windows *.zip && zip -9qrXy $ZNAME ${NAME}.app && rm -r ${NAME}.app
mkdir $OPWD/deploy/linux && cp $OPWD/deploy/*_amd64*.* $OPWD/deploy/linux
cd $OPWD/deploy/linux && find . -name "*.zip" -exec unzip {} \; && mv ${NAME}.exe windows && mv ${NAME}.app/Contents/MacOS/${NAME} darwin && zip -9qrXy payload.zip windows darwin
SRC=./${NAME} && cat $SRC payload.zip > ${SRC}_new && zip -A ${SRC}_new && rm $SRC && bbe -e 's/_PLACEH_/'$(stat -f "%z" payload.zip)'/g' ${SRC}_new > $SRC && rm ${SRC}_new && chmod +x $SRC
ZNAME=$(ls *linux*) && rm -r windows darwin *.app *.zip && zip -9qrXy $ZNAME ${NAME} && rm -r ${NAME}
mkdir $OPWD/deploy/windows && cp $OPWD/deploy/*_amd64*.* $OPWD/deploy/windows
cd $OPWD/deploy/windows && find . -name "*.zip" -exec unzip {} \; && mv ${NAME} linux && mv ${NAME}.app/Contents/MacOS/${NAME} darwin && zip -9qrXy payload.zip linux darwin
SRC=./${NAME}.exe && cat $SRC payload.zip > ${SRC}_new && zip -A ${SRC}_new && rm $SRC && bbe -e 's/_PLACEH_/'$(stat -f "%z" payload.zip)'/g' ${SRC}_new > $SRC && rm ${SRC}_new && chmod +x $SRC
ZNAME=$(ls *windows*) && rm -r linux darwin *.app *.zip && zip -9qrXy $ZNAME ${NAME}.exe && rm -r ${NAME}.exe
mkdir $OPWD/deploy/js && cp $OPWD/deploy/*.zip $OPWD/deploy/js
cd $OPWD/deploy/js && mv *darwin_amd64* darwin.zip && mv *linux_amd64* linux.zip && mv *windows_amd64* windows.zip && mv *windows_386* windowsxp.zip && mv *js* wasm.zip && unzip wasm.zip && zip -9qrXy ${NAME}_wasm.zip * && mv ${NAME}_wasm.zip $OPWD/deploy/${NAME}_wasm.zip
cd $OPWD && rm -rf $OPWD/deploy/js $OPWD/deploy/${NAME}_js.zip $OPWD/deploy/*_amd64* && find $OPWD/deploy -name "*_amd64*" -exec mv {} $OPWD/deploy \;