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_): |
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) |