feat(cpn): save model images with models and settings (#7234)

This commit is contained in:
Neil Horne
2026-06-07 12:20:33 +10:00
committed by GitHub
parent d754abf2c1
commit a672c3c5c6
16 changed files with 343 additions and 71 deletions
+12
View File
@@ -232,6 +232,18 @@ int main(int argc, char *argv[])
registerOpenTxFirmwares();
SimulatorLoader::registerSimulators();
QTemporaryDir tempDir(QDir::tempPath() % "/etx-cpn-XXXXXX");
if (!tempDir.isValid()) {
qDebug() << "Unable to create application temporary directory";
gAppTempPath = "";
} else {
gAppTempPath = tempDir.path();
if (!QDir(gAppTempPath).mkdir("IMAGES"))
qDebug() << "Unable to create images cache directory:" << Helpers::getImagesCacheDir();
}
Profile & profile = g.currentProfile();
if (profile.fwType().isEmpty()){
profile.fwType(Firmware::getDefaultVariant()->getId());