[LyX/master] Enable Qt6 for Wininstaller
Eugene Chornyi
yu_jin at lyx.org
Thu May 27 16:39:45 UTC 2021
commit 764d59d88255dfe202f9f3a6996bbda8f20778c2
Author: Eugene Chornyi <yu_jin at lyx.org>
Date: Thu May 27 18:51:30 2021 +0200
Enable Qt6 for Wininstaller
---
.../Win32/packaging/installer/lyx_standard.nsi | 2 +
development/Win32/packaging/installer/src/main.nsh | 33 ++++++++++++--------
2 files changed, 22 insertions(+), 13 deletions(-)
diff --git a/development/Win32/packaging/installer/lyx_standard.nsi b/development/Win32/packaging/installer/lyx_standard.nsi
index a09e22d..f04a79b 100644
--- a/development/Win32/packaging/installer/lyx_standard.nsi
+++ b/development/Win32/packaging/installer/lyx_standard.nsi
@@ -15,6 +15,8 @@
!define FILES_QT "${FILES_LYX}" # Can choose same as FILES_LYX (if Qt files copied to LYX_INSTALLED folder after compiling) or Qt kit folder
!define FILES_DEPS "${FILES_LYX}" # Can choose same as FILES_LYX (if dependencies copied to LYX_INSTALLED folder after compiling) or the dependencies folder itself (GNUWIN32 dir)
+!define Qt_Version 6 # 5 or 6 (4 is not supported)
+
!define COPYRIGHT_YEAR 2020
#-------------------------------------------------------------
diff --git a/development/Win32/packaging/installer/src/main.nsh b/development/Win32/packaging/installer/src/main.nsh
index 3074e35..81e8738 100644
--- a/development/Win32/packaging/installer/src/main.nsh
+++ b/development/Win32/packaging/installer/src/main.nsh
@@ -591,15 +591,20 @@ Section -ProgramFiles
# Pdfview
File "${FILES_DEPS}\bin\pdfview.exe"
# Qt libraries
- File "${FILES_QT}\bin\Qt5Concurrent.dll"
- File "${FILES_QT}\bin\Qt5Core.dll"
- File "${FILES_QT}\bin\Qt5Gui.dll"
- File "${FILES_QT}\bin\Qt5Network.dll"
- File "${FILES_QT}\bin\Qt5OpenGL.dll"
- File "${FILES_QT}\bin\Qt5PrintSupport.dll"
- File "${FILES_QT}\bin\Qt5Svg.dll"
- File "${FILES_QT}\bin\Qt5Widgets.dll"
- File "${FILES_QT}\bin\Qt5WinExtras.dll"
+ File "${FILES_QT}\bin\Qt${Qt_Version}Concurrent.dll"
+ File "${FILES_QT}\bin\Qt${Qt_Version}Core.dll"
+ File "${FILES_QT}\bin\Qt${Qt_Version}Gui.dll"
+ File "${FILES_QT}\bin\Qt${Qt_Version}Network.dll"
+ File "${FILES_QT}\bin\Qt${Qt_Version}OpenGL.dll"
+ File "${FILES_QT}\bin\Qt${Qt_Version}PrintSupport.dll"
+ File "${FILES_QT}\bin\Qt${Qt_Version}Svg.dll"
+ File "${FILES_QT}\bin\Qt${Qt_Version}Widgets.dll"
+ !if ${Qt_Version} = 5
+ File "${FILES_QT}\bin\Qt5WinExtras.dll"
+ !endif
+ !if ${Qt_Version} = 6
+ File "${FILES_DEPS}\bin\Qt6Core5Compat.dll"
+ !endif
# Qt plugin DLLs
SetOutPath "$INSTDIR\bin\imageformats"
@@ -607,10 +612,12 @@ Section -ProgramFiles
File "${FILES_QT}\bin\imageformats\qico.dll"
File "${FILES_QT}\bin\imageformats\qjpeg.dll"
File "${FILES_QT}\bin\imageformats\qsvg.dll"
- File "${FILES_QT}\bin\imageformats\qicns.dll"
- File "${FILES_QT}\bin\imageformats\qtiff.dll"
- File "${FILES_QT}\bin\imageformats\qwbmp.dll"
- File "${FILES_QT}\bin\imageformats\qwebp.dll"
+ !if ${Qt_Version} = 5
+ File "${FILES_QT}\bin\imageformats\qicns.dll"
+ File "${FILES_QT}\bin\imageformats\qtiff.dll"
+ File "${FILES_QT}\bin\imageformats\qwbmp.dll"
+ File "${FILES_QT}\bin\imageformats\qwebp.dll"
+ !endif
SetOutPath "$INSTDIR\bin\iconengines"
File "${FILES_QT}\bin\iconengines\qsvgicon.dll"
More information about the lyx-cvs
mailing list