MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / start

Method start

src/plugins/codeporting/codeporting.cpp:79–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77}
78
79bool CodePorting::start(const QString &projectSrcPath, const QString &srcCPU, const QString &buildDir, const QString &destCPU)
80{
81 if (status == kRuning)
82 return false;
83
84 // check script and source dirctory is exists.
85 QString scriptPath = CustomPaths::global(CustomPaths::Scripts);
86 QString portingCli = scriptPath + "/porting-script/code_porting.py";
87 QDir dir;
88 if (!QFile::exists(portingCli) || !dir.exists(projectSrcPath))
89 return false;
90
91 projSrcPath = projectSrcPath;
92
93 process.setProgram(getPython());
94 QStringList args;
95 args.append(portingCli);
96 args.append("-S");
97 args.append(projectSrcPath);
98 args.append("-B");
99 args.append(buildDir);
100 args.append("--scpu");
101 args.append(srcCPU);
102 args.append("--dcpu");
103 args.append(destCPU);
104 process.setArguments(args);
105 process.start();
106 process.waitForFinished(-1);
107
108 return true;
109}
110
111bool CodePorting::abort()
112{

Callers 1

slotPortingStartMethod · 0.45

Calls 4

existsMethod · 0.45
setProgramMethod · 0.45
appendMethod · 0.45
setArgumentsMethod · 0.45

Tested by

no test coverage detected