no message
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.CommonConstants;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.UI_;
|
||||
import _VisualDVM.Constants;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.GlobalData.GlobalDatabase;
|
||||
@@ -50,9 +50,9 @@ public class Precompilation extends Pass<db_project_info> {
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
target = Current.getProject();
|
||||
if (CommonUtils.isWindows()) {
|
||||
if (Utils_.isWindows()) {
|
||||
//--
|
||||
makepath = ((GlobalDatabase)CommonUtils.db).settings.get(SettingName.LocalMakePathWindows).toString();
|
||||
makepath = ((GlobalDatabase) Utils_.db).settings.get(SettingName.LocalMakePathWindows).toString();
|
||||
if (makepath.isEmpty()) {
|
||||
Log.Writeln_("Не задан путь к make.exe.\n " +
|
||||
"Укажите его в меню глобальных настроек." +
|
||||
@@ -95,7 +95,7 @@ public class Precompilation extends Pass<db_project_info> {
|
||||
performanceTime = 0;
|
||||
exitCode = CommonConstants.Nan;
|
||||
//------------------
|
||||
workspace = Paths.get(Global.TempDirectory.getAbsolutePath(), CommonUtils.getDateName("precompilation")).toFile();
|
||||
workspace = Paths.get(Global.TempDirectory.getAbsolutePath(), Utils_.getDateName("precompilation")).toFile();
|
||||
FileUtils.forceMkdir(workspace);
|
||||
//------------------------------>>
|
||||
fortranCompiler = new Compiler();
|
||||
@@ -169,7 +169,7 @@ public class Precompilation extends Pass<db_project_info> {
|
||||
} else {
|
||||
//анализ начала строки.
|
||||
for (String name : target.db.files.Data.keySet()) {
|
||||
if (S.startsWith(CommonUtils.toU(name))) {
|
||||
if (S.startsWith(Utils_.toU(name))) {
|
||||
String[] data = S.split(":");
|
||||
if (data.length > 1) {
|
||||
messageFile = name;
|
||||
@@ -186,17 +186,17 @@ public class Precompilation extends Pass<db_project_info> {
|
||||
}
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
if (CommonUtils.isWindows()) {
|
||||
if (Utils_.isWindows()) {
|
||||
name_to_kill = "make.exe";
|
||||
StartProcess(CommonUtils.DQuotes(((GlobalDatabase)CommonUtils.db).settings.get(SettingName.LocalMakePathWindows).Value) + " -j " + ((GlobalDatabase)CommonUtils.db).settings.get(SettingName.Kernels).toString(),
|
||||
StartProcess(Utils_.DQuotes(((GlobalDatabase) Utils_.db).settings.get(SettingName.LocalMakePathWindows).Value) + " -j " + ((GlobalDatabase) Utils_.db).settings.get(SettingName.Kernels).toString(),
|
||||
target.compilation_maxtime);
|
||||
} else
|
||||
StartProcess("make -j " + ((GlobalDatabase)CommonUtils.db).settings.get(SettingName.Kernels).toString(), target.compilation_maxtime);
|
||||
StartProcess("make -j " + ((GlobalDatabase) Utils_.db).settings.get(SettingName.Kernels).toString(), target.compilation_maxtime);
|
||||
}
|
||||
protected void StartProcess(String command, int TA) throws Exception {
|
||||
killed = false;
|
||||
output = "";
|
||||
process = Utils.startScript(workspace, workspace, CommonUtils.getDateName("start_task_script"),
|
||||
process = Utils.startScript(workspace, workspace, Utils_.getDateName("start_task_script"),
|
||||
command,
|
||||
null);
|
||||
outputLines.clear();
|
||||
@@ -225,7 +225,7 @@ public class Precompilation extends Pass<db_project_info> {
|
||||
protected void performFinish() throws Exception {
|
||||
for (DBProjectFile file : target.db.files.Data.values()) {
|
||||
if (!file.last_assembly_name.isEmpty()) {
|
||||
String replacement = file.last_assembly_name + " " + CommonUtils.RBrackets(file.name);
|
||||
String replacement = file.last_assembly_name + " " + Utils_.RBrackets(file.name);
|
||||
output = output.replace(file.last_assembly_name, replacement);
|
||||
}
|
||||
}
|
||||
@@ -248,14 +248,14 @@ public class Precompilation extends Pass<db_project_info> {
|
||||
}
|
||||
@Override
|
||||
public void Interrupt() throws Exception {
|
||||
if (CommonUtils.isWindows()) {
|
||||
if (Utils_.isWindows()) {
|
||||
if (!name_to_kill.isEmpty()) {
|
||||
killed = true;
|
||||
Process killer = Runtime.getRuntime().exec("taskkill /FI \"IMAGENAME eq " + name_to_kill + "\" /F /T");
|
||||
killer.waitFor();
|
||||
}
|
||||
} else {
|
||||
CommonUI.Info("Прерывание процессов под Linux не реализовано");
|
||||
UI_.Info("Прерывание процессов под Linux не реализовано");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user