-
Notifications
You must be signed in to change notification settings - Fork 3
/
make_installer.sh
62 lines (48 loc) · 2.21 KB
/
make_installer.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/bash
# Crear un Instalador Offline con Qt Installer Framework using MinGW64 [Windows]
#
export DEST_DIR=./deployment/windows/packages/cu.pictadl.gui/data
export PACKAGE_DIR=./deployment/windows
DEPS="libwinpthread-1.dll libstdc++-6.dll libharfbuzz-0.dll \
libpng16-16.dll zlib1.dll libgraphite2.dll libfreetype-6.dll \
libglib-2.0-0.dll libbrotlidec.dll libbz2-1.dll libintl-8.dll \
libpcre-1.dll libdouble-conversion.dll libicuin67.dll libicuuc67.dll \
libpcre2-16-0.dll libzstd.dll libicudt67.dll libbrotlicommon.dll libiconv-2.dll"
echo "Cleaning ..."
rm -rf ./release/*
[[ -d ${DEST_DIR} ]] && rm -rf ${DEST_DIR}/*
echo -e "Restore file"
git restore deployment/windows/packages/cu.pictadl.gui/data/.gitkeep
echo "Building Picta-dl_GUI ..."
qmake Picta-dl_GUI.pro -spec win32-g++
make -j2
# echo "Create output directory if it does not exist"
# mkdir -p "${DEST_DIR}/tools"
echo -e "\nCopy the final executables and dependencies to: ${DEST_DIR}"
echo "Copying dependencies ..."
cp -f $MINGW_PREFIX/bin/libgcc_*-1.dll ${DEST_DIR}
for v in $DEPS ; do
[[ -f "$MINGW_PREFIX/bin/$v" ]] && cp -f "$MINGW_PREFIX/bin/$v" ${DEST_DIR};
done
echo -e "Copying executables ...\n"
cp -f "./release/Picta-dl_GUI.exe" ${DEST_DIR}
cp -f "./Resources/picta-dl.exe.orig" "${PACKAGE_DIR}/packages/cu.pictadl.cli/data/picta-dl.exe"
cp -f "./Resources/ffmpeg.exe.orig" "${PACKAGE_DIR}/packages/cu.pictadl.ffmpeg/data/ffmpeg.exe"
echo -e "Deploying executable ...\n"
windeployqt --dir=${DEST_DIR} ./release/Picta-dl_GUI.exe
echo -e "\nCreating Offline/Online Installer Binary ...\n"
binarycreator -v -c ${PACKAGE_DIR}/config/config.xml -p ${PACKAGE_DIR}/packages PictaDownloaderGUI-Installer.exe
echo -e "Offline/Online Installer created!\n"
echo -e "Creating Repository for GUI ..."
repogen --update -v -p deployment/windows/packages -i cu.pictadl.gui deployment/repository
echo -e "\nUpdating GH-Pages ...\n"
git config --global user.name "oleksis"
git config --global user.email "[email protected]"
git config --global core.autocrlf input
if [[ ! -z "$GITHUB_WORKSPACE" ]]; then
git restore configuration.h mainwindow.h
fi
git add -A
git commit -am "Deploy repository to gh-pages"
git push -f origin HEAD:gh-pages
echo -e "\nPicta-dl_GUI deployed!"