2017-07-07 13:02:00 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
function addFile {
|
2017-07-20 18:48:39 +02:00
|
|
|
cp $1 . || (echo cp $1 failed ; return 1)
|
2017-07-20 18:28:54 +02:00
|
|
|
7z a -tzip portable.zip $(basename $1) > /dev/null
|
2017-07-07 13:02:00 +02:00
|
|
|
echo "Source: \"$(basename $1)\"; DestDir: \"{app}\"; Flags: ignoreversion" >> installer.iss
|
2017-07-20 18:48:39 +02:00
|
|
|
echo $1
|
2017-07-07 13:02:00 +02:00
|
|
|
}
|
2017-07-07 14:38:43 +02:00
|
|
|
|
2017-07-07 15:33:56 +02:00
|
|
|
function addFileIn {
|
2017-07-08 11:41:41 +02:00
|
|
|
name=$2\\$(basename $1)
|
2017-07-07 15:33:56 +02:00
|
|
|
mkdir -p $2
|
2017-07-20 18:48:39 +02:00
|
|
|
cp $1 $2 || (echo cp $name failed ; return 1)
|
2017-07-20 18:28:54 +02:00
|
|
|
7z a -tzip portable.zip $name > /dev/null
|
2017-07-08 11:36:01 +02:00
|
|
|
echo "Source: \"$name\"; DestDir: \"{app}\\$2\"; Flags: ignoreversion" >> installer.iss
|
2017-07-20 18:48:39 +02:00
|
|
|
echo $name
|
2017-07-07 15:33:56 +02:00
|
|
|
}
|
|
|
|
|
2017-10-02 17:43:25 +02:00
|
|
|
ver=$(cat src/main.cpp | grep setApplicationVersion | sed "s/\\s*a.setApplicationVersion(\"//g" | sed "s/\");//g")
|
2017-07-07 13:02:00 +02:00
|
|
|
|
|
|
|
cd packages/windows
|
2017-07-08 11:33:17 +02:00
|
|
|
cp ../../KShare.exe . || exit 3
|
2017-07-08 12:32:47 +02:00
|
|
|
7z a -tzip portable.zip KShare.exe
|
2017-07-07 13:02:00 +02:00
|
|
|
|
2019-05-07 17:23:39 +02:00
|
|
|
cp /c/Windows/System32/msvcr120.dll /c/projects/kshare/packages/windows/
|
|
|
|
|
2017-07-07 13:02:00 +02:00
|
|
|
sed "s/;VER;/$ver/" installer.iss.pattern.top > installer.iss
|
|
|
|
|
2017-07-07 15:13:20 +02:00
|
|
|
addFile ../../build/QtAV-depends-windows-x86+x64/bin/avcodec-57.dll
|
|
|
|
addFile ../../build/QtAV-depends-windows-x86+x64/bin/avformat-57.dll
|
|
|
|
addFile ../../build/QtAV-depends-windows-x86+x64/bin/avutil-55.dll
|
2017-07-07 15:21:13 +02:00
|
|
|
addFile ../../build/QtAV-depends-windows-x86+x64/bin/swresample-2.dll
|
2017-07-07 15:13:20 +02:00
|
|
|
addFile ../../build/QtAV-depends-windows-x86+x64/bin/swscale-4.dll
|
|
|
|
addFile /c/Qt/5.9/mingw53_32/bin/Qt5Core.dll
|
|
|
|
addFile /c/Qt/5.9/mingw53_32/bin/Qt5Network.dll
|
|
|
|
addFile /c/Qt/5.9/mingw53_32/bin/Qt5Gui.dll
|
|
|
|
addFile /c/Qt/5.9/mingw53_32/bin/Qt5Widgets.dll
|
|
|
|
addFile /c/Qt/5.9/mingw53_32/bin/Qt5WinExtras.dll
|
2019-05-07 22:52:25 +02:00
|
|
|
addFile /c/Qt/5.9/mingw53_32/bin/Qt5Multimedia.dll
|
2017-07-07 15:33:56 +02:00
|
|
|
|
|
|
|
addFileIn /c/Qt/5.9/mingw53_32/plugins/platforms/qwindows.dll platforms
|
2019-05-13 21:01:24 +02:00
|
|
|
addFileIn /c/Qt/5.9/mingw53_32/plugins/mediaservice/dsengine.dll mediaservice
|
2017-07-07 15:33:56 +02:00
|
|
|
|
2017-07-07 15:13:20 +02:00
|
|
|
addFile /c/Qt/5.9/mingw53_32/bin/LIBSTDC++-6.DLL
|
|
|
|
addFile /c/Qt/5.9/mingw53_32/bin/LIBWINPTHREAD-1.DLL
|
|
|
|
addFile /c/Qt/5.9/mingw53_32/bin/LIBGCC_S_DW2-1.DLL
|
2017-07-07 14:38:43 +02:00
|
|
|
|
2017-07-08 12:39:43 +02:00
|
|
|
addFile /c/OpenSSL-Win32/bin/libeay32.dll
|
|
|
|
addFile /c/OpenSSL-Win32/bin/ssleay32.dll
|
2019-05-07 17:23:39 +02:00
|
|
|
#addFile /c/OpenSSL-Win32/bin/msvcr120.dll
|
|
|
|
addFile /c/Windows/System32/msvcr120.dll
|
2017-07-08 12:28:47 +02:00
|
|
|
|
2017-07-20 18:45:10 +02:00
|
|
|
echo -----------------
|
|
|
|
ls /c/OpenSSL-Win32/bin/ -R
|
|
|
|
echo -----------------
|
2017-07-20 18:24:45 +02:00
|
|
|
|
2017-07-07 13:02:00 +02:00
|
|
|
cat installer.iss.pattern.bottom >> installer.iss
|
|
|
|
"C:\Program Files (x86)\Inno Setup 5\ISCC.exe" installer.iss
|
2020-02-23 18:25:04 +01:00
|
|
|
cp Output/setup.exe ../../win_kshare_v${ver}_installer.exe || exit 1
|
|
|
|
cp ../../KShare.exe ../../KShare_v${ver}.exe || exit 1
|
|
|
|
cp portable.zip ../../win_kshare_v${ver}_portable.zip || exit 2
|