Skip to content

Commit 38b1914

Browse files
committed
fix: epmConfigRoot() doesn't find EPM configs when packaged installer stages them under ProgramData/epm_configs instead of a bin-relative configurations folder
epmConfigRoot() (added on main to replace the old hardcoded applicationDataPath()-based path) only checks for a configurations/ folder walking up from the binary directory. The Alpaca QIK package stages EPM's .ccnf files under %ProgramData%/Qualcomm/<Product>/epm_configs/ instead, so on a QIK-installed package the platform combo box and channel table in EPM.exe/EPMConfigurationEditor.exe/etc. are empty (<select a config file>) and the SPM Version/platform info panel never gets populated. Added ProgramData/epm_configs fallback candidates (checked for both Alpaca and QEPM branded installs) before falling back to the original bin-relative default.
1 parent 9e0bbac commit 38b1914

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

src/libraries/qcommon-console/ConsoleApplicationEnhancements.cpp

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,5 +307,37 @@ QString epmConfigRoot()
307307
dir.cdUp();
308308
}
309309

310+
// Packaged installers (e.g. Alpaca QIK) may stage EPM configuration files
311+
// under a shared ProgramData location instead of a bin-relative
312+
// "configurations" folder. Check known packaged locations before
313+
// falling back to the bin-relative default so installed packages don't
314+
// end up with an empty platform/config list.
315+
#ifdef Q_OS_WIN
316+
{
317+
const QStringList programDataCandidates = {
318+
"C:/ProgramData/Qualcomm/Alpaca/epm_configs",
319+
"C:/ProgramData/Qualcomm/QEPM/epm_configs"
320+
};
321+
for (const QString& candidate : programDataCandidates)
322+
{
323+
if (QDir(candidate).exists())
324+
return QDir::cleanPath(candidate);
325+
}
326+
}
327+
#endif
328+
#ifdef Q_OS_LINUX
329+
{
330+
const QStringList programDataCandidates = {
331+
"/var/lib/qcom/data/Alpaca/epm_configs",
332+
"/var/lib/qcom/data/QEPM/epm_configs"
333+
};
334+
for (const QString& candidate : programDataCandidates)
335+
{
336+
if (QDir(candidate).exists())
337+
return QDir::cleanPath(candidate);
338+
}
339+
}
340+
#endif
341+
310342
return QDir::cleanPath(QCoreApplication::applicationDirPath() + "/configurations");
311343
}

0 commit comments

Comments
 (0)