forked from qt-creator/qt-creator
McuSupport: 3rd party packages creation tests
Change-Id: I0f9ed6c49b28007c617627525fc081ae9152e3f1 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
committed by
Yasser Grimes
parent
a0af1fa927
commit
9b47b1575a
@@ -361,15 +361,12 @@ McuPackagePtr createStm32CubeProgrammerPackage(const SettingsHandler::Ptr &setti
|
||||
{
|
||||
FilePath defaultPath;
|
||||
const QString cubePath = "STMicroelectronics/STM32Cube/STM32CubeProgrammer";
|
||||
if (HostOsInfo::isWindowsHost()) {
|
||||
const FilePath programPath = findInProgramFiles(cubePath);
|
||||
if (!programPath.isEmpty())
|
||||
defaultPath = programPath;
|
||||
} else {
|
||||
const FilePath programPath = FileUtils::homePath() / cubePath;
|
||||
if (programPath.exists())
|
||||
defaultPath = programPath;
|
||||
}
|
||||
if (HostOsInfo::isWindowsHost())
|
||||
defaultPath = findInProgramFiles(cubePath) / "bin";
|
||||
else
|
||||
defaultPath = FileUtils::homePath() / cubePath / "bin";
|
||||
if (!defaultPath.exists())
|
||||
FilePath defaultPath = {};
|
||||
|
||||
const FilePath detectionPath = FilePath::fromUserInput(
|
||||
QLatin1String(Utils::HostOsInfo::isWindowsHost() ? "/bin/STM32_Programmer_CLI.exe"
|
||||
@@ -386,8 +383,7 @@ McuPackagePtr createStm32CubeProgrammerPackage(const SettingsHandler::Ptr &setti
|
||||
{}, // versions
|
||||
"https://www.st.com/en/development-tools/stm32cubeprog.html", // download url
|
||||
nullptr, // version detector
|
||||
true, // add to path
|
||||
"/bin" // relative path modifier
|
||||
true // add to path
|
||||
)};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user