src/eric7/Plugins/PluginEricdoc.py

branch
eric7
changeset 9536
c1c84299bef3
parent 9514
2b104ad132a4
child 9624
b47dfa7a137d
equal deleted inserted replaced
9535:8b5402794fb6 9536:c1c84299bef3
10 import os 10 import os
11 11
12 from PyQt6.QtCore import QCoreApplication, QObject 12 from PyQt6.QtCore import QCoreApplication, QObject
13 from PyQt6.QtWidgets import QDialog 13 from PyQt6.QtWidgets import QDialog
14 14
15 from eric7 import Utilities 15 from eric7 import Preferences, Utilities
16 from eric7.EricGui.EricAction import EricAction 16 from eric7.EricGui.EricAction import EricAction
17 from eric7.EricWidgets.EricApplication import ericApp 17 from eric7.EricWidgets.EricApplication import ericApp
18 from eric7.Globals import getConfig 18 from eric7.Globals import getConfig
19 from eric7.UI import Info 19 from eric7.UI import Info
20 20
88 } 88 }
89 ) 89 )
90 90
91 # 2. Qt Help Generator 91 # 2. Qt Help Generator
92 # 2.1 location before 6.3 (Linux and macOS) and Windows 92 # 2.1 location before 6.3 (Linux and macOS) and Windows
93 exe = os.path.join( 93 exe = Preferences.getQt("QHelpGenerator")
94 Utilities.getQtBinariesPath(), Utilities.generateQtToolName("qhelpgenerator") 94
95 ) 95 if not exe:
96 if Utilities.isWindowsPlatform(): 96 # 2.2 location before 6.3 (Linux and macOS) and Windows
97 exe += ".exe" 97 exe = os.path.join(
98 if os.path.exists(exe): 98 Utilities.getQtBinariesPath(),
99 Utilities.generateQtToolName("qhelpgenerator"),
100 )
101 if Utilities.isWindowsPlatform():
102 exe += ".exe"
103 if not os.path.exists(exe):
104 # 2.3 location starting with 6.3.0 (Linux and macOS)
105 exe = os.path.join(
106 Utilities.getQtBinariesPath(libexec=True),
107 Utilities.generateQtToolName("qhelpgenerator"),
108 )
109
110 if exe:
99 dataList.append( 111 dataList.append(
100 { 112 {
101 "programEntry": True, 113 "programEntry": True,
102 "header": QCoreApplication.translate("EricdocPlugin", "Qt Help Tools"), 114 "header": QCoreApplication.translate("EricdocPlugin", "Qt Help Tools"),
103 "exe": exe, 115 "exe": exe,
106 "versionPosition": -1, 118 "versionPosition": -1,
107 "version": "", 119 "version": "",
108 "versionCleanup": (0, -1), 120 "versionCleanup": (0, -1),
109 } 121 }
110 ) 122 )
111 else:
112 # 2.2 location starting with 6.3.0 (Linux and macOS)
113 exe = os.path.join(
114 Utilities.getQtBinariesPath(libexec=True),
115 Utilities.generateQtToolName("qhelpgenerator"),
116 )
117 dataList.append(
118 {
119 "programEntry": True,
120 "header": QCoreApplication.translate("EricdocPlugin", "Qt Help Tools"),
121 "exe": exe,
122 "versionCommand": "-v",
123 "versionStartsWith": "Qt",
124 "versionPosition": -1,
125 "version": "",
126 "versionCleanup": (0, -1),
127 }
128 )
129 123
130 return dataList 124 return dataList
131 125
132 126
133 class EricdocPlugin(QObject): 127 class EricdocPlugin(QObject):

eric ide

mercurial