forked from qt-creator/qt-creator
McuSupport: default path for STM32CubeProgrammer for non-Windows
Task-number: QTCREATORBUG-25788 Change-Id: If29351eaee6f14315df2a2471d2de4c254ef1c8a Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
committed by
christiaan.janssen
parent
588ce3a390
commit
4616c134aa
@@ -194,11 +194,15 @@ static McuPackage *createRGLPackage()
|
|||||||
static McuPackage *createStm32CubeProgrammerPackage()
|
static McuPackage *createStm32CubeProgrammerPackage()
|
||||||
{
|
{
|
||||||
QString defaultPath = QDir::homePath();
|
QString defaultPath = QDir::homePath();
|
||||||
|
const QString cubePath = "/STMicroelectronics/STM32Cube/STM32CubeProgrammer/";
|
||||||
if (Utils::HostOsInfo::isWindowsHost()) {
|
if (Utils::HostOsInfo::isWindowsHost()) {
|
||||||
const QString programPath =
|
const QString programPath = findInProgramFiles(cubePath);
|
||||||
findInProgramFiles("/STMicroelectronics/STM32Cube/STM32CubeProgrammer/");
|
|
||||||
if (!programPath.isEmpty())
|
if (!programPath.isEmpty())
|
||||||
defaultPath = programPath;
|
defaultPath = programPath;
|
||||||
|
} else {
|
||||||
|
const QString programPath = QDir::homePath() + cubePath;
|
||||||
|
if (QFileInfo::exists(programPath))
|
||||||
|
defaultPath = programPath;
|
||||||
}
|
}
|
||||||
auto result = new McuPackage(
|
auto result = new McuPackage(
|
||||||
McuPackage::tr("STM32CubeProgrammer"),
|
McuPackage::tr("STM32CubeProgrammer"),
|
||||||
|
Reference in New Issue
Block a user