Preferences/ProgramsDialog.py

changeset 2615
bdc9b4659826
parent 2596
32c4afbe0801
child 2677
3d4277929fb3
child 2737
dbe5497851fa
equal deleted inserted replaced
2614:9c49b4419ea7 2615:bdc9b4659826
8 """ 8 """
9 9
10 import os 10 import os
11 import re 11 import re
12 12
13 from PyQt4.QtCore import pyqtSlot, Qt, QProcess, QLibraryInfo 13 from PyQt4.QtCore import pyqtSlot, Qt, QProcess
14 from PyQt4.QtGui import QApplication, QTreeWidgetItem, QHeaderView, QCursor, \ 14 from PyQt4.QtGui import QApplication, QTreeWidgetItem, QHeaderView, QCursor, \
15 QDialog, QDialogButtonBox 15 QDialog, QDialogButtonBox
16 16
17 from E5Gui.E5Application import e5App 17 from E5Gui.E5Application import e5App
18 18
77 # 1. do the Qt4/Qt5 programs 77 # 1. do the Qt4/Qt5 programs
78 # 1a. Translation Converter 78 # 1a. Translation Converter
79 exe = Utilities.isWindowsPlatform() and \ 79 exe = Utilities.isWindowsPlatform() and \
80 "{0}.exe".format(Utilities.generateQtToolName("lrelease")) or \ 80 "{0}.exe".format(Utilities.generateQtToolName("lrelease")) or \
81 Utilities.generateQtToolName("lrelease") 81 Utilities.generateQtToolName("lrelease")
82 exe = os.path.join(QLibraryInfo.location(QLibraryInfo.BinariesPath), exe) 82 exe = os.path.join(Utilities.getQtBinariesPath(), exe)
83 version = self.__createProgramEntry(self.trUtf8("Translation Converter (Qt)"), 83 version = self.__createProgramEntry(self.trUtf8("Translation Converter (Qt)"),
84 exe, '-version', 'lrelease', -1) 84 exe, '-version', 'lrelease', -1)
85 # 1b. Qt Designer 85 # 1b. Qt Designer
86 if Utilities.isWindowsPlatform(): 86 if Utilities.isWindowsPlatform():
87 exe = os.path.join(QLibraryInfo.location(QLibraryInfo.BinariesPath), 87 exe = os.path.join(Utilities.getQtBinariesPath(),
88 "{0}.exe".format(Utilities.generateQtToolName("designer"))) 88 "{0}.exe".format(Utilities.generateQtToolName("designer")))
89 elif Utilities.isMacPlatform(): 89 elif Utilities.isMacPlatform():
90 exe = Utilities.getQtMacBundle("designer") 90 exe = Utilities.getQtMacBundle("designer")
91 else: 91 else:
92 exe = os.path.join(QLibraryInfo.location(QLibraryInfo.BinariesPath), 92 exe = os.path.join(Utilities.getQtBinariesPath(),
93 Utilities.generateQtToolName("designer")) 93 Utilities.generateQtToolName("designer"))
94 self.__createProgramEntry(self.trUtf8("Qt Designer"), exe, version=version) 94 self.__createProgramEntry(self.trUtf8("Qt Designer"), exe, version=version)
95 # 1c. Qt Linguist 95 # 1c. Qt Linguist
96 if Utilities.isWindowsPlatform(): 96 if Utilities.isWindowsPlatform():
97 exe = os.path.join(QLibraryInfo.location(QLibraryInfo.BinariesPath), 97 exe = os.path.join(Utilities.getQtBinariesPath(),
98 "{0}.exe".format(Utilities.generateQtToolName("linguist"))) 98 "{0}.exe".format(Utilities.generateQtToolName("linguist")))
99 elif Utilities.isMacPlatform(): 99 elif Utilities.isMacPlatform():
100 exe = Utilities.getQtMacBundle("linguist") 100 exe = Utilities.getQtMacBundle("linguist")
101 else: 101 else:
102 exe = os.path.join(QLibraryInfo.location(QLibraryInfo.BinariesPath), 102 exe = os.path.join(Utilities.getQtBinariesPath(),
103 Utilities.generateQtToolName("linguist")) 103 Utilities.generateQtToolName("linguist"))
104 self.__createProgramEntry(self.trUtf8("Qt Linguist"), exe, version=version) 104 self.__createProgramEntry(self.trUtf8("Qt Linguist"), exe, version=version)
105 # 1d. Qt Assistant 105 # 1d. Qt Assistant
106 if Utilities.isWindowsPlatform(): 106 if Utilities.isWindowsPlatform():
107 exe = os.path.join(QLibraryInfo.location(QLibraryInfo.BinariesPath), 107 exe = os.path.join(Utilities.getQtBinariesPath(),
108 "{0}.exe".format(Utilities.generateQtToolName("assistant"))) 108 "{0}.exe".format(Utilities.generateQtToolName("assistant")))
109 elif Utilities.isMacPlatform(): 109 elif Utilities.isMacPlatform():
110 exe = Utilities.getQtMacBundle("assistant") 110 exe = Utilities.getQtMacBundle("assistant")
111 else: 111 else:
112 exe = os.path.join(QLibraryInfo.location(QLibraryInfo.BinariesPath), 112 exe = os.path.join(Utilities.getQtBinariesPath(),
113 Utilities.generateQtToolName("assistant")) 113 Utilities.generateQtToolName("assistant"))
114 self.__createProgramEntry(self.trUtf8("Qt Assistant"), exe, version=version) 114 self.__createProgramEntry(self.trUtf8("Qt Assistant"), exe, version=version)
115 115
116 # 2. do the PyQt programs 116 # 2. do the PyQt programs
117 # 2a. Translation Extractor PyQt4 117 # 2a. Translation Extractor PyQt4

eric ide

mercurial