Adjusted TDF mapping to use paths relative to the resources directory

This commit is contained in:
Nav
2023-08-20 15:34:44 +01:00
parent cd260cc763
commit e6cafdb3cf
2 changed files with 3 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
<?php <?php
/* /*
* Copies AVR8 target description files to AVR_TDF_DEST_FILE_PATH, in preparation for a build, and creates a JSON * Copies AVR8 target description files to AVR_TDF_DEST_FILE_PATH, in preparation for a build, and creates a JSON
* mapping of target signatures to file paths (relative to Bloom's binary). * mapping of target signatures to file paths (relative to Bloom's resource directory).
* The JSON mapping is compiled as a Qt resource and used for looking-up target description file paths, by target ID. * The JSON mapping is compiled as a Qt resource and used for looking-up target description file paths, by target ID.
* *
* This script should be run as part of the build process. * This script should be run as part of the build process.
@@ -18,7 +18,7 @@ if (empty($buildPath)) {
require_once __DIR__ . "/TargetDescriptionFiles/Factory.php"; require_once __DIR__ . "/TargetDescriptionFiles/Factory.php";
define("AVR_TDF_DEST_FILE_PATH", $buildPath . "/resources/TargetDescriptionFiles/AVR"); define("AVR_TDF_DEST_FILE_PATH", $buildPath . "/resources/TargetDescriptionFiles/AVR");
define("AVR_TDF_DEST_RELATIVE_FILE_PATH", "../resources/TargetDescriptionFiles/AVR"); define("AVR_TDF_DEST_RELATIVE_FILE_PATH", "TargetDescriptionFiles/AVR");
define("AVR_TDF_MAPPING_FILE_PATH", AVR_TDF_DEST_FILE_PATH . "/Mapping.json"); define("AVR_TDF_MAPPING_FILE_PATH", AVR_TDF_DEST_FILE_PATH . "/Mapping.json");
// Empty destination directory // Empty destination directory

View File

@@ -34,7 +34,7 @@ namespace Targets::Microchip::Avr::Avr8Bit::TargetDescription
const auto descriptionFileObject = descriptionFileObjectIt.value().toObject(); const auto descriptionFileObject = descriptionFileObjectIt.value().toObject();
const auto descriptionFilePath = QString::fromStdString( const auto descriptionFilePath = QString::fromStdString(
Services::PathService::applicationDirPath()) + "/" + descriptionFileObject.find("tdfPath")->toString(); Services::PathService::resourcesDirPath()) + "/" + descriptionFileObject.find("tdfPath")->toString();
Logger::debug("Loading AVR8 target description file: " + descriptionFilePath.toStdString()); Logger::debug("Loading AVR8 target description file: " + descriptionFilePath.toStdString());