- fix: shouldn't auto add /bin/gcc to compiler sets
- fix: if a dir duplicates in PATH, don't add it to compiler sets repeatedly - enhancement: add "--sanitize=address" to compile option in the Debug compiler set in Linux
This commit is contained in:
parent
3b0c8eccdb
commit
8732f7d37e
3
NEWS.md
3
NEWS.md
|
@ -3,6 +3,9 @@ Red Panda C++ Version 0.12.7
|
||||||
- fix: crash when close settings dialog in Ubuntu 20.04 (but we'll leak memory now...)
|
- fix: crash when close settings dialog in Ubuntu 20.04 (but we'll leak memory now...)
|
||||||
- enhancement: add raylib.h to autolink
|
- enhancement: add raylib.h to autolink
|
||||||
- fix: shouldn't generate default autolink settings in linux
|
- fix: shouldn't generate default autolink settings in linux
|
||||||
|
- fix: shouldn't auto add /bin/gcc to compiler sets
|
||||||
|
- fix: if a dir duplicates in PATH, don't add it to compiler sets repeatedly
|
||||||
|
- enhancement: add "--sanitize=address" to compile option in the Debug compiler set in Linux
|
||||||
|
|
||||||
Red Panda C++ Version 0.12.6
|
Red Panda C++ Version 0.12.6
|
||||||
- fix: heartbeat for gdb server async command shouldn't disable actions
|
- fix: heartbeat for gdb server async command shouldn't disable actions
|
||||||
|
|
|
@ -15,7 +15,7 @@ isEmpty(PREFIX) {
|
||||||
|
|
||||||
DEFINES += PREFIX=\\\"$${PREFIX}\\\"
|
DEFINES += PREFIX=\\\"$${PREFIX}\\\"
|
||||||
DEFINES += APP_NAME=\\\"$${APP_NAME}\\\"
|
DEFINES += APP_NAME=\\\"$${APP_NAME}\\\"
|
||||||
DEFINES += REDPANDA_CPP_VERSION=\\\"beta.0.12.6\\\"
|
DEFINES += REDPANDA_CPP_VERSION=\\\"beta.0.12.7\\\"
|
||||||
|
|
||||||
linux: {
|
linux: {
|
||||||
LINUX_DISTRO = $$system(cat /etc/issue)
|
LINUX_DISTRO = $$system(cat /etc/issue)
|
||||||
|
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
@ -26,6 +26,7 @@
|
||||||
#include <QStandardPaths>
|
#include <QStandardPaths>
|
||||||
#include <QScreen>
|
#include <QScreen>
|
||||||
#include <QDesktopWidget>
|
#include <QDesktopWidget>
|
||||||
|
#include <QHash>
|
||||||
|
|
||||||
const char ValueToChar[28] = {'0', '1', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h',
|
const char ValueToChar[28] = {'0', '1', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h',
|
||||||
'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r',
|
'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r',
|
||||||
|
@ -2408,6 +2409,11 @@ static void setDebugOptions(Settings::PCompilerSet pSet) {
|
||||||
pSet->setOption(pOption,'1');
|
pSet->setOption(pOption,'1');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef Q_OS_LINUX
|
||||||
|
pSet->setCustomCompileParams("--sanitize=address");
|
||||||
|
pSet->setUseCustomCompileParams(true);
|
||||||
|
#endif
|
||||||
|
|
||||||
// pOption = pSet->findOption("-static");
|
// pOption = pSet->findOption("-static");
|
||||||
// if (pOption) {
|
// if (pOption) {
|
||||||
// pSet->setOption(pOption,'1');
|
// pSet->setOption(pOption,'1');
|
||||||
|
@ -2502,13 +2508,20 @@ void Settings::CompilerSets::clearSets()
|
||||||
void Settings::CompilerSets::findSets()
|
void Settings::CompilerSets::findSets()
|
||||||
{
|
{
|
||||||
clearSets();
|
clearSets();
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
addSets(includeTrailingPathDelimiter(mSettings->dirs().appDir())+"MinGW32"+QDir::separator()+"bin");
|
addSets(includeTrailingPathDelimiter(mSettings->dirs().appDir())+"MinGW32"+QDir::separator()+"bin");
|
||||||
addSets(includeTrailingPathDelimiter(mSettings->dirs().appDir())+"MinGW64"+QDir::separator()+"bin");
|
addSets(includeTrailingPathDelimiter(mSettings->dirs().appDir())+"MinGW64"+QDir::separator()+"bin");
|
||||||
|
#endif
|
||||||
|
|
||||||
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
||||||
QString path = env.value("PATH");
|
QString path = env.value("PATH");
|
||||||
QStringList pathList = path.split(PATH_SEPARATOR);
|
QStringList pathList = path.split(PATH_SEPARATOR);
|
||||||
|
QSet<QString> searched;
|
||||||
foreach (const QString& s, pathList){
|
foreach (const QString& s, pathList){
|
||||||
|
if (searched.contains(s))
|
||||||
|
continue;;
|
||||||
|
searched.insert(s);
|
||||||
|
if (s!="/bin") // /bin/gcc is symbolic link to /usr/bin/gcc
|
||||||
addSets(s);
|
addSets(s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2581,12 +2594,19 @@ void Settings::CompilerSets::loadSets()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (QMessageBox::warning(nullptr,QObject::tr("Confirm"),
|
#ifdef Q_OS_WIN
|
||||||
QObject::tr("Compiler set not configuared.")
|
QString msg = QObject::tr("Compiler set not configuared.")
|
||||||
+"<br /><br />"
|
+"<br /><br />"
|
||||||
+QObject::tr("Would you like Red Panda C++ to search for compilers in the following locations: <BR />'%1'<BR />'%2'? ")
|
+QObject::tr("Would you like Red Panda C++ to search for compilers in the following locations: <BR />'%1'<BR />'%2'? ")
|
||||||
.arg(includeTrailingPathDelimiter(pSettings->dirs().appDir()) + "MinGW32")
|
.arg(includeTrailingPathDelimiter(pSettings->dirs().appDir()) + "MinGW32")
|
||||||
.arg(includeTrailingPathDelimiter(pSettings->dirs().appDir()) + "MinGW64"),
|
.arg(includeTrailingPathDelimiter(pSettings->dirs().appDir()) + "MinGW64");
|
||||||
|
#else
|
||||||
|
QString msg = QObject::tr("Compiler set not configuared.")
|
||||||
|
+"<br /><br />"
|
||||||
|
+QObject::tr("Would you like Red Panda C++ to search for compilers in PATH?");
|
||||||
|
#endif
|
||||||
|
if (QMessageBox::warning(nullptr,QObject::tr("Confirm"),
|
||||||
|
msg,
|
||||||
QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) {
|
QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -234,11 +234,16 @@ void CompilerSetOptionWidget::saveCurrentCompilerSet()
|
||||||
|
|
||||||
void CompilerSetOptionWidget::on_btnFindCompilers_pressed()
|
void CompilerSetOptionWidget::on_btnFindCompilers_pressed()
|
||||||
{
|
{
|
||||||
if (QMessageBox::warning(this,tr("Confirm"),
|
#ifdef Q_OS_WIN
|
||||||
tr("Red Panda C++ will clear current compiler list and search"
|
QString msg = tr("Red Panda C++ will clear current compiler list and search"
|
||||||
" for compilers in the following locations:\n '%1'\n'%2'\nAre you really want to continue?")
|
" for compilers in the following locations:<br /> '%1'<br /> '%2'<br />Are you really want to continue?")
|
||||||
.arg(includeTrailingPathDelimiter(pSettings->dirs().appDir()) + "MinGW32")
|
.arg(includeTrailingPathDelimiter(pSettings->dirs().appDir()) + "MinGW32")
|
||||||
.arg(includeTrailingPathDelimiter(pSettings->dirs().appDir()) + "MinGW64"),
|
.arg(includeTrailingPathDelimiter(pSettings->dirs().appDir()) + "MinGW64");
|
||||||
|
#else
|
||||||
|
QString msg = tr("Red Panda C++ will clear current compiler list and search"
|
||||||
|
" for compilers in the the PATH. <br />Are you really want to continue?");
|
||||||
|
#endif
|
||||||
|
if (QMessageBox::warning(this,tr("Confirm"),msg,
|
||||||
QMessageBox::Ok | QMessageBox::Cancel) != QMessageBox::Ok )
|
QMessageBox::Ok | QMessageBox::Cancel) != QMessageBox::Ok )
|
||||||
return;
|
return;
|
||||||
pSettings->compilerSets().clearSets();
|
pSettings->compilerSets().clearSets();
|
||||||
|
|
Loading…
Reference in New Issue