1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-02-20 14:54:31 +01:00

Fixed "runtime.hardware.path" and "runtime.platform.path" values

"runtime.hardware.path" now contains the path to the hardware folder
of the currently selected board and "runtime.platform.path" the path
to the specific platform.

This should fix #1176 and #1761.
This commit is contained in:
Cristian Maglie 2014-01-05 12:42:27 +01:00
parent 618f537691
commit 4dc21cee6c
3 changed files with 5 additions and 2 deletions

View File

@ -1554,6 +1554,10 @@ public class Base {
Preferences.set("target_platform", targetPlatform.getId());
Preferences.set("board", targetBoard.getId());
File platformFolder = targetPlatform.getFolder();
Preferences.set("runtime.platform.path", platformFolder.getAbsolutePath());
Preferences.set("runtime.hardware.path", platformFolder.getParentFile().getAbsolutePath());
filterVisibilityOfSubsequentBoardMenus(targetBoard, 1);
onBoardOrPortChange();

View File

@ -231,7 +231,6 @@ public class Preferences {
// set some runtime constants (not saved on preferences file)
File hardwareFolder = Base.getHardwareFolder();
table.put("runtime.hardware.path", hardwareFolder.getAbsolutePath());
table.put("runtime.ide.path", hardwareFolder.getParentFile().getAbsolutePath());
table.put("runtime.ide.version", "" + Base.REVISION);

View File

@ -84,7 +84,7 @@ tools.avrdude.erase.pattern="{cmd.path}" "-C{config.path}" {erase.verbose} -p{bu
tools.avrdude.bootloader.params.verbose=-v -v -v -v
tools.avrdude.bootloader.params.quiet=-q -q
tools.avrdude.bootloader.pattern="{cmd.path}" "-C{config.path}" {bootloader.verbose} -p{build.mcu} -c{protocol} {program.extra_params} "-Uflash:w:{runtime.ide.path}/hardware/arduino/avr/bootloaders/{bootloader.file}:i" -Ulock:w:{bootloader.lock_bits}:m
tools.avrdude.bootloader.pattern="{cmd.path}" "-C{config.path}" {bootloader.verbose} -p{build.mcu} -c{protocol} {program.extra_params} "-Uflash:w:{runtime.platform.path}/bootloaders/{bootloader.file}:i" -Ulock:w:{bootloader.lock_bits}:m
# USB Default Flags