src/eric7/Plugins/PluginEricapi.py

branch
eric7
changeset 9624
b47dfa7a137d
parent 9514
2b104ad132a4
child 9653
e67609152c5e
equal deleted inserted replaced
9623:9c1f429cb56b 9624:b47dfa7a137d
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
16 from eric7.EricGui.EricAction import EricAction 15 from eric7.EricGui.EricAction import EricAction
17 from eric7.EricWidgets.EricApplication import ericApp 16 from eric7.EricWidgets.EricApplication import ericApp
18 from eric7.Globals import getConfig 17 from eric7.Globals import getConfig
18 from eric7.SystemUtilities import FileSystemUtilities, OSUtilities, PythonUtilities
19 from eric7.UI import Info 19 from eric7.UI import Info
20 20
21 # Start-Of-Header 21 # Start-Of-Header
22 name = "Ericapi Plugin" 22 name = "Ericapi Plugin"
23 author = "Detlev Offenbach <detlev@die-offenbachs.de>" 23 author = "Detlev Offenbach <detlev@die-offenbachs.de>"
44 44
45 @return dictionary containing the data to query the presence of 45 @return dictionary containing the data to query the presence of
46 the executable 46 the executable
47 """ 47 """
48 exe = "eric7_api" 48 exe = "eric7_api"
49 if Utilities.isWindowsPlatform(): 49 if OSUtilities.isWindowsPlatform():
50 for exepath in ( 50 for exepath in (
51 getConfig("bindir"), 51 getConfig("bindir"),
52 Utilities.getPythonScriptsDirectory(), 52 PythonUtilities.getPythonScriptsDirectory(),
53 ): 53 ):
54 found = False 54 found = False
55 for ext in (".exe", ".cmd", ".bat"): 55 for ext in (".exe", ".cmd", ".bat"):
56 exe_ = os.path.join(exepath, exe + ext) 56 exe_ = os.path.join(exepath, exe + ext)
57 if os.path.exists(exe_): 57 if os.path.exists(exe_):
61 if found: 61 if found:
62 break 62 break
63 else: 63 else:
64 for exepath in ( 64 for exepath in (
65 getConfig("bindir"), 65 getConfig("bindir"),
66 Utilities.getPythonScriptsDirectory(), 66 PythonUtilities.getPythonScriptsDirectory(),
67 ): 67 ):
68 exe_ = os.path.join(exepath, exe) 68 exe_ = os.path.join(exepath, exe)
69 if os.path.exists(exe_): 69 if os.path.exists(exe_):
70 exe = exe_ 70 exe = exe_
71 break 71 break
200 dia = EricapiExecDialog("Ericapi") 200 dia = EricapiExecDialog("Ericapi")
201 res = dia.start(args, startDir) 201 res = dia.start(args, startDir)
202 if res: 202 if res:
203 dia.exec() 203 dia.exec()
204 204
205 outputFileName = Utilities.toNativeSeparators(parms["outputFile"]) 205 outputFileName = FileSystemUtilities.toNativeSeparators(parms["outputFile"])
206 206
207 # add output files to the project data, if they aren't in already 207 # add output files to the project data, if they aren't in already
208 for progLanguage in parms["languages"]: 208 for progLanguage in parms["languages"]:
209 if "%L" in outputFileName: 209 if "%L" in outputFileName:
210 outfile = outputFileName.replace("%L", progLanguage) 210 outfile = outputFileName.replace("%L", progLanguage)

eric ide

mercurial