diff --git a/NEWS.md b/NEWS.md index e3ac23c6..7b2b4577 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,6 @@ +Version 0.12.3 For Dev-C++ 7 Beta + - enhancement: basic linux compatibility + Version 0.12.2 For Dev-C++ 7 Beta - enhancement: auto find compiler sets in the PATH - change: path for iconsets @@ -453,4 +456,4 @@ Version 0.2 - enhancement: run executable with parameters - add: widget for function tips - enhancement: options for editor tooltips - - fix: editor folder process error \ No newline at end of file + - fix: editor folder process error diff --git a/RedPandaIDE/compiler/compilermanager.cpp b/RedPandaIDE/compiler/compilermanager.cpp index bcd890de..60fb4244 100644 --- a/RedPandaIDE/compiler/compilermanager.cpp +++ b/RedPandaIDE/compiler/compilermanager.cpp @@ -211,6 +211,7 @@ void CompilerManager::run(const QString &filename, const QString &arguments, con } ExecutableRunner * execRunner; if (programHasConsole(filename)) { +#ifdef Q_WIN_OS int consoleFlag=0; if (redirectInput) consoleFlag |= RPF_REDIRECT_INPUT; @@ -224,6 +225,11 @@ void CompilerManager::run(const QString &filename, const QString &arguments, con } else { execRunner = new ExecutableRunner(filename,arguments,workDir); } +#else + QString newArguments = QString(" -e \"%1\" %2") + .arg(localizePath(filename)).arg(arguments); + execRunner = new ExecutableRunner("/usr/bin/x-terminal-emulator",newArguments,workDir); +#endif execRunner->setStartConsole(true); } else { execRunner = new ExecutableRunner(filename,arguments,workDir); diff --git a/RedPandaIDE/mainwindow.cpp b/RedPandaIDE/mainwindow.cpp index d70f2b60..c399e187 100644 --- a/RedPandaIDE/mainwindow.cpp +++ b/RedPandaIDE/mainwindow.cpp @@ -1662,7 +1662,12 @@ void MainWindow::debug() mDebugger->sendCommand("-enable-pretty-printing",""); mDebugger->sendCommand("-data-list-register-names",""); mDebugger->sendCommand("-gdb-set", "width 0"); // don't wrap output, very annoying +#ifdef Q_OS_WIN mDebugger->sendCommand("-gdb-set", "new-console on"); +#elif defined(Q_OS_LINUX) + mDebugger->sendCommand("tty", "/dev/pts/11"); +#else +#endif mDebugger->sendCommand("-gdb-set", "confirm off"); mDebugger->sendCommand("-gdb-set", "print repeats 0"); // don't repeat elements mDebugger->sendCommand("-gdb-set", "print elements 0"); // don't limit elements diff --git a/RedPandaIDE/parser/parserutils.cpp b/RedPandaIDE/parser/parserutils.cpp index cf8cea8a..f6789803 100644 --- a/RedPandaIDE/parser/parserutils.cpp +++ b/RedPandaIDE/parser/parserutils.cpp @@ -373,7 +373,7 @@ bool isSystemHeaderFile(const QString &fileName, const QSet &includePat #ifdef Q_OS_WIN isFullName = fileName.length()>2 && fileName[1]==':'; #else - isFullName = fileName.startsWith("\""); + isFullName = fileName.startsWith("/"); #endif if (isFullName) { // If it's a full file name, check if its directory is an include path diff --git a/RedPandaIDE/settings.cpp b/RedPandaIDE/settings.cpp index 2eca1b6d..362c4b2e 100644 --- a/RedPandaIDE/settings.cpp +++ b/RedPandaIDE/settings.cpp @@ -1167,8 +1167,11 @@ void Settings::Editor::doLoad() mRightEdgeLineColor = colorValue("right_edge_line_color",QColorConstants::Svg::yellow); //Font - //font +#ifdef Q_WIN_OS mFontName = stringValue("font_name","consolas"); +#else + mFontName = stringValue("font_name","Dejavu Sans Mono"); +#endif mFontSize = intValue("font_size",14); mFontOnlyMonospaced = boolValue("font_only_monospaced",true); @@ -1182,7 +1185,12 @@ void Settings::Editor::doLoad() mGutterAddLeadingZero = boolValue("gutter_add_leading_zero",true); mGutterLineNumbersStartZero = boolValue("gutter_line_numbers_start_zero",false); mGutterUseCustomFont = boolValue("gutter_use_custom_font",false); + +#ifdef Q_WIN_OS mGutterFontName = stringValue("gutter_font_name","consolas"); +#else + mGutterFontName = stringValue("gutter_font_name","Dejavu Sans Mono"); +#endif mGutterFontSize = intValue("gutter_font_size",14); mGutterFontOnlyMonospaced = boolValue("gutter_font_only_monospaced",true); @@ -3031,7 +3039,11 @@ void Settings::Executor::doLoad() mEnableCompetitiveCompanion = boolValue("enable_competivie_companion",true); mCompetivieCompanionPort = intValue("competitive_companion_port",10045); mIgnoreSpacesWhenValidatingCases = boolValue("ignore_spaces_when_validating_cases",false); +#ifdef Q_WIN_OS mCaseEditorFontName = stringValue("case_editor_font_name","consolas"); +#else + mCaseEditorFontName = stringValue("case_editor_font_name","Dejavu Sans Mono"); +#endif mCaseEditorFontSize = intValue("case_editor_font_size",10); mCaseEditorFontOnlyMonospaced = boolValue("case_editor_font_only_monospaced",true); } @@ -3194,7 +3206,11 @@ void Settings::Debugger::doLoad() { mEnableDebugConsole = boolValue("enable_debug_console",true); mShowDetailLog = boolValue("show_detail_log",false); +#ifdef Q_WIN_OS mFontName = stringValue("font_name","Consolas"); +#else + mFontName = stringValue("font_name","Dejavu Sans Mono"); +#endif mOnlyShowMono = boolValue("only_show_mono",true); mFontSize = intValue("font_size",12); mUseIntelStyle = boolValue("use_intel_style",true);