Lines 20-25
Link Here
|
20 |
#include <QApplication> |
20 |
#include <QApplication> |
21 |
#include <QSettings> |
21 |
#include <QSettings> |
22 |
|
22 |
|
|
|
23 |
#ifdef Q_OS_UNIX |
24 |
/* |
25 |
w00zy Thu Feb 23 11:22:40 MSK 2023 |
26 |
Linux does not encourage writing user data to the /usr directory. |
27 |
Perhaps you need to save temporary compiler files in your home directory? |
28 |
Possibly QStandardPaths::CacheLocation ? |
29 |
*/ |
30 |
#include <QStandardPaths> |
31 |
#endif |
32 |
|
23 |
#include "inodebugger.h" |
33 |
#include "inodebugger.h" |
24 |
#include "outpaneltext.h" |
34 |
#include "outpaneltext.h" |
25 |
#include "mainwindow.h" |
35 |
#include "mainwindow.h" |
Lines 39-45
Link Here
|
39 |
m_version = 0; |
49 |
m_version = 0; |
40 |
m_Ardboard = Uno; |
50 |
m_Ardboard = Uno; |
41 |
m_ArdboardList << "uno" << "megaADK" << "nano" << "diecimila" << "leonardo" << "custom"; |
51 |
m_ArdboardList << "uno" << "megaADK" << "nano" << "diecimila" << "leonardo" << "custom"; |
|
|
52 |
#ifndef Q_OS_UNIX |
42 |
m_buildPath = MainWindow::self()->getFilePath("data/codeeditor/buildIno"); |
53 |
m_buildPath = MainWindow::self()->getFilePath("data/codeeditor/buildIno"); |
|
|
54 |
#else |
55 |
m_buildPath = QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + "/codeeditor/buildIno"; |
56 |
#endif |
43 |
} |
57 |
} |
44 |
InoDebugger::~InoDebugger() {} |
58 |
InoDebugger::~InoDebugger() {} |
45 |
|
59 |
|
Lines 134-139
Link Here
|
134 |
QString cCachePath = m_buildPath+"/cache"; |
148 |
QString cCachePath = m_buildPath+"/cache"; |
135 |
|
149 |
|
136 |
QDir dir( m_buildPath ); |
150 |
QDir dir( m_buildPath ); |
|
|
151 |
|
152 |
#ifdef Q_OS_UNIX |
153 |
if( !QFile::exists( m_buildPath )) |
154 |
{ |
155 |
dir.mkpath( m_buildPath ); |
156 |
} |
157 |
#endif |
158 |
|
137 |
bool b = dir.cd( "build" ); |
159 |
bool b = dir.cd( "build" ); |
138 |
if( b ) dir.removeRecursively(); // Remove old files |
160 |
if( b ) dir.removeRecursively(); // Remove old files |
139 |
dir.mkpath( cBuildPath ); // Create build folder |
161 |
dir.mkpath( cBuildPath ); // Create build folder |