change "ConsolePauser.exe" to "consolepauser.exe" in all codes

This commit is contained in:
Roy Qu 2022-12-30 09:06:39 +08:00
parent dd92cfa6da
commit babecbd3bc
6 changed files with 15 additions and 5 deletions

View File

@ -21,6 +21,7 @@
#include "executablerunner.h"
#include "ojproblemcasesrunner.h"
#include "utils.h"
#include "../systemconsts.h"
#include "../settings.h"
#include <QMessageBox>
#include <QUuid>
@ -250,7 +251,7 @@ void CompilerManager::run(
.arg(sharedMemoryId,localizePath(filename)).arg(arguments);
//delete when thread finished
execRunner = new ExecutableRunner(includeTrailingPathDelimiter(pSettings->dirs().appDir())+"ConsolePauser.exe",newArguments,workDir);
execRunner = new ExecutableRunner(includeTrailingPathDelimiter(pSettings->dirs().appDir())+CONSOLE_PAUSER,newArguments,workDir);
execRunner->setShareMemoryId(sharedMemoryId);
} else {
//delete when thread finished

View File

@ -3124,7 +3124,7 @@ void MainWindow::updateTools()
file.close();
if (item->pauseAfterExit) {
executeFile(
includeTrailingPathDelimiter(pSettings->dirs().appLibexecDir())+"ConsolePauser.exe",
includeTrailingPathDelimiter(pSettings->dirs().appLibexecDir())+CONSOLE_PAUSER,
" 1 \""+localizePath(file.fileName())+"\" ",
workDir, file.fileName());
} else {
@ -3137,7 +3137,7 @@ void MainWindow::updateTools()
} else {
if (item->pauseAfterExit) {
executeFile(
includeTrailingPathDelimiter(pSettings->dirs().appLibexecDir())+"ConsolePauser.exe",
includeTrailingPathDelimiter(pSettings->dirs().appLibexecDir())+CONSOLE_PAUSER,
" 1 \""+program+"\" "+params,
workDir, "");
} else {

View File

@ -321,10 +321,17 @@ void FormatterGeneralWidget::updateDemo()
Settings::CodeFormatter formatter(nullptr);
updateCodeFormatter(formatter);
#ifdef Q_OS_WIN
QByteArray newContent = runAndGetOutput("astyle.exe",
pSettings->dirs().appDir(),
formatter.getArguments(),
content);
#else
QByteArray newContent = runAndGetOutput(pSettings->environment().AStylePath(),
extractFileDir(pSettings->environment().AStylePath()),
formatter.getArguments(),
content);
#endif
ui->editDemo->document()->setText(newContent);
}

View File

@ -21,6 +21,7 @@
#define APP_SETTSINGS_FILENAME "redpandacpp.ini"
#ifdef Q_OS_WIN
#define CONSOLE_PAUSER "consolepauser.exe"
#define GCC_PROGRAM "gcc.exe"
#define GPP_PROGRAM "g++.exe"
#define GDB_PROGRAM "gdb.exe"
@ -36,6 +37,7 @@
#define CLANG_CPP_PROGRAM "clang++.exe"
#define LLDB_MI_PROGRAM "lldb-mi.exe"
#elif defined(Q_OS_LINUX)
#define CONSOLE_PAUSER "consolepauser"
#define GCC_PROGRAM "gcc"
#define GPP_PROGRAM "g++"
#define GDB_PROGRAM "gdb"

View File

@ -157,7 +157,7 @@ int main(int argc, char** argv) {
// First make sure we aren't going to read nonexistent arrays
if(argc < 4) {
printf("\n--------------------------------");
printf("\nUsage: ConsolePauser.exe <0|1> <shared_memory_id> <filename> <parameters>\n");
printf("\nUsage: consolepauser <0|1> <shared_memory_id> <filename> <parameters>\n");
printf("\n 1 means the STDIN is redirected by Red Panda C++; 0 means not\n");
PauseExit(EXIT_SUCCESS,false);
}

View File

@ -158,7 +158,7 @@ int main(int argc, char** argv) {
// First make sure we aren't going to read nonexistent arrays
if(argc < 4) {
printf("\n--------------------------------");
printf("\nUsage: ConsolePauser.exe <0|1> <shared_memory_id> <filename> <parameters>\n");
printf("\nUsage: consolepauser.exe <0|1> <shared_memory_id> <filename> <parameters>\n");
printf("\n 1 means the STDIN is redirected by Red Panda C++; 0 means not\n");
PauseExit(EXIT_SUCCESS,false);
}