Improvement of terminal support

This commit is contained in:
Roy Qu 2023-09-21 08:17:07 +08:00
parent a2a3ae8a91
commit 1e645d7770
11 changed files with 373 additions and 340 deletions

View File

@ -5,8 +5,7 @@ Red Panda C++ Version 2.25
- fix: "move selection up/down" of whole lines selection are no correctly handled.
- enhancement: Improvement of terminal support ( from cyano.CN )
- enhancement: Virtual Terminal Sequences Support in windows 10/11 ( from cyano.CN )
- enhancement: Option "Enable Virtual Terminal Sequences Support" in Settings -> Executor
Red Panda C++ Version 2.24

View File

@ -37,7 +37,8 @@
enum RunProgramFlag {
RPF_PAUSE_CONSOLE = 0x0001,
RPF_REDIRECT_INPUT = 0x0002
RPF_REDIRECT_INPUT = 0x0002,
RPF_ENABLE_VIRTUAL_TERMINAL_PROCESSING = 0x0004
};
CompilerManager::CompilerManager(QObject *parent) : QObject(parent),
@ -256,6 +257,8 @@ void CompilerManager::run(
if (pSettings->executor().pauseConsole())
consoleFlag |= RPF_PAUSE_CONSOLE;
#ifdef Q_OS_WIN
if (pSettings->executor().enableVirualTerminalSequence())
consoleFlag |= RPF_ENABLE_VIRTUAL_TERMINAL_PROCESSING;
if (consoleFlag!=0) {
QString sharedMemoryId = QUuid::createUuid().toString();
QString consolePauserPath = includeTrailingPathDelimiter(pSettings->dirs().appDir()) + CONSOLE_PAUSER;

View File

@ -3623,36 +3623,9 @@ void Settings::Environment::doLoad()
mUseCustomTerminal = true;
#endif
#ifdef Q_OS_WINDOWS
QString terminalListFilename(":/config/terminal-windows.json");
#else // UNIX
QString terminalListFilename(":/config/terminal-unix.json");
#endif
QFile terminalListFile(terminalListFilename);
if (!terminalListFile.open(QFile::ReadOnly))
throw FileError(QObject::tr("Can't open file '%1' for read.")
.arg(terminalListFilename));
QByteArray terminalListContent = terminalListFile.readAll();
QJsonDocument terminalListDocument(QJsonDocument::fromJson(terminalListContent));
// check saved terminal path
QString savedTerminalPath = stringValue("terminal_path", "");
QString savedArgsPattern = stringValue("terminal_arguments_pattern", "");
bool terminalSet = checkAndSetTerminal(savedTerminalPath, savedArgsPattern);
// determing terminal (if not set yet) and build predefined arguments pattern map from our list
for (const auto &terminalGroup: terminalListDocument.array()) {
const QJsonArray &terminals = terminalGroup.toObject()["terminals"].toArray();
for (const auto &terminal_: terminals) {
const QJsonObject &terminal = terminal_.toObject();
const QString &path = terminal["path"].toString();
const QString &executable = QFileInfo(path).fileName();
const QString &pattern = terminal["argsPattern"].toString();
mPredefinedTerminalArgumentsPattern[executable] = pattern;
if (!terminalSet)
terminalSet = checkAndSetTerminal(path, pattern);
}
}
mTerminalPath = stringValue("terminal_path", "");
mTerminalArgumentsPattern = stringValue("terminal_arguments_pattern", "");
mAStylePath = includeTrailingPathDelimiter(pSettings->dirs().appLibexecDir())+"astyle";
mHideNonSupportFilesInFileView=boolValue("hide_non_support_files_file_view",true);
@ -3798,23 +3771,32 @@ void Settings::Environment::setIconZoomFactor(double newIconZoomFactor)
mIconZoomFactor = newIconZoomFactor;
}
QMap<QString, QString> Settings::Environment::predefinedTerminalArgumentsPattern() const
QString Settings::Environment::queryPredefinedTerminalArgumentsPattern(const QString &executable) const
{
return mPredefinedTerminalArgumentsPattern;
}
#ifdef Q_OS_WINDOWS
QString terminalListFilename(":/config/terminal-windows.json");
#else // UNIX
QString terminalListFilename(":/config/terminal-unix.json");
#endif
QFile terminalListFile(terminalListFilename);
if (!terminalListFile.open(QFile::ReadOnly))
throw FileError(QObject::tr("Can't open file '%1' for read.")
.arg(terminalListFilename));
QByteArray terminalListContent = terminalListFile.readAll();
QJsonDocument terminalListDocument(QJsonDocument::fromJson(terminalListContent));
void Settings::Environment::setPredefinedTerminalArgumentsPattern(const QMap<QString, QString> &newPredefinedTerminalArgumentsPattern)
{
mPredefinedTerminalArgumentsPattern = newPredefinedTerminalArgumentsPattern;
}
std::unique_ptr<QString> Settings::Environment::queryPredefinedTerminalArgumentsPattern(const QString &executable) const
{
auto it = mPredefinedTerminalArgumentsPattern.find(executable);
if (it != mPredefinedTerminalArgumentsPattern.end())
return std::make_unique<QString>(*it);
else
return nullptr;
// determing terminal (if not set yet) and build predefined arguments pattern map from our list
for (const auto &terminalGroup: terminalListDocument.array()) {
const QJsonArray &terminals = terminalGroup.toObject()["terminals"].toArray();
for (const auto &terminal_: terminals) {
const QJsonObject &terminal = terminal_.toObject();
const QString &path = terminal["path"].toString();
const QString &termExecutable = QFileInfo(path).fileName();
const QString &pattern = terminal["argsPattern"].toString();
if (QString::compare( executable , termExecutable, PATH_SENSITIVITY)==0) return pattern;
}
}
return QString();
}
bool Settings::Environment::useCustomTerminal() const
@ -3827,59 +3809,59 @@ void Settings::Environment::setUseCustomTerminal(bool newUseCustomTerminal)
mUseCustomTerminal = newUseCustomTerminal;
}
bool Settings::Environment::checkAndSetTerminal(QString terminalPath, QString argsPattern)
{
QStringList patternItems = splitProcessCommand(argsPattern);
//bool Settings::Environment::checkAndSetTerminal(QString terminalPath, QString argsPattern)
//{
// QStringList patternItems = splitProcessCommand(argsPattern);
if (patternItems.empty() ||
!(patternItems.contains("$argv") || patternItems.contains("$command") || patternItems.contains("$tmpfile")) // program not referenced
)
return false;
// if (patternItems.empty() ||
// !(patternItems.contains("$argv") || patternItems.contains("$command") || patternItems.contains("$tmpfile")) // program not referenced
// )
// return false;
// `term` is not referenced ("$argv"),
// or is not directly called ("open -app $term -args $tmpfile"),
// do not check terminal path
if (patternItems[0] != "$term") {
setTerminalPath(terminalPath);
setTerminalArgumentsPattern(argsPattern);
return true;
}
// // `term` is not referenced ("$argv"),
// // or is not directly called ("open -app $term -args $tmpfile"),
// // do not check terminal path
// if (patternItems[0] != "$term") {
// setTerminalPath(terminalPath);
// setTerminalArgumentsPattern(argsPattern);
// return true;
// }
#define DO_CHECK_AND_SET do { \
if (termPathInfo.isFile() && termPathInfo.isReadable() && termPathInfo.isExecutable()) { \
mTerminalPath = terminalPath; \
mTerminalArgumentsPattern = argsPattern; \
return true; \
} \
} while (0)
//#define DO_CHECK_AND_SET do { \
// if (termPathInfo.isFile() && termPathInfo.isReadable() && termPathInfo.isExecutable()) { \
// mTerminalPath = terminalPath; \
// mTerminalArgumentsPattern = argsPattern; \
// return true; \
// } \
// } while (0)
switch (getPathUnixExecSemantics(terminalPath)) {
case UnixExecSemantics::Absolute: {
QFileInfo termPathInfo(terminalPath);
DO_CHECK_AND_SET;
break;
}
case UnixExecSemantics::RelativeToCwd: {
QDir appDir(pSettings->dirs().appDir());
QString absoluteTerminalPath = appDir.absoluteFilePath(terminalPath);
QFileInfo termPathInfo(absoluteTerminalPath);
DO_CHECK_AND_SET;
break;
}
case UnixExecSemantics::SearchInPath: {
QStringList pathList = getExecutableSearchPaths();
for (const QString &dir: pathList) {
QString absoluteTerminalPath = QDir(dir).absoluteFilePath(terminalPath);
QFileInfo termPathInfo(absoluteTerminalPath);
DO_CHECK_AND_SET;
}
break;
}
}
#undef DO_CHECK_AND_SET
// switch (getPathUnixExecSemantics(terminalPath)) {
// case UnixExecSemantics::Absolute: {
// QFileInfo termPathInfo(terminalPath);
// DO_CHECK_AND_SET;
// break;
// }
// case UnixExecSemantics::RelativeToCwd: {
// QDir appDir(pSettings->dirs().appDir());
// QString absoluteTerminalPath = appDir.absoluteFilePath(terminalPath);
// QFileInfo termPathInfo(absoluteTerminalPath);
// DO_CHECK_AND_SET;
// break;
// }
// case UnixExecSemantics::SearchInPath: {
// QStringList pathList = getExecutableSearchPaths();
// for (const QString &dir: pathList) {
// QString absoluteTerminalPath = QDir(dir).absoluteFilePath(terminalPath);
// QFileInfo termPathInfo(absoluteTerminalPath);
// DO_CHECK_AND_SET;
// }
// break;
// }
// }
//#undef DO_CHECK_AND_SET
return false;
}
// return false;
//}
void Settings::Environment::doSave()
{
@ -4051,6 +4033,16 @@ void Settings::Executor::setProblemCaseValidateType(ProblemCaseValidateType newP
mProblemCaseValidateType = newProblemCaseValidateType;
}
bool Settings::Executor::enableVirualTerminalSequence() const
{
return mEnableVirualTerminalSequence;
}
void Settings::Executor::setEnableVirualTerminalSequence(bool newEnableVirualTerminalSequence)
{
mEnableVirualTerminalSequence = newEnableVirualTerminalSequence;
}
bool Settings::Executor::convertHTMLToTextForInput() const
{
return mConvertHTMLToTextForInput;
@ -4114,6 +4106,9 @@ void Settings::Executor::setEnableProblemSet(bool newEnableProblemSet)
void Settings::Executor::doSave()
{
saveValue("pause_console", mPauseConsole);
#ifdef Q_OS_WIN
saveValue("enable_virtual_terminal_sequence", mEnableVirualTerminalSequence);
#endif
saveValue("minimize_on_run", mMinimizeOnRun);
saveValue("use_params",mUseParams);
saveValue("params",mParams);
@ -4149,6 +4144,9 @@ void Settings::Executor::setPauseConsole(bool pauseConsole)
void Settings::Executor::doLoad()
{
mPauseConsole = boolValue("pause_console",true);
#ifdef Q_OS_WIN
mEnableVirualTerminalSequence = boolValue("enable_virtual_terminal_sequence", true);
#endif
mMinimizeOnRun = boolValue("minimize_on_run",false);
mUseParams = boolValue("use_params",false);
mParams = stringValue("params", "");

View File

@ -596,18 +596,13 @@ public:
QJsonArray availableTerminals() const;
void setAvailableTerminals(const QJsonArray &availableTerminals);
QMap<QString, QString> predefinedTerminalArgumentsPattern() const;
void setPredefinedTerminalArgumentsPattern(const QMap<QString, QString> &newPredefinedTerminalArgumentsPattern);
// it should be `std::optional<QString>`.
// `std::unique_ptr` is a work around for Debian 10, where Qt 5.11 doesnt recognize `CONFIG += c++17`,
// and macOS, where official Qt 5.15 is built against macOS 10.13 and `std::optional` is explicitly disabled.
std::unique_ptr<QString> queryPredefinedTerminalArgumentsPattern(const QString &executable) const;
QString queryPredefinedTerminalArgumentsPattern(const QString &executable) const;
bool useCustomTerminal() const;
void setUseCustomTerminal(bool newUseCustomTerminal);
private:
bool checkAndSetTerminal(QString terminalPath, QString argsPattern);
// bool checkAndSetTerminal(QString terminalPath, QString argsPattern);
bool updateTerminalList();
//Appearance
@ -625,7 +620,6 @@ public:
QString mTerminalPath;
QString mAStylePath;
QString mTerminalArgumentsPattern;
QMap<QString, QString> mPredefinedTerminalArgumentsPattern;
bool mUseCustomTerminal;
bool mHideNonSupportFilesInFileView;
bool mOpenFilesInSingleInstance;
@ -955,6 +949,8 @@ public:
ProblemCaseValidateType problemCaseValidateType() const;
void setProblemCaseValidateType(ProblemCaseValidateType newProblemCaseValidateType);
bool enableVirualTerminalSequence() const;
void setEnableVirualTerminalSequence(bool newEnableVirualTerminalSequence);
private:
// general
bool mPauseConsole;
@ -963,6 +959,7 @@ public:
QString mParams;
bool mRedirectInput;
QString mInputFilename;
bool mEnableVirualTerminalSequence;
//Problem Set
bool mEnableProblemSet;

View File

@ -67,9 +67,9 @@ void EnvironmentProgramsWidget::updateCommandPreview(const QString &terminalPath
void EnvironmentProgramsWidget::autoDetectAndUpdateArgumentsPattern(const QString &terminalPath)
{
const QString &executable = QFileInfo(terminalPath).fileName();
const std::unique_ptr<QString> &pattern = pSettings->environment().queryPredefinedTerminalArgumentsPattern(executable);
if (pattern != nullptr)
ui->txtArgsPattern->setText(*pattern);
const QString &pattern = pSettings->environment().queryPredefinedTerminalArgumentsPattern(executable);
if (!pattern.isEmpty())
ui->txtArgsPattern->setText(pattern);
else
QMessageBox::warning(nullptr,
QObject::tr("Auto Detection Failed"),

View File

@ -30,6 +30,11 @@ ExecutorGeneralWidget::ExecutorGeneralWidget(const QString& name, const QString&
{
ui->setupUi(this);
ui->txtParsedArgsInJson->setFont(QFont(DEFAULT_MONO_FONT));
#ifdef Q_OS_WIN
ui->chkVTSeq->setVisible(true);
#else
ui->chkVTSeq->setVisible(false);
#endif
}
ExecutorGeneralWidget::~ExecutorGeneralWidget()
@ -40,6 +45,9 @@ ExecutorGeneralWidget::~ExecutorGeneralWidget()
void ExecutorGeneralWidget::doLoad()
{
ui->chkPauseConsole->setChecked(pSettings->executor().pauseConsole());
#ifdef Q_OS_WIN
ui->chkVTSeq->setChecked(pSettings->executor().enableVirualTerminalSequence());
#endif
ui->chkMinimizeOnRun->setChecked(pSettings->executor().minimizeOnRun());
ui->grpExecuteParameters->setChecked(pSettings->executor().useParams());
ui->txtExecuteParamaters->setText(pSettings->executor().params());
@ -50,6 +58,9 @@ void ExecutorGeneralWidget::doLoad()
void ExecutorGeneralWidget::doSave()
{
pSettings->executor().setPauseConsole(ui->chkPauseConsole->isChecked());
#ifdef Q_OS_WIN
pSettings->executor().setEnableVirualTerminalSequence(ui->chkVTSeq->isChecked());
#endif
pSettings->executor().setMinimizeOnRun(ui->chkMinimizeOnRun->isChecked());
pSettings->executor().setUseParams(ui->grpExecuteParameters->isChecked());
pSettings->executor().setParams(ui->txtExecuteParamaters->text());
@ -83,4 +94,3 @@ void ExecutorGeneralWidget::on_txtExecuteParamaters_textChanged(const QString &c
QJsonArray obj = QJsonArray::fromStringList(parsed);
ui->txtParsedArgsInJson->setText(QJsonDocument{obj}.toJson());
}

View File

@ -24,6 +24,13 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="chkVTSeq">
<property name="text">
<string>Enable Virtual Terminal Sequence Support</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="chkMinimizeOnRun">
<property name="text">
@ -67,8 +74,7 @@
</widget>
</item>
<item>
<widget class="QTextBrowser" name="txtParsedArgsInJson">
</widget>
<widget class="QTextBrowser" name="txtParsedArgsInJson"/>
</item>
</layout>
</widget>

View File

@ -2090,6 +2090,10 @@
<source>Parsed argv array (represented in JSON):</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enable Virtual Terminal Sequence Support</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ExecutorProblemSetWidget</name>

View File

@ -687,29 +687,29 @@ p, li { white-space: pre-wrap; }
<context>
<name>CompilerManager</name>
<message>
<location filename="../compiler/compilermanager.cpp" line="83"/>
<location filename="../compiler/compilermanager.cpp" line="119"/>
<location filename="../compiler/compilermanager.cpp" line="151"/>
<location filename="../compiler/compilermanager.cpp" line="185"/>
<location filename="../compiler/compilermanager.cpp" line="204"/>
<location filename="../compiler/compilermanager.cpp" line="87"/>
<location filename="../compiler/compilermanager.cpp" line="123"/>
<location filename="../compiler/compilermanager.cpp" line="155"/>
<location filename="../compiler/compilermanager.cpp" line="189"/>
<location filename="../compiler/compilermanager.cpp" line="208"/>
<source>No compiler set</source>
<translation></translation>
</message>
<message>
<location filename="../compiler/compilermanager.cpp" line="84"/>
<location filename="../compiler/compilermanager.cpp" line="120"/>
<location filename="../compiler/compilermanager.cpp" line="152"/>
<location filename="../compiler/compilermanager.cpp" line="186"/>
<location filename="../compiler/compilermanager.cpp" line="205"/>
<location filename="../compiler/compilermanager.cpp" line="88"/>
<location filename="../compiler/compilermanager.cpp" line="124"/>
<location filename="../compiler/compilermanager.cpp" line="156"/>
<location filename="../compiler/compilermanager.cpp" line="190"/>
<location filename="../compiler/compilermanager.cpp" line="209"/>
<source>No compiler set is configured.</source>
<translation></translation>
</message>
<message>
<location filename="../compiler/compilermanager.cpp" line="84"/>
<location filename="../compiler/compilermanager.cpp" line="120"/>
<location filename="../compiler/compilermanager.cpp" line="152"/>
<location filename="../compiler/compilermanager.cpp" line="186"/>
<location filename="../compiler/compilermanager.cpp" line="205"/>
<location filename="../compiler/compilermanager.cpp" line="88"/>
<location filename="../compiler/compilermanager.cpp" line="124"/>
<location filename="../compiler/compilermanager.cpp" line="156"/>
<location filename="../compiler/compilermanager.cpp" line="190"/>
<location filename="../compiler/compilermanager.cpp" line="209"/>
<source>Can&apos;t start debugging.</source>
<translation></translation>
</message>
@ -726,12 +726,12 @@ p, li { white-space: pre-wrap; }
<translation type="vanished"></translation>
</message>
<message>
<location filename="../compiler/compilermanager.cpp" line="276"/>
<location filename="../compiler/compilermanager.cpp" line="300"/>
<source>Can&apos;t find Console Pauser</source>
<translation>Console Pauser程序</translation>
</message>
<message>
<location filename="../compiler/compilermanager.cpp" line="277"/>
<location filename="../compiler/compilermanager.cpp" line="301"/>
<source>Console Pauser &quot;%1&quot; doesn&apos;t exists!</source>
<translation>Console Pauser程序&quot;%1&quot;</translation>
</message>
@ -1505,10 +1505,10 @@ Are you really want to continue?</oldsource>
<location filename="../editor.cpp" line="373"/>
<location filename="../editor.cpp" line="443"/>
<location filename="../editor.cpp" line="472"/>
<location filename="../editor.cpp" line="1475"/>
<location filename="../editor.cpp" line="1480"/>
<location filename="../editor.cpp" line="1501"/>
<location filename="../editor.cpp" line="1506"/>
<location filename="../editor.cpp" line="1478"/>
<location filename="../editor.cpp" line="1483"/>
<location filename="../editor.cpp" line="1504"/>
<location filename="../editor.cpp" line="1509"/>
<source>Error</source>
<translation></translation>
</message>
@ -1557,44 +1557,44 @@ Are you really want to continue?</oldsource>
<translation>%1</translation>
</message>
<message>
<location filename="../editor.cpp" line="1476"/>
<location filename="../editor.cpp" line="1479"/>
<source>The text to be copied exceeds count limit!</source>
<translation></translation>
</message>
<message>
<location filename="../editor.cpp" line="1481"/>
<location filename="../editor.cpp" line="1484"/>
<source>The text to be copied exceeds character limit!</source>
<translation></translation>
</message>
<message>
<location filename="../editor.cpp" line="1502"/>
<location filename="../editor.cpp" line="1505"/>
<source>The text to be cut exceeds count limit!</source>
<translation></translation>
</message>
<message>
<location filename="../editor.cpp" line="1507"/>
<location filename="../editor.cpp" line="1510"/>
<source>The text to be cut exceeds character limit!</source>
<translation></translation>
</message>
<message>
<location filename="../editor.cpp" line="2057"/>
<location filename="../editor.cpp" line="2060"/>
<source>hex: %1</source>
<translation>16: %1</translation>
</message>
<message>
<location filename="../editor.cpp" line="2059"/>
<location filename="../editor.cpp" line="2062"/>
<source>dec: %1</source>
<translation>: %1</translation>
</message>
<message>
<location filename="../editor.cpp" line="3271"/>
<location filename="../editor.cpp" line="3272"/>
<source>Print Document</source>
<translation></translation>
</message>
<message>
<location filename="../editor.cpp" line="4042"/>
<location filename="../editor.cpp" line="4067"/>
<location filename="../editor.cpp" line="4114"/>
<location filename="../editor.cpp" line="4043"/>
<location filename="../editor.cpp" line="4068"/>
<location filename="../editor.cpp" line="4115"/>
<source>Ctrl+click for more info</source>
<translation>Ctrl+</translation>
</message>
@ -1603,27 +1603,27 @@ Are you really want to continue?</oldsource>
<translation type="vanished">&apos;%1&apos;!</translation>
</message>
<message>
<location filename="../editor.cpp" line="4983"/>
<location filename="../editor.cpp" line="4984"/>
<source>astyle not found</source>
<translation>astyle程序</translation>
</message>
<message>
<location filename="../editor.cpp" line="4984"/>
<location filename="../editor.cpp" line="4985"/>
<source>Can&apos;t find astyle in &quot;%1&quot;.</source>
<translation>astyle程序&quot;%1&quot;.</translation>
</message>
<message>
<location filename="../editor.cpp" line="5144"/>
<location filename="../editor.cpp" line="5145"/>
<source>Break point condition</source>
<translation></translation>
</message>
<message>
<location filename="../editor.cpp" line="5145"/>
<location filename="../editor.cpp" line="5146"/>
<source>Enter the condition of the breakpoint:</source>
<translation>:</translation>
</message>
<message>
<location filename="../editor.cpp" line="5393"/>
<location filename="../editor.cpp" line="5394"/>
<source>Readonly</source>
<translation></translation>
</message>
@ -2670,74 +2670,75 @@ Are you really want to continue?</oldsource>
<source>Editors share one code parser</source>
<translation></translation>
</message>
</context><context>
<name>EnvironmentProgramsWidget</name>
<message>
<location filename="../settingsdialog/environmentprogramswidget.ui" line="14"/>
<source>Form</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/environmentprogramswidget.ui" line="20"/>
<source>Use custom terminal</source>
<translation>使</translation>
</message>
<message>
<location filename="../settingsdialog/environmentprogramswidget.ui" line="49"/>
<location filename="../settingsdialog/environmentprogramswidget.ui" line="63"/>
<location filename="../settingsdialog/environmentprogramswidget.ui" line="98"/>
<source>...</source>
<translation>...</translation>
</message>
<message>
<location filename="../settingsdialog/environmentprogramswidget.ui" line="81"/>
<source>Cmd. preview</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/environmentprogramswidget.ui" line="60"/>
<source>Auto Detect Terminal Arguments Pattern</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/environmentprogramswidget.ui" line="74"/>
<source>Terminal</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/environmentprogramswidget.ui" line="95"/>
<source>Test Command</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/environmentprogramswidget.ui" line="35"/>
<source>$term -e $argv</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settingsdialog/environmentprogramswidget.ui" line="42"/>
<source>Args. pattern</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/environmentprogramswidget.ui" line="88"/>
<source>term -e sh -c &quot;echo hello; sleep 3&quot;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settingsdialog/environmentprogramswidget.cpp" line="108"/>
<source>Choose Terminal Program</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/environmentprogramswidget.cpp" line="110"/>
<source>All files (%1)</source>
<translation> (%1)</translation>
</message>
<message>
<source>All files (*.*)</source>
<translation type="vanished"> (*.*)</translation>
</message>
</context>
<context>
<name>EnvironmentProgramsWidget</name>
<message>
<location filename="../settingsdialog/environmentprogramswidget.ui" line="14"/>
<source>Form</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/environmentprogramswidget.ui" line="20"/>
<source>Use custom terminal</source>
<translation>使</translation>
</message>
<message>
<location filename="../settingsdialog/environmentprogramswidget.ui" line="49"/>
<location filename="../settingsdialog/environmentprogramswidget.ui" line="63"/>
<location filename="../settingsdialog/environmentprogramswidget.ui" line="98"/>
<source>...</source>
<translation>...</translation>
</message>
<message>
<location filename="../settingsdialog/environmentprogramswidget.ui" line="81"/>
<source>Cmd. preview</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/environmentprogramswidget.ui" line="60"/>
<source>Auto Detect Terminal Arguments Pattern</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/environmentprogramswidget.ui" line="74"/>
<source>Terminal</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/environmentprogramswidget.ui" line="95"/>
<source>Test Command</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/environmentprogramswidget.ui" line="35"/>
<source>$term -e $argv</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settingsdialog/environmentprogramswidget.ui" line="42"/>
<source>Args. pattern</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/environmentprogramswidget.ui" line="88"/>
<source>term -e sh -c &quot;echo hello; sleep 3&quot;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settingsdialog/environmentprogramswidget.cpp" line="110"/>
<source>Choose Terminal Program</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/environmentprogramswidget.cpp" line="112"/>
<source>All files (%1)</source>
<translation> (%1)</translation>
</message>
<message>
<source>All files (*.*)</source>
<translation type="vanished"> (*.*)</translation>
</message>
</context>
<context>
<name>EnvironmentShortcutModel</name>
@ -2783,7 +2784,7 @@ Are you really want to continue?</oldsource>
<context>
<name>ExecutableRunner</name>
<message>
<location filename="../compiler/executablerunner.cpp" line="262"/>
<location filename="../compiler/executablerunner.cpp" line="260"/>
<source>The runner process &apos;%1&apos; failed to start.</source>
<oldsource>The runner process failed to start.</oldsource>
<translation>&apos;%1&apos;</translation>
@ -2793,17 +2794,17 @@ Are you really want to continue?</oldsource>
<translation type="vanished"></translation>
</message>
<message>
<location filename="../compiler/executablerunner.cpp" line="269"/>
<location filename="../compiler/executablerunner.cpp" line="267"/>
<source>The last waitFor...() function timed out.</source>
<translation>waitFor()</translation>
</message>
<message>
<location filename="../compiler/executablerunner.cpp" line="272"/>
<location filename="../compiler/executablerunner.cpp" line="270"/>
<source>An error occurred when attempting to write to the runner process.</source>
<translation></translation>
</message>
<message>
<location filename="../compiler/executablerunner.cpp" line="275"/>
<location filename="../compiler/executablerunner.cpp" line="273"/>
<source>An error occurred when attempting to read from the runner process.</source>
<translation></translation>
</message>
@ -2826,42 +2827,47 @@ Are you really want to continue?</oldsource>
</message>
<message>
<location filename="../settingsdialog/executorgeneralwidget.ui" line="30"/>
<source>Enable Virtual Terminal Sequence Support</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settingsdialog/executorgeneralwidget.ui" line="37"/>
<source>Minimize IDE when running programs</source>
<translation>IDE</translation>
</message>
<message>
<location filename="../settingsdialog/executorgeneralwidget.ui" line="53"/>
<location filename="../settingsdialog/executorgeneralwidget.ui" line="60"/>
<source>Parameters to pass to your program</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/executorgeneralwidget.ui" line="65"/>
<location filename="../settingsdialog/executorgeneralwidget.ui" line="72"/>
<source>Parsed argv array (represented in JSON):</source>
<translation>argv JSON </translation>
</message>
<message>
<location filename="../settingsdialog/executorgeneralwidget.ui" line="68"/>
<location filename="../settingsdialog/executorgeneralwidget.ui" line="85"/>
<source>Redirect input to the following file:</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/executorgeneralwidget.ui" line="83"/>
<location filename="../settingsdialog/executorgeneralwidget.ui" line="99"/>
<source>Debugger doesn&apos;t support this feature in Linux.</source>
<translation>Linux下调试器不支持此功能</translation>
</message>
<message>
<location filename="../settingsdialog/executorgeneralwidget.ui" line="96"/>
<location filename="../settingsdialog/executorgeneralwidget.ui" line="111"/>
<source>Note: </source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/executorgeneralwidget.ui" line="109"/>
<location filename="../settingsdialog/executorgeneralwidget.ui" line="123"/>
<source>Debugger only support this feature in gdb server mode in windows.</source>
<translation>Windows下调试器需启用gdb server模式支持此功能</translation>
</message>
<message>
<location filename="../settingsdialog/executorgeneralwidget.ui" line="116"/>
<location filename="../settingsdialog/executorgeneralwidget.ui" line="119"/>
<location filename="../settingsdialog/executorgeneralwidget.ui" line="130"/>
<location filename="../settingsdialog/executorgeneralwidget.ui" line="133"/>
<source>Browse</source>
<translation></translation>
</message>
@ -2870,12 +2876,12 @@ Are you really want to continue?</oldsource>
<translation type="vanished">注意:由于gdb的bug</translation>
</message>
<message>
<location filename="../settingsdialog/executorgeneralwidget.cpp" line="63"/>
<location filename="../settingsdialog/executorgeneralwidget.cpp" line="77"/>
<source>Choose input file</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/executorgeneralwidget.cpp" line="65"/>
<location filename="../settingsdialog/executorgeneralwidget.cpp" line="79"/>
<source>All files (%1)</source>
<translation> (%1)</translation>
</message>
@ -8759,7 +8765,7 @@ Are you really want to continue?</oldsource>
<context>
<name>QApplication</name>
<message>
<location filename="../main.cpp" line="434"/>
<location filename="../main.cpp" line="451"/>
<source>Error</source>
<translation></translation>
</message>
@ -8846,7 +8852,7 @@ Are you really want to continue?</oldsource>
<translation>&quot;%1&quot;</translation>
</message>
<message>
<location filename="../main.cpp" line="383"/>
<location filename="../main.cpp" line="400"/>
<source>Can&apos;t load autolink settings</source>
<translation></translation>
</message>
@ -8908,7 +8914,7 @@ Are you really want to continue?</oldsource>
</message>
<message>
<location filename="../compiler/compilerinfo.cpp" line="69"/>
<location filename="../compiler/compilerinfo.cpp" line="414"/>
<location filename="../compiler/compilerinfo.cpp" line="417"/>
<source>Code Generation</source>
<translation></translation>
</message>
@ -8936,7 +8942,7 @@ Are you really want to continue?</oldsource>
<translation>使(-mx)</translation>
</message>
<message>
<location filename="../compiler/compilerinfo.cpp" line="433"/>
<location filename="../compiler/compilerinfo.cpp" line="436"/>
<source>Processor (-m)</source>
<translation>(-m)</translation>
</message>
@ -8954,7 +8960,7 @@ Are you really want to continue?</oldsource>
<translation>(-g3)</translation>
</message>
<message>
<location filename="../settings.cpp" line="3230"/>
<location filename="../settings.cpp" line="3229"/>
<source>Would you like Red Panda C++ to search for compilers in PATH?</source>
<translation>C++PATH路径中寻找gcc编译器吗</translation>
</message>
@ -8992,7 +8998,7 @@ Are you really want to continue?</oldsource>
<translation>(stack smashing) (-fstack-protector)</translation>
</message>
<message>
<location filename="../compiler/compilerinfo.cpp" line="186"/>
<location filename="../compiler/compilerinfo.cpp" line="189"/>
<source>Enable Sanitizer (-fsanitize=)</source>
<translation>(-fsanitize=)</translation>
</message>
@ -9017,82 +9023,82 @@ Are you really want to continue?</oldsource>
<translation>ISO C/C++</translation>
</message>
<message>
<location filename="../compiler/compilerinfo.cpp" line="447"/>
<location filename="../compiler/compilerinfo.cpp" line="450"/>
<source>Language standard (--std)</source>
<translation>C语言标准(--std)</translation>
</message>
<message>
<location filename="../compiler/compilerinfo.cpp" line="455"/>
<location filename="../compiler/compilerinfo.cpp" line="458"/>
<source>Memory model (--model)</source>
<translation>(--model)</translation>
</message>
<message>
<location filename="../compiler/compilerinfo.cpp" line="457"/>
<location filename="../compiler/compilerinfo.cpp" line="460"/>
<source>Use external stack</source>
<translation>使</translation>
</message>
<message>
<location filename="../compiler/compilerinfo.cpp" line="458"/>
<location filename="../compiler/compilerinfo.cpp" line="461"/>
<source>Use movc instead of movx to read from external ram</source>
<translation>使movc代替movx访问外部RAM</translation>
</message>
<message>
<location filename="../compiler/compilerinfo.cpp" line="459"/>
<location filename="../compiler/compilerinfo.cpp" line="462"/>
<source>Replaces lcall/ljmp with acall/ajmp</source>
<translation>acall/ajmp代替lcall/ljmp</translation>
</message>
<message>
<location filename="../compiler/compilerinfo.cpp" line="460"/>
<location filename="../compiler/compilerinfo.cpp" line="463"/>
<source>Don&apos;t memcpy initialized xram from code</source>
<translation>Don&apos;t memcpy initialized xram from code</translation>
</message>
<message>
<location filename="../compiler/compilerinfo.cpp" line="461"/>
<location filename="../compiler/compilerinfo.cpp" line="464"/>
<source>Don&apos;t generate startup code</source>
<translation>main函数时不生成起始代码(edsim51模拟器)</translation>
</message>
<message>
<location filename="../compiler/compilerinfo.cpp" line="463"/>
<location filename="../compiler/compilerinfo.cpp" line="466"/>
<source>MCU Specification</source>
<translation></translation>
</message>
<message>
<location filename="../compiler/compilerinfo.cpp" line="465"/>
<location filename="../compiler/compilerinfo.cpp" line="468"/>
<source>Internal ram size</source>
<translation>RAM大小</translation>
</message>
<message>
<location filename="../compiler/compilerinfo.cpp" line="466"/>
<location filename="../compiler/compilerinfo.cpp" line="469"/>
<source>External ram start location</source>
<translation>RAM起始地址</translation>
</message>
<message>
<location filename="../compiler/compilerinfo.cpp" line="467"/>
<location filename="../compiler/compilerinfo.cpp" line="470"/>
<source>External ram size</source>
<translation>RAM大小</translation>
</message>
<message>
<location filename="../compiler/compilerinfo.cpp" line="468"/>
<location filename="../compiler/compilerinfo.cpp" line="471"/>
<source>Stack pointer initial value</source>
<translation></translation>
</message>
<message>
<location filename="../compiler/compilerinfo.cpp" line="469"/>
<location filename="../compiler/compilerinfo.cpp" line="472"/>
<source>External stack start location</source>
<translation></translation>
</message>
<message>
<location filename="../compiler/compilerinfo.cpp" line="470"/>
<location filename="../compiler/compilerinfo.cpp" line="473"/>
<source>Direct data start location</source>
<translation></translation>
</message>
<message>
<location filename="../compiler/compilerinfo.cpp" line="471"/>
<location filename="../compiler/compilerinfo.cpp" line="474"/>
<source>Code segment location</source>
<translation></translation>
</message>
<message>
<location filename="../compiler/compilerinfo.cpp" line="472"/>
<location filename="../compiler/compilerinfo.cpp" line="475"/>
<source>Code segment size</source>
<translation></translation>
</message>
@ -9116,7 +9122,7 @@ Are you really want to continue?</oldsource>
<translation>(-Wfatal-errors)</translation>
</message>
<message>
<location filename="../compiler/compilerinfo.cpp" line="196"/>
<location filename="../compiler/compilerinfo.cpp" line="199"/>
<source>Linker</source>
<translation></translation>
</message>
@ -9125,17 +9131,17 @@ Are you really want to continue?</oldsource>
<translation type="vanished">Objective-C程序 (-lobjc)</translation>
</message>
<message>
<location filename="../compiler/compilerinfo.cpp" line="199"/>
<location filename="../compiler/compilerinfo.cpp" line="202"/>
<source>Do not use standard system libraries (-nostdlib)</source>
<translation>使(-nostdlib)</translation>
</message>
<message>
<location filename="../compiler/compilerinfo.cpp" line="200"/>
<location filename="../compiler/compilerinfo.cpp" line="203"/>
<source>Do not create a console window (-mwindows)</source>
<translation>(-mwindows)</translation>
</message>
<message>
<location filename="../compiler/compilerinfo.cpp" line="201"/>
<location filename="../compiler/compilerinfo.cpp" line="204"/>
<source>Strip executable (-s)</source>
<translation>(-s)</translation>
</message>
@ -9156,7 +9162,7 @@ Are you really want to continue?</oldsource>
<translation type="vanished">-E)</translation>
</message>
<message>
<location filename="../compiler/compilerinfo.cpp" line="197"/>
<location filename="../compiler/compilerinfo.cpp" line="200"/>
<source>Use pipes instead of temporary files during compilation (-pipe)</source>
<translation>使(-pipe)</translation>
</message>
@ -9165,7 +9171,7 @@ Are you really want to continue?</oldsource>
<translation type="vanished">(-S)</translation>
</message>
<message>
<location filename="../settings.cpp" line="3232"/>
<location filename="../settings.cpp" line="3231"/>
<source>Confirm</source>
<translation></translation>
</message>
@ -9186,13 +9192,13 @@ Are you really want to continue?</oldsource>
<translation type="vanished">&lt;br /&gt;&lt;br /&gt;</translation>
</message>
<message>
<location filename="../settings.cpp" line="3222"/>
<location filename="../settings.cpp" line="3228"/>
<location filename="../settings.cpp" line="3221"/>
<location filename="../settings.cpp" line="3227"/>
<source>Compiler set not configuared.</source>
<translation></translation>
</message>
<message>
<location filename="../settings.cpp" line="3224"/>
<location filename="../settings.cpp" line="3223"/>
<source>Would you like Red Panda C++ to search for compilers in the following locations: &lt;BR /&gt;&apos;%1&apos;&lt;BR /&gt;&apos;%2&apos;? </source>
<translation>C++&lt;br /&gt;%1&lt;br /&gt;%2</translation>
</message>
@ -9559,8 +9565,9 @@ Are you really want to continue?</oldsource>
</message>
<message>
<location filename="../autolinkmanager.cpp" line="54"/>
<location filename="../autolinkmanager.cpp" line="68"/>
<location filename="../autolinkmanager.cpp" line="70"/>
<location filename="../autolinkmanager.cpp" line="89"/>
<location filename="../settings.cpp" line="3633"/>
<location filename="../widgets/ojproblemsetmodel.cpp" line="168"/>
<location filename="../widgets/ojproblemsetmodel.cpp" line="229"/>
<source>Can&apos;t open file &apos;%1&apos; for read.</source>
@ -9568,7 +9575,7 @@ Are you really want to continue?</oldsource>
</message>
<message>
<location filename="../autolinkmanager.cpp" line="59"/>
<location filename="../autolinkmanager.cpp" line="73"/>
<location filename="../autolinkmanager.cpp" line="75"/>
<location filename="../autolinkmanager.cpp" line="104"/>
<source>Can&apos;t open file &apos;%1&apos; for write.</source>
<translation>&apos;%1&apos;.</translation>
@ -9605,12 +9612,12 @@ Are you really want to continue?</oldsource>
<translation>%1</translation>
</message>
<message>
<location filename="../settingsdialog/environmentprogramswidget.cpp" line="74"/>
<location filename="../settingsdialog/environmentprogramswidget.cpp" line="75"/>
<source>Auto Detection Failed</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/environmentprogramswidget.cpp" line="75"/>
<location filename="../settingsdialog/environmentprogramswidget.cpp" line="76"/>
<source>Failed to detect terminal arguments pattern for %1.</source>
<translation> %1 </translation>
</message>
@ -10732,9 +10739,9 @@ Are you really want to continue?</oldsource>
<location filename="../settingsdialog/settingsdialog.cpp" line="148"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="152"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="156"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="160"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="164"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="167"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="159"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="162"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="165"/>
<source>Environment</source>
<translation></translation>
</message>
@ -10753,12 +10760,12 @@ Are you really want to continue?</oldsource>
<translation type="vanished"></translation>
</message>
<message>
<location filename="../settingsdialog/settingsdialog.cpp" line="160"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="159"/>
<source>Terminal</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/settingsdialog.cpp" line="164"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="162"/>
<source>Performance</source>
<translation></translation>
</message>
@ -10767,230 +10774,230 @@ Are you really want to continue?</oldsource>
<location filename="../mainwindow.cpp" line="2394"/>
<location filename="../mainwindow.cpp" line="9597"/>
<location filename="../mainwindow.cpp" line="9602"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="174"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="270"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="172"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="268"/>
<source>Compiler Set</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="2395"/>
<location filename="../mainwindow.cpp" line="9598"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="174"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="177"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="172"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="175"/>
<source>Compiler</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/settingsdialog.cpp" line="177"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="175"/>
<source>Auto Link</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="8489"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="180"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="221"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="227"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="230"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="238"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="264"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="178"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="219"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="225"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="228"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="236"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="262"/>
<source>General</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/settingsdialog.cpp" line="180"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="183"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="186"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="189"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="192"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="195"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="198"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="201"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="204"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="207"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="210"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="178"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="181"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="184"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="187"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="190"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="193"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="196"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="199"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="202"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="205"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="208"/>
<source>Editor</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/settingsdialog.cpp" line="183"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="181"/>
<source>Font</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/settingsdialog.cpp" line="186"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="184"/>
<source>Copy &amp; Export</source>
<translation>/</translation>
</message>
<message>
<location filename="../settingsdialog/settingsdialog.cpp" line="189"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="187"/>
<source>Color</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/settingsdialog.cpp" line="192"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="190"/>
<source>Code Completion</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/settingsdialog.cpp" line="195"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="193"/>
<source>Symbol Completion</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/settingsdialog.cpp" line="198"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="196"/>
<source>Snippet</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/settingsdialog.cpp" line="201"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="199"/>
<source>Auto Syntax Checking</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/settingsdialog.cpp" line="204"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="202"/>
<source>Tooltips</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/settingsdialog.cpp" line="207"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="205"/>
<source>Auto save</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/settingsdialog.cpp" line="210"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="208"/>
<source>Misc</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="8490"/>
<location filename="../mainwindow.cpp" line="8894"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="221"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="224"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="219"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="222"/>
<source>Program Runner</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="8893"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="224"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="222"/>
<source>Problem Set</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/settingsdialog.cpp" line="167"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="165"/>
<source>Folders / Restore Default Settings</source>
<translation> / </translation>
</message>
<message>
<location filename="../settingsdialog/settingsdialog.cpp" line="213"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="211"/>
<source>Custom C/C++ Keywords</source>
<translation>C/C++</translation>
</message>
<message>
<location filename="../settingsdialog/settingsdialog.cpp" line="213"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="218"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="211"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="216"/>
<source>Languages</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/settingsdialog.cpp" line="218"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="216"/>
<source>ASM Generation</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/settingsdialog.cpp" line="227"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="225"/>
<source>Debugger</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/settingsdialog.cpp" line="230"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="234"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="228"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="232"/>
<source>Code Formatter</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/settingsdialog.cpp" line="234"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="232"/>
<source>Program</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/settingsdialog.cpp" line="238"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="242"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="236"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="240"/>
<source>Tools</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/settingsdialog.cpp" line="242"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="240"/>
<source>Git</source>
<translation>Git</translation>
</message>
<message>
<location filename="../settingsdialog/settingsdialog.cpp" line="262"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="260"/>
<source>Project Options</source>
<translation></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="2280"/>
<location filename="../mainwindow.cpp" line="9603"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="264"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="267"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="270"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="273"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="276"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="280"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="284"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="287"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="291"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="297"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="262"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="265"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="268"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="271"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="274"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="278"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="282"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="285"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="289"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="295"/>
<source>Project</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/settingsdialog.cpp" line="267"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="265"/>
<source>Files</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/settingsdialog.cpp" line="273"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="271"/>
<source>Custom Compile options</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/settingsdialog.cpp" line="276"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="274"/>
<source>Directories</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/settingsdialog.cpp" line="280"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="278"/>
<source>Precompiled Header</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/settingsdialog.cpp" line="284"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="282"/>
<source>Makefile</source>
<translation>Makefile</translation>
</message>
<message>
<location filename="../settingsdialog/settingsdialog.cpp" line="287"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="285"/>
<source>Output</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/settingsdialog.cpp" line="291"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="289"/>
<source>DLL host</source>
<translation>DLL宿主</translation>
</message>
<message>
<location filename="../settingsdialog/settingsdialog.cpp" line="297"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="295"/>
<source>Version info</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/settingsdialog.cpp" line="358"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="356"/>
<source>Save Changes</source>
<translation></translation>
</message>
<message>
<location filename="../settingsdialog/settingsdialog.cpp" line="359"/>
<location filename="../settingsdialog/settingsdialog.cpp" line="357"/>
<source>There are changes in the settings, do you want to save them before swtich to other page?</source>
<translation></translation>
</message>

View File

@ -1923,6 +1923,10 @@
<source>Parsed argv array (represented in JSON):</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enable Virtual Terminal Sequence Support</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ExecutorProblemSetWidget</name>

View File

@ -38,7 +38,8 @@ using std::string;
enum RunProgramFlag {
RPF_PAUSE_CONSOLE = 0x0001,
RPF_REDIRECT_INPUT = 0x0002
RPF_REDIRECT_INPUT = 0x0002,
RPF_ENABLE_VIRTUAL_TERMINAL_PROCESSING = 0x0004
};
HANDLE hJob;
@ -98,11 +99,12 @@ void PauseExit(int exitcode, bool reInp) {
exit(exitcode);
}
string GetCommand(int argc,char** argv,bool &reInp,bool &pauseAfterExit) {
string GetCommand(int argc,char** argv,bool &reInp,bool &pauseAfterExit, bool &enableVisualTerminalSeq) {
string result;
int flags = atoi(argv[1]);
reInp = flags & RPF_REDIRECT_INPUT;
pauseAfterExit = flags & RPF_PAUSE_CONSOLE;
enableVisualTerminalSeq = flags & RPF_ENABLE_VIRTUAL_TERMINAL_PROCESSING;
for(int i = 3;i < argc;i++) {
// Quote the argument in case the path name contains spaces
result += string("\"") + string(argv[i]) + string("\"");
@ -219,8 +221,9 @@ int main(int argc, char** argv) {
bool reInp;
bool pauseAfterExit;
bool enableVisualTerminalSeq;
// Then build the to-run application command
string command = GetCommand(argc,argv,reInp, pauseAfterExit);
string command = GetCommand(argc,argv,reInp, pauseAfterExit, enableVisualTerminalSeq);
HANDLE hOutput = NULL;
if (reInp) {
SECURITY_ATTRIBUTES sa;
@ -237,7 +240,9 @@ int main(int argc, char** argv) {
} else {
FlushConsoleInputBuffer(GetStdHandle(STD_INPUT_HANDLE));
}
EnableVtSequence();
if (enableVisualTerminalSeq) {
EnableVtSequence();
}
HANDLE hSharedMemory=INVALID_HANDLE_VALUE;
int BUF_SIZE=1024;
@ -255,7 +260,7 @@ int main(int argc, char** argv) {
0,
BUF_SIZE);
} else {
printf("can't open shared memory!");
printf("can't open shared memory!\n");
}
// Save starting timestamp