mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Merge pull request #6240
Maxim Biro (10): chore(windows): update OpenSSL to 1.1.1h chore(windows): update Qt to 5.12.9 chore(windows): update FFmpeg to 4.3.1 chore(windows): update QREncode to 4.1.1 chore(windows): update VPX to 1.9.0 chore(windows): update Expat to 2.2.10 refactor(windows): Snorenotify build script fix(windows): libsnore-qt5 not being installed refactor(Windows): unify whitespaces in NSIS scripts fix(windows): iconengines not being installed
This commit is contained in:
commit
aca94300c8
|
@ -130,10 +130,12 @@ apt-get update
|
||||||
apt-get install -y --no-install-recommends \
|
apt-get install -y --no-install-recommends \
|
||||||
autoconf \
|
autoconf \
|
||||||
automake \
|
automake \
|
||||||
build-essential \
|
|
||||||
bsdtar \
|
bsdtar \
|
||||||
|
build-essential \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
cmake \
|
cmake \
|
||||||
|
curl \
|
||||||
|
extra-cmake-modules \
|
||||||
git \
|
git \
|
||||||
libtool \
|
libtool \
|
||||||
nsis \
|
nsis \
|
||||||
|
@ -142,10 +144,8 @@ apt-get install -y --no-install-recommends \
|
||||||
tclsh \
|
tclsh \
|
||||||
texinfo \
|
texinfo \
|
||||||
unzip \
|
unzip \
|
||||||
curl \
|
|
||||||
yasm \
|
yasm \
|
||||||
zip \
|
zip
|
||||||
extra-cmake-modules
|
|
||||||
|
|
||||||
if [[ "$ARCH" == "i686" ]]
|
if [[ "$ARCH" == "i686" ]]
|
||||||
then
|
then
|
||||||
|
@ -232,9 +232,9 @@ store_apt_cache()
|
||||||
# OpenSSL
|
# OpenSSL
|
||||||
|
|
||||||
OPENSSL_PREFIX_DIR="$DEP_DIR/libopenssl"
|
OPENSSL_PREFIX_DIR="$DEP_DIR/libopenssl"
|
||||||
OPENSSL_VERSION=1.1.1g
|
OPENSSL_VERSION=1.1.1h
|
||||||
# hash from https://www.openssl.org/source/
|
# hash from https://www.openssl.org/source/
|
||||||
OPENSSL_HASH="ddb04774f1e32f0c49751e21b67216ac87852ceb056b75209af2443400636d46"
|
OPENSSL_HASH="5c9ca8774bd7b03e5784f26ae9e9e6d749c9da2438545077e6b3d755a06595d9"
|
||||||
OPENSSL_FILENAME="openssl-$OPENSSL_VERSION.tar.gz"
|
OPENSSL_FILENAME="openssl-$OPENSSL_VERSION.tar.gz"
|
||||||
if [ ! -f "$OPENSSL_PREFIX_DIR/done" ]
|
if [ ! -f "$OPENSSL_PREFIX_DIR/done" ]
|
||||||
then
|
then
|
||||||
|
@ -275,10 +275,10 @@ fi
|
||||||
QT_PREFIX_DIR="$DEP_DIR/libqt5"
|
QT_PREFIX_DIR="$DEP_DIR/libqt5"
|
||||||
QT_MAJOR=5
|
QT_MAJOR=5
|
||||||
QT_MINOR=12
|
QT_MINOR=12
|
||||||
QT_PATCH=8
|
QT_PATCH=9
|
||||||
QT_VERSION=$QT_MAJOR.$QT_MINOR.$QT_PATCH
|
QT_VERSION=$QT_MAJOR.$QT_MINOR.$QT_PATCH
|
||||||
# hash from https://download.qt.io/archive/qt/5.12/5.12.8/single/qt-everywhere-src-5.12.8.tar.xz.mirrorlist
|
# hash from https://download.qt.io/archive/qt/5.12/5.12.9/single/qt-everywhere-src-5.12.9.tar.xz.mirrorlist
|
||||||
QT_HASH="9142300dfbd641ebdea853546511a352e4bd547c4c7f25d61a40cd997af1f0cf"
|
QT_HASH="a628186814b73e93594ee8e72f975116599f946919ae6bd86611981b739acff0"
|
||||||
QT_FILENAME="qt-everywhere-src-$QT_VERSION.tar.xz"
|
QT_FILENAME="qt-everywhere-src-$QT_VERSION.tar.xz"
|
||||||
if [ ! -f "$QT_PREFIX_DIR/done" ]
|
if [ ! -f "$QT_PREFIX_DIR/done" ]
|
||||||
then
|
then
|
||||||
|
@ -434,8 +434,8 @@ fi
|
||||||
# FFmpeg
|
# FFmpeg
|
||||||
|
|
||||||
FFMPEG_PREFIX_DIR="$DEP_DIR/libffmpeg"
|
FFMPEG_PREFIX_DIR="$DEP_DIR/libffmpeg"
|
||||||
FFMPEG_VERSION=4.2.3
|
FFMPEG_VERSION=4.3.1
|
||||||
FFMPEG_HASH="9df6c90aed1337634c1fb026fb01c154c29c82a64ea71291ff2da9aacb9aad31"
|
FFMPEG_HASH="ad009240d46e307b4e03a213a0f49c11b650e445b1f8be0dda2a9212b34d2ffb"
|
||||||
FFMPEG_FILENAME="ffmpeg-$FFMPEG_VERSION.tar.xz"
|
FFMPEG_FILENAME="ffmpeg-$FFMPEG_VERSION.tar.xz"
|
||||||
if [ ! -f "$FFMPEG_PREFIX_DIR/done" ]
|
if [ ! -f "$FFMPEG_PREFIX_DIR/done" ]
|
||||||
then
|
then
|
||||||
|
@ -599,8 +599,8 @@ fi
|
||||||
# QREncode
|
# QREncode
|
||||||
|
|
||||||
QRENCODE_PREFIX_DIR="$DEP_DIR/libqrencode"
|
QRENCODE_PREFIX_DIR="$DEP_DIR/libqrencode"
|
||||||
QRENCODE_VERSION=4.0.2
|
QRENCODE_VERSION=4.1.1
|
||||||
QRENCODE_HASH="c9cb278d3b28dcc36b8d09e8cad51c0eca754eb004cb0247d4703cb4472b58b4"
|
QRENCODE_HASH="e455d9732f8041cf5b9c388e345a641fd15707860f928e94507b1961256a6923"
|
||||||
QRENCODE_FILENAME="qrencode-$QRENCODE_VERSION.tar.bz2"
|
QRENCODE_FILENAME="qrencode-$QRENCODE_VERSION.tar.bz2"
|
||||||
if [ ! -f "$QRENCODE_PREFIX_DIR/done" ]
|
if [ ! -f "$QRENCODE_PREFIX_DIR/done" ]
|
||||||
then
|
then
|
||||||
|
@ -664,6 +664,7 @@ else
|
||||||
echo "Using cached build of Exif `cat $EXIF_PREFIX_DIR/done`"
|
echo "Using cached build of Exif `cat $EXIF_PREFIX_DIR/done`"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Snorenotify
|
# Snorenotify
|
||||||
|
|
||||||
SNORE_PREFIX_DIR="$DEP_DIR/snorenotify"
|
SNORE_PREFIX_DIR="$DEP_DIR/snorenotify"
|
||||||
|
@ -680,45 +681,46 @@ then
|
||||||
bsdtar --no-same-owner --no-same-permissions -xf $SNORE_FILENAME
|
bsdtar --no-same-owner --no-same-permissions -xf $SNORE_FILENAME
|
||||||
rm $SNORE_FILENAME
|
rm $SNORE_FILENAME
|
||||||
cd snorenotify*
|
cd snorenotify*
|
||||||
|
|
||||||
mkdir _build && cd _build
|
mkdir _build && cd _build
|
||||||
|
|
||||||
PKG_CONFIG_PATH=""
|
export PKG_CONFIG_PATH="$QT_PREFIX_DIR/lib/pkgconfig"
|
||||||
PKG_CONFIG_LIBDIR=""
|
export PKG_CONFIG_LIBDIR="/usr/$ARCH-w64-mingw32"
|
||||||
CMAKE_FIND_ROOT_PATH=""
|
|
||||||
for PREFIX_DIR in $DEP_DIR/*; do
|
|
||||||
if [ -d $PREFIX_DIR/lib/pkgconfig ]
|
|
||||||
then
|
|
||||||
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$PREFIX_DIR/lib/pkgconfig"
|
|
||||||
export PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR:$PREFIX_DIR/lib/pkgconfig"
|
|
||||||
fi
|
|
||||||
CMAKE_FIND_ROOT_PATH="$CMAKE_FIND_ROOT_PATH $PREFIX_DIR"
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
SET(CMAKE_SYSTEM_NAME Windows)
|
SET(CMAKE_SYSTEM_NAME Windows)
|
||||||
SET(CMAKE_C_COMPILER $ARCH-w64-mingw32-gcc)
|
|
||||||
SET(CMAKE_CXX_COMPILER $ARCH-w64-mingw32-g++)
|
|
||||||
SET(CMAKE_RC_COMPILER $ARCH-w64-mingw32-windres)
|
|
||||||
SET(CMAKE_FIND_ROOT_PATH /usr/$ARCH-w64-mingw32 $CMAKE_FIND_ROOT_PATH)
|
|
||||||
" > toolchain.cmake
|
|
||||||
|
|
||||||
cmake -DCMAKE_TOOLCHAIN_FILE=./toolchain.cmake \
|
SET(CMAKE_C_COMPILER $ARCH-w64-mingw32-gcc)
|
||||||
|
SET(CMAKE_CXX_COMPILER $ARCH-w64-mingw32-g++)
|
||||||
|
SET(CMAKE_RC_COMPILER $ARCH-w64-mingw32-windres)
|
||||||
|
|
||||||
|
SET(CMAKE_FIND_ROOT_PATH /usr/$ARCH-w64-mingw32 $QT_PREFIX_DIR)
|
||||||
|
" > toolchain.cmake
|
||||||
|
|
||||||
|
cmake -DCMAKE_INSTALL_PREFIX="$SNORE_PREFIX_DIR" \
|
||||||
-DCMAKE_BUILD_TYPE=Relase \
|
-DCMAKE_BUILD_TYPE=Relase \
|
||||||
-DCMAKE_INSTALL_PREFIX="$SNORE_PREFIX_DIR" \
|
|
||||||
-DBUILD_daemon=OFF \
|
-DBUILD_daemon=OFF \
|
||||||
-DBUILD_settings=OFF \
|
-DBUILD_settings=OFF \
|
||||||
-DBUILD_snoresend=OFF \
|
-DBUILD_snoresend=OFF \
|
||||||
|
-DCMAKE_TOOLCHAIN_FILE=./toolchain.cmake \
|
||||||
..
|
..
|
||||||
|
|
||||||
make
|
make
|
||||||
make install
|
make install
|
||||||
cd ..
|
|
||||||
echo -n $SNORE_VERSION > $SNORE_PREFIX_DIR/done
|
echo -n $SNORE_VERSION > $SNORE_PREFIX_DIR/done
|
||||||
|
|
||||||
|
unset PKG_CONFIG_PATH
|
||||||
|
unset PKG_CONFIG_LIBDIR
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
rm -rf ./snorenotify*
|
rm -rf ./snorenotify*
|
||||||
else
|
else
|
||||||
echo "Using cached build of snorenotify `cat $SNORE_PREFIX_DIR/done`"
|
echo "Using cached build of snorenotify `cat $SNORE_PREFIX_DIR/done`"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Opus
|
# Opus
|
||||||
|
|
||||||
OPUS_PREFIX_DIR="$DEP_DIR/libopus"
|
OPUS_PREFIX_DIR="$DEP_DIR/libopus"
|
||||||
|
@ -789,8 +791,8 @@ fi
|
||||||
# VPX
|
# VPX
|
||||||
|
|
||||||
VPX_PREFIX_DIR="$DEP_DIR/libvpx"
|
VPX_PREFIX_DIR="$DEP_DIR/libvpx"
|
||||||
VPX_VERSION=v1.8.2
|
VPX_VERSION=v1.9.0
|
||||||
VPX_HASH="8735d9fcd1a781ae6917f28f239a8aa358ce4864ba113ea18af4bb2dc8b474ac"
|
VPX_HASH="d279c10e4b9316bf11a570ba16c3d55791e1ad6faa4404c67422eb631782c80a"
|
||||||
VPX_FILENAME="libvpx-$VPX_VERSION.tar.gz"
|
VPX_FILENAME="libvpx-$VPX_VERSION.tar.gz"
|
||||||
if [ ! -f "$VPX_PREFIX_DIR/done" ]
|
if [ ! -f "$VPX_PREFIX_DIR/done" ]
|
||||||
then
|
then
|
||||||
|
@ -1064,8 +1066,8 @@ set -u
|
||||||
# Expat
|
# Expat
|
||||||
|
|
||||||
EXPAT_PREFIX_DIR="$DEP_DIR/libexpat"
|
EXPAT_PREFIX_DIR="$DEP_DIR/libexpat"
|
||||||
EXPAT_VERSION="2.2.9"
|
EXPAT_VERSION="2.2.10"
|
||||||
EXPAT_HASH="1ea6965b15c2106b6bbe883397271c80dfa0331cdf821b2c319591b55eadc0a4"
|
EXPAT_HASH="5dfe538f8b5b63f03e98edac520d7d9a6a4d22e482e5c96d4d06fcc5485c25f2"
|
||||||
EXPAT_FILENAME="expat-$EXPAT_VERSION.tar.xz"
|
EXPAT_FILENAME="expat-$EXPAT_VERSION.tar.xz"
|
||||||
if [ ! -f "$EXPAT_PREFIX_DIR/done" ]
|
if [ ! -f "$EXPAT_PREFIX_DIR/done" ]
|
||||||
then
|
then
|
||||||
|
@ -1285,6 +1287,7 @@ cp -r $QT_PREFIX_DIR/plugins/imageformats \
|
||||||
$QT_PREFIX_DIR/plugins/iconengines \
|
$QT_PREFIX_DIR/plugins/iconengines \
|
||||||
$QTOX_PREFIX_DIR
|
$QTOX_PREFIX_DIR
|
||||||
cp {$OPENSSL_PREFIX_DIR,$SQLCIPHER_PREFIX_DIR,$FFMPEG_PREFIX_DIR,$OPENAL_PREFIX_DIR,$QRENCODE_PREFIX_DIR,$EXIF_PREFIX_DIR,$OPUS_PREFIX_DIR,$SODIUM_PREFIX_DIR,$VPX_PREFIX_DIR,$TOXCORE_PREFIX_DIR}/bin/*.dll $QTOX_PREFIX_DIR
|
cp {$OPENSSL_PREFIX_DIR,$SQLCIPHER_PREFIX_DIR,$FFMPEG_PREFIX_DIR,$OPENAL_PREFIX_DIR,$QRENCODE_PREFIX_DIR,$EXIF_PREFIX_DIR,$OPUS_PREFIX_DIR,$SODIUM_PREFIX_DIR,$VPX_PREFIX_DIR,$TOXCORE_PREFIX_DIR}/bin/*.dll $QTOX_PREFIX_DIR
|
||||||
|
|
||||||
cp "$SNORE_PREFIX_DIR/bin/libsnore-qt5.dll" $QTOX_PREFIX_DIR
|
cp "$SNORE_PREFIX_DIR/bin/libsnore-qt5.dll" $QTOX_PREFIX_DIR
|
||||||
mkdir -p "$QTOX_PREFIX_DIR/libsnore-qt5"
|
mkdir -p "$QTOX_PREFIX_DIR/libsnore-qt5"
|
||||||
cp "$SNORE_PREFIX_DIR/lib/plugins/libsnore-qt5/libsnore_backend_windowstoast.dll" "$QTOX_PREFIX_DIR/libsnore-qt5"
|
cp "$SNORE_PREFIX_DIR/lib/plugins/libsnore-qt5/libsnore_backend_windowstoast.dll" "$QTOX_PREFIX_DIR/libsnore-qt5"
|
||||||
|
@ -1304,7 +1307,7 @@ then
|
||||||
fi
|
fi
|
||||||
winecfg
|
winecfg
|
||||||
|
|
||||||
# dll checks
|
# qtox.exe dll checks (32-bit on i686, 64-bit on x86_64)
|
||||||
python3 $MINGW_LDD_PREFIX_DIR/bin/mingw-ldd.py $QTOX_PREFIX_DIR/qtox.exe --dll-lookup-dirs $QTOX_PREFIX_DIR ~/.wine/drive_c/windows/system32 > /tmp/$ARCH-qtox-ldd
|
python3 $MINGW_LDD_PREFIX_DIR/bin/mingw-ldd.py $QTOX_PREFIX_DIR/qtox.exe --dll-lookup-dirs $QTOX_PREFIX_DIR ~/.wine/drive_c/windows/system32 > /tmp/$ARCH-qtox-ldd
|
||||||
find "$QTOX_PREFIX_DIR" -name '*.dll' > /tmp/$ARCH-qtox-dll-find
|
find "$QTOX_PREFIX_DIR" -name '*.dll' > /tmp/$ARCH-qtox-dll-find
|
||||||
# dlls loded at run time that don't showup as a link time dependency
|
# dlls loded at run time that don't showup as a link time dependency
|
||||||
|
@ -1346,6 +1349,26 @@ do
|
||||||
done < /tmp/$ARCH-qtox-dll-find
|
done < /tmp/$ARCH-qtox-dll-find
|
||||||
|
|
||||||
|
|
||||||
|
# SnoreToast.exe dll checks (always 32-bit)
|
||||||
|
if [[ "$ARCH" == "i686" ]]
|
||||||
|
then
|
||||||
|
SNORETOAST_WINE_DLLS=/root/.wine/drive_c/windows/system32
|
||||||
|
elif [[ "$ARCH" == "x86_64" ]]
|
||||||
|
then
|
||||||
|
SNORETOAST_WINE_DLLS=/root/.wine/drive_c/windows/syswow64
|
||||||
|
fi
|
||||||
|
|
||||||
|
python3 $MINGW_LDD_PREFIX_DIR/bin/mingw-ldd.py $QTOX_PREFIX_DIR/SnoreToast.exe --dll-lookup-dirs $SNORETOAST_WINE_DLLS > /tmp/$ARCH-SnoreToast-ldd
|
||||||
|
|
||||||
|
# Check that all dlls are in place
|
||||||
|
if grep 'not found' /tmp/$ARCH-SnoreToast-ldd
|
||||||
|
then
|
||||||
|
cat /tmp/$ARCH-SnoreToast-ldd
|
||||||
|
echo "Error: Missing some dlls."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Run tests (only on Travis)
|
# Run tests (only on Travis)
|
||||||
set +u
|
set +u
|
||||||
if [[ -n "$TRAVIS_CI_STAGE" ]]
|
if [[ -n "$TRAVIS_CI_STAGE" ]]
|
||||||
|
|
191
windows/qtox.nsi
191
windows/qtox.nsi
|
@ -36,72 +36,71 @@ VIAddVersionKey "FileVersion" "${VERSION}"
|
||||||
!macro AddItem Path
|
!macro AddItem Path
|
||||||
FileWrite $UninstLog "${Path}$\r$\n"
|
FileWrite $UninstLog "${Path}$\r$\n"
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
;File macro
|
;File macro
|
||||||
!macro File FileName
|
!macro File FileName
|
||||||
IfFileExists "$OUTDIR\${FileName}" +2
|
IfFileExists "$OUTDIR\${FileName}" +2
|
||||||
FileWrite $UninstLog "$OUTDIR\${FileName}$\r$\n"
|
FileWrite $UninstLog "$OUTDIR\${FileName}$\r$\n"
|
||||||
File "${FileName}"
|
File "${FileName}"
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
;CreateShortcut macro
|
;CreateShortcut macro
|
||||||
!macro CreateShortcut FilePath FilePointer Pamameters Icon IconIndex
|
!macro CreateShortcut FilePath FilePointer Pamameters Icon IconIndex
|
||||||
FileWrite $UninstLog "${FilePath}$\r$\n"
|
FileWrite $UninstLog "${FilePath}$\r$\n"
|
||||||
CreateShortcut "${FilePath}" "${FilePointer}" "${Pamameters}" "${Icon}" "${IconIndex}"
|
CreateShortcut "${FilePath}" "${FilePointer}" "${Pamameters}" "${Icon}" "${IconIndex}"
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
;Copy files macro
|
;Copy files macro
|
||||||
!macro CopyFiles SourcePath DestPath
|
!macro CopyFiles SourcePath DestPath
|
||||||
IfFileExists "${DestPath}" +2
|
IfFileExists "${DestPath}" +2
|
||||||
FileWrite $UninstLog "${DestPath}$\r$\n"
|
FileWrite $UninstLog "${DestPath}$\r$\n"
|
||||||
CopyFiles "${SourcePath}" "${DestPath}"
|
CopyFiles "${SourcePath}" "${DestPath}"
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
;Rename macro
|
;Rename macro
|
||||||
!macro Rename SourcePath DestPath
|
!macro Rename SourcePath DestPath
|
||||||
IfFileExists "${DestPath}" +2
|
IfFileExists "${DestPath}" +2
|
||||||
FileWrite $UninstLog "${DestPath}$\r$\n"
|
FileWrite $UninstLog "${DestPath}$\r$\n"
|
||||||
Rename "${SourcePath}" "${DestPath}"
|
Rename "${SourcePath}" "${DestPath}"
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
;CreateDirectory macro
|
;CreateDirectory macro
|
||||||
!macro CreateDirectory Path
|
!macro CreateDirectory Path
|
||||||
CreateDirectory "${Path}"
|
CreateDirectory "${Path}"
|
||||||
FileWrite $UninstLog "${Path}$\r$\n"
|
FileWrite $UninstLog "${Path}$\r$\n"
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
;SetOutPath macro
|
;SetOutPath macro
|
||||||
!macro SetOutPath Path
|
!macro SetOutPath Path
|
||||||
SetOutPath "${Path}"
|
SetOutPath "${Path}"
|
||||||
FileWrite $UninstLog "${Path}$\r$\n"
|
FileWrite $UninstLog "${Path}$\r$\n"
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
;WriteUninstaller macro
|
;WriteUninstaller macro
|
||||||
!macro WriteUninstaller Path
|
!macro WriteUninstaller Path
|
||||||
WriteUninstaller "${Path}"
|
WriteUninstaller "${Path}"
|
||||||
FileWrite $UninstLog "${Path}$\r$\n"
|
FileWrite $UninstLog "${Path}$\r$\n"
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
;WriteIniStr macro
|
;WriteIniStr macro
|
||||||
!macro WriteIniStr IniFile SectionName EntryName NewValue
|
!macro WriteIniStr IniFile SectionName EntryName NewValue
|
||||||
IfFileExists "${IniFile}" +2
|
IfFileExists "${IniFile}" +2
|
||||||
FileWrite $UninstLog "${IniFile}$\r$\n"
|
FileWrite $UninstLog "${IniFile}$\r$\n"
|
||||||
WriteIniStr "${IniFile}" "${SectionName}" "${EntryName}" "${NewValue}"
|
WriteIniStr "${IniFile}" "${SectionName}" "${EntryName}" "${NewValue}"
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
;WriteRegStr macro
|
;WriteRegStr macro
|
||||||
!macro WriteRegStr RegRoot UnInstallPath Key Value
|
!macro WriteRegStr RegRoot UnInstallPath Key Value
|
||||||
FileWrite $UninstLog "${RegRoot} ${UnInstallPath}$\r$\n"
|
FileWrite $UninstLog "${RegRoot} ${UnInstallPath}$\r$\n"
|
||||||
WriteRegStr "${RegRoot}" "${UnInstallPath}" "${Key}" "${Value}"
|
WriteRegStr "${RegRoot}" "${UnInstallPath}" "${Key}" "${Value}"
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
|
|
||||||
;WriteRegDWORD macro
|
;WriteRegDWORD macro
|
||||||
!macro WriteRegDWORD RegRoot UnInstallPath Key Value
|
!macro WriteRegDWORD RegRoot UnInstallPath Key Value
|
||||||
FileWrite $UninstLog "${RegRoot} ${UnInstallPath}$\r$\n"
|
FileWrite $UninstLog "${RegRoot} ${UnInstallPath}$\r$\n"
|
||||||
WriteRegDWORD "${RegRoot}" "${UnInstallPath}" "${Key}" "${Value}"
|
WriteRegDWORD "${RegRoot}" "${UnInstallPath}" "${Key}" "${Value}"
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
;BackupFile macro
|
;BackupFile macro
|
||||||
!macro BackupFile FILE_DIR FILE BACKUP_TO
|
!macro BackupFile FILE_DIR FILE BACKUP_TO
|
||||||
IfFileExists "${BACKUP_TO}\*.*" +2
|
IfFileExists "${BACKUP_TO}\*.*" +2
|
||||||
|
@ -109,13 +108,13 @@ VIAddVersionKey "FileVersion" "${VERSION}"
|
||||||
IfFileExists "${FILE_DIR}\${FILE}" 0 +2
|
IfFileExists "${FILE_DIR}\${FILE}" 0 +2
|
||||||
Rename "${FILE_DIR}\${FILE}" "${BACKUP_TO}\${FILE}"
|
Rename "${FILE_DIR}\${FILE}" "${BACKUP_TO}\${FILE}"
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
;RestoreFile macro
|
;RestoreFile macro
|
||||||
!macro RestoreFile BUP_DIR FILE RESTORE_TO
|
!macro RestoreFile BUP_DIR FILE RESTORE_TO
|
||||||
IfFileExists "${BUP_DIR}\${FILE}" 0 +2
|
IfFileExists "${BUP_DIR}\${FILE}" 0 +2
|
||||||
Rename "${BUP_DIR}\${FILE}" "${RESTORE_TO}\${FILE}"
|
Rename "${BUP_DIR}\${FILE}" "${RESTORE_TO}\${FILE}"
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
;BackupFiles macro
|
;BackupFiles macro
|
||||||
!macro BackupFiles FILE_DIR FILE BACKUP_TO
|
!macro BackupFiles FILE_DIR FILE BACKUP_TO
|
||||||
IfFileExists "${BACKUP_TO}\*.*" +2
|
IfFileExists "${BACKUP_TO}\*.*" +2
|
||||||
|
@ -128,7 +127,7 @@ VIAddVersionKey "FileVersion" "${VERSION}"
|
||||||
SetOutPath "${FILE_DIR}"
|
SetOutPath "${FILE_DIR}"
|
||||||
File "${FILE}" #After the Original file is backed up write the new file.
|
File "${FILE}" #After the Original file is backed up write the new file.
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
;RestoreFiles macro
|
;RestoreFiles macro
|
||||||
!macro RestoreFiles BUP_FILE RESTORE_FILE
|
!macro RestoreFiles BUP_FILE RESTORE_FILE
|
||||||
IfFileExists "${BUP_FILE}" 0 +2
|
IfFileExists "${BUP_FILE}" 0 +2
|
||||||
|
@ -141,52 +140,52 @@ VIAddVersionKey "FileVersion" "${VERSION}"
|
||||||
;Set the name of the uninstall log
|
;Set the name of the uninstall log
|
||||||
!define UninstLog "uninstall.log"
|
!define UninstLog "uninstall.log"
|
||||||
Var UninstLog
|
Var UninstLog
|
||||||
|
|
||||||
;Uninstall log file missing.
|
;Uninstall log file missing.
|
||||||
LangString UninstLogMissing ${LANG_ENGLISH} "${UninstLog} not found!$\r$\nUninstallation cannot proceed!"
|
LangString UninstLogMissing ${LANG_ENGLISH} "${UninstLog} not found!$\r$\nUninstallation cannot proceed!"
|
||||||
|
|
||||||
;AddItem macro
|
;AddItem macro
|
||||||
!define AddItem "!insertmacro AddItem"
|
!define AddItem "!insertmacro AddItem"
|
||||||
|
|
||||||
;BackupFile macro
|
;BackupFile macro
|
||||||
!define BackupFile "!insertmacro BackupFile"
|
!define BackupFile "!insertmacro BackupFile"
|
||||||
|
|
||||||
;BackupFiles macro
|
;BackupFiles macro
|
||||||
!define BackupFiles "!insertmacro BackupFiles"
|
!define BackupFiles "!insertmacro BackupFiles"
|
||||||
|
|
||||||
;Copy files macro
|
;Copy files macro
|
||||||
!define CopyFiles "!insertmacro CopyFiles"
|
!define CopyFiles "!insertmacro CopyFiles"
|
||||||
|
|
||||||
;CreateDirectory macro
|
;CreateDirectory macro
|
||||||
!define CreateDirectory "!insertmacro CreateDirectory"
|
!define CreateDirectory "!insertmacro CreateDirectory"
|
||||||
|
|
||||||
;CreateShortcut macro
|
;CreateShortcut macro
|
||||||
!define CreateShortcut "!insertmacro CreateShortcut"
|
!define CreateShortcut "!insertmacro CreateShortcut"
|
||||||
|
|
||||||
;File macro
|
;File macro
|
||||||
!define File "!insertmacro File"
|
!define File "!insertmacro File"
|
||||||
|
|
||||||
;Rename macro
|
;Rename macro
|
||||||
!define Rename "!insertmacro Rename"
|
!define Rename "!insertmacro Rename"
|
||||||
|
|
||||||
;RestoreFile macro
|
;RestoreFile macro
|
||||||
!define RestoreFile "!insertmacro RestoreFile"
|
!define RestoreFile "!insertmacro RestoreFile"
|
||||||
|
|
||||||
;RestoreFiles macro
|
;RestoreFiles macro
|
||||||
!define RestoreFiles "!insertmacro RestoreFiles"
|
!define RestoreFiles "!insertmacro RestoreFiles"
|
||||||
|
|
||||||
;SetOutPath macro
|
;SetOutPath macro
|
||||||
!define SetOutPath "!insertmacro SetOutPath"
|
!define SetOutPath "!insertmacro SetOutPath"
|
||||||
|
|
||||||
;WriteRegDWORD macro
|
;WriteRegDWORD macro
|
||||||
!define WriteRegDWORD "!insertmacro WriteRegDWORD"
|
!define WriteRegDWORD "!insertmacro WriteRegDWORD"
|
||||||
|
|
||||||
;WriteRegStr macro
|
;WriteRegStr macro
|
||||||
!define WriteRegStr "!insertmacro WriteRegStr"
|
!define WriteRegStr "!insertmacro WriteRegStr"
|
||||||
|
|
||||||
;WriteUninstaller macro
|
;WriteUninstaller macro
|
||||||
!define WriteUninstaller "!insertmacro WriteUninstaller"
|
!define WriteUninstaller "!insertmacro WriteUninstaller"
|
||||||
|
|
||||||
Section -openlogfile
|
Section -openlogfile
|
||||||
CreateDirectory "$INSTDIR"
|
CreateDirectory "$INSTDIR"
|
||||||
IfFileExists "$INSTDIR\${UninstLog}" +3
|
IfFileExists "$INSTDIR\${UninstLog}" +3
|
||||||
|
@ -207,12 +206,12 @@ VIAddVersionKey "FileVersion" "${VERSION}"
|
||||||
!insertmacro MUI_PAGE_WELCOME
|
!insertmacro MUI_PAGE_WELCOME
|
||||||
!insertmacro MUI_PAGE_DIRECTORY
|
!insertmacro MUI_PAGE_DIRECTORY
|
||||||
!ifdef REG_START_MENU
|
!ifdef REG_START_MENU
|
||||||
!define MUI_STARTMENUPAGE_NODISABLE
|
!define MUI_STARTMENUPAGE_NODISABLE
|
||||||
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "qTox"
|
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "qTox"
|
||||||
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "${REG_ROOT}"
|
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "${REG_ROOT}"
|
||||||
!define MUI_STARTMENUPAGE_REGISTRY_KEY "${UNINSTALL_PATH}"
|
!define MUI_STARTMENUPAGE_REGISTRY_KEY "${UNINSTALL_PATH}"
|
||||||
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${REG_START_MENU}"
|
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${REG_START_MENU}"
|
||||||
!insertmacro MUI_PAGE_STARTMENU Application $SM_Folder
|
!insertmacro MUI_PAGE_STARTMENU Application $SM_Folder
|
||||||
!endif
|
!endif
|
||||||
!insertmacro MUI_PAGE_INSTFILES
|
!insertmacro MUI_PAGE_INSTFILES
|
||||||
|
|
||||||
|
@ -243,55 +242,65 @@ FunctionEnd
|
||||||
!insertmacro MUI_UNPAGE_FINISH
|
!insertmacro MUI_UNPAGE_FINISH
|
||||||
|
|
||||||
!insertmacro MUI_LANGUAGE "English"
|
!insertmacro MUI_LANGUAGE "English"
|
||||||
|
|
||||||
#################
|
#################
|
||||||
#INSTALL
|
#INSTALL
|
||||||
#################
|
#################
|
||||||
Section "Install"
|
Section "Install"
|
||||||
SetShellVarContext all
|
SetShellVarContext all
|
||||||
# Install files
|
# Install files
|
||||||
${SetOutPath} "$INSTDIR"
|
${SetOutPath} "$INSTDIR"
|
||||||
${WriteUninstaller} "uninstall.exe"
|
${WriteUninstaller} "uninstall.exe"
|
||||||
|
|
||||||
${CreateDirectory} "$INSTDIR\bin"
|
|
||||||
${SetOutPath} "$INSTDIR\bin"
|
|
||||||
${File} "qtox\*.*"
|
|
||||||
|
|
||||||
${CreateDirectory} "$INSTDIR\bin\imageformats"
|
|
||||||
${SetOutPath} "$INSTDIR\bin\imageformats"
|
|
||||||
File /nonfatal "qtox\imageformats\*.*"
|
|
||||||
${SetOutPath} "$INSTDIR\bin"
|
|
||||||
|
|
||||||
${CreateDirectory} "$INSTDIR\bin\platforms"
|
|
||||||
${SetOutPath} "$INSTDIR\bin\platforms"
|
|
||||||
File /nonfatal "qtox\platforms\*.*"
|
|
||||||
${SetOutPath} "$INSTDIR\bin"
|
|
||||||
|
|
||||||
# Create shortcuts
|
${CreateDirectory} "$INSTDIR\bin"
|
||||||
${CreateDirectory} "$SMPROGRAMS\qTox"
|
${SetOutPath} "$INSTDIR\bin"
|
||||||
${CreateShortCut} "$SMPROGRAMS\qTox\qTox.lnk" "$INSTDIR\${MAIN_APP_EXE}" "" "" ""
|
${File} "qtox\*.*"
|
||||||
${CreateShortCut} "$SMPROGRAMS\qTox\Uninstall qTox.lnk" "$INSTDIR\uninstall.exe" "" "" ""
|
|
||||||
|
|
||||||
# Write setup/app info into the registry
|
${CreateDirectory} "$INSTDIR\bin\imageformats"
|
||||||
${WriteRegStr} "${REG_ROOT}" "${REG_APP_PATH}" "" "$INSTDIR\${MAIN_APP_EXE}"
|
${SetOutPath} "$INSTDIR\bin\imageformats"
|
||||||
${WriteRegStr} "${REG_ROOT}" "${REG_APP_PATH}" "Path" "$INSTDIR\bin\"
|
File /nonfatal "qtox\imageformats\*.*"
|
||||||
${WriteRegStr} ${REG_ROOT} "${UNINSTALL_PATH}" "DisplayName" "qTox"
|
${SetOutPath} "$INSTDIR\bin"
|
||||||
${WriteRegStr} ${REG_ROOT} "${UNINSTALL_PATH}" "DisplayVersion" "1.17.2"
|
|
||||||
${WriteRegStr} ${REG_ROOT} "${UNINSTALL_PATH}" "Publisher" "The qTox Project"
|
|
||||||
${WriteRegStr} ${REG_ROOT} "${UNINSTALL_PATH}" "UninstallString" "$INSTDIR\uninstall.exe"
|
|
||||||
${WriteRegStr} ${REG_ROOT} "${UNINSTALL_PATH}" "URLInfoAbout" "https://qtox.github.io"
|
|
||||||
|
|
||||||
# Register the tox: protocol
|
${CreateDirectory} "$INSTDIR\bin\iconengines"
|
||||||
${WriteRegStr} HKCR "tox" "" "URL:tox Protocol"
|
${SetOutPath} "$INSTDIR\bin\iconengines"
|
||||||
${WriteRegStr} HKCR "tox" "URL Protocol" ""
|
File /nonfatal "qtox\iconengines\*.*"
|
||||||
${WriteRegStr} HKCR "tox\shell\open\command" "" "$INSTDIR\${MAIN_APP_EXE} %1"
|
${SetOutPath} "$INSTDIR\bin"
|
||||||
|
|
||||||
# Register the .tox file associations
|
${CreateDirectory} "$INSTDIR\bin\platforms"
|
||||||
${WriteRegStr} "HKCR" "Applications\qtox.exe\SupportedTypes" ".tox" ""
|
${SetOutPath} "$INSTDIR\bin\platforms"
|
||||||
${WriteRegStr} HKCR ".tox" "" "toxsave"
|
File /nonfatal "qtox\platforms\*.*"
|
||||||
${WriteRegStr} HKCR "toxsave" "" "Tox save file"
|
${SetOutPath} "$INSTDIR\bin"
|
||||||
${WriteRegStr} HKCR "toxsave\DefaultIcon" "" "$INSTDIR\${MAIN_APP_EXE}"
|
|
||||||
${WriteRegStr} HKCR "toxsave\shell\open\command" "" "$INSTDIR\${MAIN_APP_EXE} %1"
|
${CreateDirectory} "$INSTDIR\bin\libsnore-qt5"
|
||||||
|
${SetOutPath} "$INSTDIR\bin\libsnore-qt5"
|
||||||
|
File /nonfatal "qtox\libsnore-qt5\*.*"
|
||||||
|
${SetOutPath} "$INSTDIR\bin"
|
||||||
|
|
||||||
|
# Create shortcuts
|
||||||
|
${CreateDirectory} "$SMPROGRAMS\qTox"
|
||||||
|
${CreateShortCut} "$SMPROGRAMS\qTox\qTox.lnk" "$INSTDIR\${MAIN_APP_EXE}" "" "" ""
|
||||||
|
${CreateShortCut} "$SMPROGRAMS\qTox\Uninstall qTox.lnk" "$INSTDIR\uninstall.exe" "" "" ""
|
||||||
|
|
||||||
|
# Write setup/app info into the registry
|
||||||
|
${WriteRegStr} "${REG_ROOT}" "${REG_APP_PATH}" "" "$INSTDIR\${MAIN_APP_EXE}"
|
||||||
|
${WriteRegStr} "${REG_ROOT}" "${REG_APP_PATH}" "Path" "$INSTDIR\bin\"
|
||||||
|
${WriteRegStr} ${REG_ROOT} "${UNINSTALL_PATH}" "DisplayName" "qTox"
|
||||||
|
${WriteRegStr} ${REG_ROOT} "${UNINSTALL_PATH}" "DisplayVersion" "1.17.2"
|
||||||
|
${WriteRegStr} ${REG_ROOT} "${UNINSTALL_PATH}" "Publisher" "The qTox Project"
|
||||||
|
${WriteRegStr} ${REG_ROOT} "${UNINSTALL_PATH}" "UninstallString" "$INSTDIR\uninstall.exe"
|
||||||
|
${WriteRegStr} ${REG_ROOT} "${UNINSTALL_PATH}" "URLInfoAbout" "https://qtox.github.io"
|
||||||
|
|
||||||
|
# Register the tox: protocol
|
||||||
|
${WriteRegStr} HKCR "tox" "" "URL:tox Protocol"
|
||||||
|
${WriteRegStr} HKCR "tox" "URL Protocol" ""
|
||||||
|
${WriteRegStr} HKCR "tox\shell\open\command" "" "$INSTDIR\${MAIN_APP_EXE} %1"
|
||||||
|
|
||||||
|
# Register the .tox file associations
|
||||||
|
${WriteRegStr} "HKCR" "Applications\qtox.exe\SupportedTypes" ".tox" ""
|
||||||
|
${WriteRegStr} HKCR ".tox" "" "toxsave"
|
||||||
|
${WriteRegStr} HKCR "toxsave" "" "Tox save file"
|
||||||
|
${WriteRegStr} HKCR "toxsave\DefaultIcon" "" "$INSTDIR\${MAIN_APP_EXE}"
|
||||||
|
${WriteRegStr} HKCR "toxsave\shell\open\command" "" "$INSTDIR\${MAIN_APP_EXE} %1"
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
|
|
||||||
|
@ -303,28 +312,28 @@ Section Uninstall
|
||||||
;If there's no uninstall log, we'll try anyway to clean what we can
|
;If there's no uninstall log, we'll try anyway to clean what we can
|
||||||
IfFileExists "$INSTDIR\${UninstLog}" +3
|
IfFileExists "$INSTDIR\${UninstLog}" +3
|
||||||
Goto noLog
|
Goto noLog
|
||||||
|
|
||||||
Push $R0
|
Push $R0
|
||||||
Push $R1
|
Push $R1
|
||||||
Push $R2
|
Push $R2
|
||||||
SetFileAttributes "$INSTDIR\${UninstLog}" NORMAL
|
SetFileAttributes "$INSTDIR\${UninstLog}" NORMAL
|
||||||
FileOpen $UninstLog "$INSTDIR\${UninstLog}" r
|
FileOpen $UninstLog "$INSTDIR\${UninstLog}" r
|
||||||
StrCpy $R1 -1
|
StrCpy $R1 -1
|
||||||
|
|
||||||
GetLineCount:
|
GetLineCount:
|
||||||
ClearErrors
|
ClearErrors
|
||||||
FileRead $UninstLog $R0
|
FileRead $UninstLog $R0
|
||||||
IntOp $R1 $R1 + 1
|
IntOp $R1 $R1 + 1
|
||||||
StrCpy $R0 $R0 -2
|
StrCpy $R0 $R0 -2
|
||||||
Push $R0
|
Push $R0
|
||||||
IfErrors 0 GetLineCount
|
IfErrors 0 GetLineCount
|
||||||
|
|
||||||
Pop $R0
|
Pop $R0
|
||||||
|
|
||||||
LoopRead:
|
LoopRead:
|
||||||
StrCmp $R1 0 LoopDone
|
StrCmp $R1 0 LoopDone
|
||||||
Pop $R0
|
Pop $R0
|
||||||
|
|
||||||
IfFileExists "$R0\*.*" 0 +3
|
IfFileExists "$R0\*.*" 0 +3
|
||||||
RMDir $R0 #is dir
|
RMDir $R0 #is dir
|
||||||
Goto +9
|
Goto +9
|
||||||
|
@ -336,7 +345,7 @@ Section Uninstall
|
||||||
Goto +3
|
Goto +3
|
||||||
StrCmp $R0 "${REG_ROOT} ${UNINSTALL_PATH}" 0 +2
|
StrCmp $R0 "${REG_ROOT} ${UNINSTALL_PATH}" 0 +2
|
||||||
DeleteRegKey ${REG_ROOT} "${UNINSTALL_PATH}" #is Reg Element
|
DeleteRegKey ${REG_ROOT} "${UNINSTALL_PATH}" #is Reg Element
|
||||||
|
|
||||||
IntOp $R1 $R1 - 1
|
IntOp $R1 $R1 - 1
|
||||||
Goto LoopRead
|
Goto LoopRead
|
||||||
LoopDone:
|
LoopDone:
|
||||||
|
@ -349,10 +358,10 @@ Section Uninstall
|
||||||
Pop $R2
|
Pop $R2
|
||||||
Pop $R1
|
Pop $R1
|
||||||
Pop $R0
|
Pop $R0
|
||||||
|
|
||||||
;Remove start menu entries
|
;Remove start menu entries
|
||||||
RMDir /r /REBOOTOK "$SMPROGRAMS\qTox"
|
RMDir /r /REBOOTOK "$SMPROGRAMS\qTox"
|
||||||
|
|
||||||
;Remove registry keys
|
;Remove registry keys
|
||||||
DeleteRegKey ${REG_ROOT} "${REG_APP_PATH}"
|
DeleteRegKey ${REG_ROOT} "${REG_APP_PATH}"
|
||||||
DeleteRegKey ${REG_ROOT} "${UNINSTALL_PATH}"
|
DeleteRegKey ${REG_ROOT} "${UNINSTALL_PATH}"
|
||||||
|
|
|
@ -95,7 +95,6 @@ VIAddVersionKey "FileVersion" "${VERSION}"
|
||||||
WriteRegStr "${RegRoot}" "${UnInstallPath}" "${Key}" "${Value}"
|
WriteRegStr "${RegRoot}" "${UnInstallPath}" "${Key}" "${Value}"
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
|
|
||||||
;WriteRegDWORD macro
|
;WriteRegDWORD macro
|
||||||
!macro WriteRegDWORD RegRoot UnInstallPath Key Value
|
!macro WriteRegDWORD RegRoot UnInstallPath Key Value
|
||||||
FileWrite $UninstLog "${RegRoot} ${UnInstallPath}$\r$\n"
|
FileWrite $UninstLog "${RegRoot} ${UnInstallPath}$\r$\n"
|
||||||
|
@ -207,12 +206,12 @@ VIAddVersionKey "FileVersion" "${VERSION}"
|
||||||
!insertmacro MUI_PAGE_WELCOME
|
!insertmacro MUI_PAGE_WELCOME
|
||||||
!insertmacro MUI_PAGE_DIRECTORY
|
!insertmacro MUI_PAGE_DIRECTORY
|
||||||
!ifdef REG_START_MENU
|
!ifdef REG_START_MENU
|
||||||
!define MUI_STARTMENUPAGE_NODISABLE
|
!define MUI_STARTMENUPAGE_NODISABLE
|
||||||
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "qTox"
|
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "qTox"
|
||||||
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "${REG_ROOT}"
|
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "${REG_ROOT}"
|
||||||
!define MUI_STARTMENUPAGE_REGISTRY_KEY "${UNINSTALL_PATH}"
|
!define MUI_STARTMENUPAGE_REGISTRY_KEY "${UNINSTALL_PATH}"
|
||||||
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${REG_START_MENU}"
|
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${REG_START_MENU}"
|
||||||
!insertmacro MUI_PAGE_STARTMENU Application $SM_Folder
|
!insertmacro MUI_PAGE_STARTMENU Application $SM_Folder
|
||||||
!endif
|
!endif
|
||||||
!insertmacro MUI_PAGE_INSTFILES
|
!insertmacro MUI_PAGE_INSTFILES
|
||||||
|
|
||||||
|
@ -248,51 +247,61 @@ FunctionEnd
|
||||||
#INSTALL
|
#INSTALL
|
||||||
#################
|
#################
|
||||||
Section "Install"
|
Section "Install"
|
||||||
SetShellVarContext all
|
SetShellVarContext all
|
||||||
# Install files
|
# Install files
|
||||||
${SetOutPath} "$INSTDIR"
|
${SetOutPath} "$INSTDIR"
|
||||||
${WriteUninstaller} "uninstall.exe"
|
${WriteUninstaller} "uninstall.exe"
|
||||||
|
|
||||||
${CreateDirectory} "$INSTDIR\bin"
|
${CreateDirectory} "$INSTDIR\bin"
|
||||||
${SetOutPath} "$INSTDIR\bin"
|
${SetOutPath} "$INSTDIR\bin"
|
||||||
${File} "qtox\*.*"
|
${File} "qtox\*.*"
|
||||||
|
|
||||||
${CreateDirectory} "$INSTDIR\bin\imageformats"
|
${CreateDirectory} "$INSTDIR\bin\imageformats"
|
||||||
${SetOutPath} "$INSTDIR\bin\imageformats"
|
${SetOutPath} "$INSTDIR\bin\imageformats"
|
||||||
File /nonfatal "qtox\imageformats\*.*"
|
File /nonfatal "qtox\imageformats\*.*"
|
||||||
${SetOutPath} "$INSTDIR\bin"
|
${SetOutPath} "$INSTDIR\bin"
|
||||||
|
|
||||||
${CreateDirectory} "$INSTDIR\bin\platforms"
|
${CreateDirectory} "$INSTDIR\bin\iconengines"
|
||||||
${SetOutPath} "$INSTDIR\bin\platforms"
|
${SetOutPath} "$INSTDIR\bin\iconengines"
|
||||||
File /nonfatal "qtox\platforms\*.*"
|
File /nonfatal "qtox\iconengines\*.*"
|
||||||
${SetOutPath} "$INSTDIR\bin"
|
${SetOutPath} "$INSTDIR\bin"
|
||||||
|
|
||||||
# Create shortcuts
|
${CreateDirectory} "$INSTDIR\bin\platforms"
|
||||||
${CreateDirectory} "$SMPROGRAMS\qTox"
|
${SetOutPath} "$INSTDIR\bin\platforms"
|
||||||
${CreateShortCut} "$SMPROGRAMS\qTox\qTox.lnk" "$INSTDIR\${MAIN_APP_EXE}" "" "" ""
|
File /nonfatal "qtox\platforms\*.*"
|
||||||
${CreateShortCut} "$SMPROGRAMS\qTox\Uninstall qTox.lnk" "$INSTDIR\uninstall.exe" "" "" ""
|
${SetOutPath} "$INSTDIR\bin"
|
||||||
|
|
||||||
# Write setup/app info into the registry
|
${CreateDirectory} "$INSTDIR\bin\libsnore-qt5"
|
||||||
SetRegView 64
|
${SetOutPath} "$INSTDIR\bin\libsnore-qt5"
|
||||||
${WriteRegStr} "${REG_ROOT}" "${REG_APP_PATH}" "" "$INSTDIR\${MAIN_APP_EXE}"
|
File /nonfatal "qtox\libsnore-qt5\*.*"
|
||||||
${WriteRegStr} "${REG_ROOT}" "${REG_APP_PATH}" "Path" "$INSTDIR\bin\"
|
${SetOutPath} "$INSTDIR\bin"
|
||||||
${WriteRegStr} ${REG_ROOT} "${UNINSTALL_PATH}" "DisplayName" "qTox"
|
|
||||||
${WriteRegStr} ${REG_ROOT} "${UNINSTALL_PATH}" "DisplayVersion" "1.17.2"
|
|
||||||
${WriteRegStr} ${REG_ROOT} "${UNINSTALL_PATH}" "Publisher" "The qTox Project"
|
|
||||||
${WriteRegStr} ${REG_ROOT} "${UNINSTALL_PATH}" "UninstallString" "$INSTDIR\uninstall.exe"
|
|
||||||
${WriteRegStr} ${REG_ROOT} "${UNINSTALL_PATH}" "URLInfoAbout" "https://qtox.github.io"
|
|
||||||
|
|
||||||
# Register the tox: protocol
|
# Create shortcuts
|
||||||
${WriteRegStr} HKCR "tox" "" "URL:tox Protocol"
|
${CreateDirectory} "$SMPROGRAMS\qTox"
|
||||||
${WriteRegStr} HKCR "tox" "URL Protocol" ""
|
${CreateShortCut} "$SMPROGRAMS\qTox\qTox.lnk" "$INSTDIR\${MAIN_APP_EXE}" "" "" ""
|
||||||
${WriteRegStr} HKCR "tox\shell\open\command" "" "$INSTDIR\${MAIN_APP_EXE} %1"
|
${CreateShortCut} "$SMPROGRAMS\qTox\Uninstall qTox.lnk" "$INSTDIR\uninstall.exe" "" "" ""
|
||||||
|
|
||||||
# Register the .tox file associations
|
# Write setup/app info into the registry
|
||||||
${WriteRegStr} "HKCR" "Applications\qtox.exe\SupportedTypes" ".tox" ""
|
SetRegView 64
|
||||||
${WriteRegStr} HKCR ".tox" "" "toxsave"
|
${WriteRegStr} "${REG_ROOT}" "${REG_APP_PATH}" "" "$INSTDIR\${MAIN_APP_EXE}"
|
||||||
${WriteRegStr} HKCR "toxsave" "" "Tox save file"
|
${WriteRegStr} "${REG_ROOT}" "${REG_APP_PATH}" "Path" "$INSTDIR\bin\"
|
||||||
${WriteRegStr} HKCR "toxsave\DefaultIcon" "" "$INSTDIR\${MAIN_APP_EXE}"
|
${WriteRegStr} ${REG_ROOT} "${UNINSTALL_PATH}" "DisplayName" "qTox"
|
||||||
${WriteRegStr} HKCR "toxsave\shell\open\command" "" "$INSTDIR\${MAIN_APP_EXE} %1"
|
${WriteRegStr} ${REG_ROOT} "${UNINSTALL_PATH}" "DisplayVersion" "1.17.2"
|
||||||
|
${WriteRegStr} ${REG_ROOT} "${UNINSTALL_PATH}" "Publisher" "The qTox Project"
|
||||||
|
${WriteRegStr} ${REG_ROOT} "${UNINSTALL_PATH}" "UninstallString" "$INSTDIR\uninstall.exe"
|
||||||
|
${WriteRegStr} ${REG_ROOT} "${UNINSTALL_PATH}" "URLInfoAbout" "https://qtox.github.io"
|
||||||
|
|
||||||
|
# Register the tox: protocol
|
||||||
|
${WriteRegStr} HKCR "tox" "" "URL:tox Protocol"
|
||||||
|
${WriteRegStr} HKCR "tox" "URL Protocol" ""
|
||||||
|
${WriteRegStr} HKCR "tox\shell\open\command" "" "$INSTDIR\${MAIN_APP_EXE} %1"
|
||||||
|
|
||||||
|
# Register the .tox file associations
|
||||||
|
${WriteRegStr} "HKCR" "Applications\qtox.exe\SupportedTypes" ".tox" ""
|
||||||
|
${WriteRegStr} HKCR ".tox" "" "toxsave"
|
||||||
|
${WriteRegStr} HKCR "toxsave" "" "Tox save file"
|
||||||
|
${WriteRegStr} HKCR "toxsave\DefaultIcon" "" "$INSTDIR\${MAIN_APP_EXE}"
|
||||||
|
${WriteRegStr} HKCR "toxsave\shell\open\command" "" "$INSTDIR\${MAIN_APP_EXE} %1"
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user