Skip to content

"Export Compiled Binary" saves binary under temporary folder when using an example sketch #1506

@Jens869

Description

@Jens869

Describe the problem

When the user has never saved a new sketch, it is staged under the system temporary folder at a location something like:

C:\Users\per\AppData\Local\Temp\.arduinoIDE-unsaved2023517-20504-23cc4o.42k1f\Foo

In addition to the sketches created via File > New Sketch, example sketches are opened as a new sketch in order to prevent users from making inadvertent changes to the "known good" example code files.

🐛 If a "Export Compiled Binary" operation is done when a example sketch is open in the IDE, the binary is saved under that "staged" sketch folder under the system temporary folder.

To reproduce

  1. Use Library Manager to install the "ArduinoGraphics" library.
  2. Select File > Examples > ArduinoGraphics > ASCIIDraw from the Arduino IDE menus.
  3. Select Sketch > Export Compiled Binary from the Arduino IDE menus.
  4. Wait for the "Export Compiled Binary" operation to complete successfully.
  5. Select Sketch > Show Sketch Folder from the Arduino IDE menus.

🐛 The binary is saved somewhere like this:

C:\Users\per\AppData\Local\Temp\.arduinoIDE-unsaved2023517-20504-j7d70c.9dhkj\ASCIIDraw\build\arduino.avr.uno

Instead of the more convenient location:

C:\Users\per\Documents\Arduino\libraries\ArduinoGraphics\examples\ASCIIDraw\build\arduino.avr.uno

Expected behavior

Exported binary is saved in the source example sketch folder.

Arduino IDE version

2.0.0

Operating system

macOS

Operating system version

MacOS 11.6.8 Intel

Additional context

Arduino IDE 1.x has the expected behavior.

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details

Metadata

Metadata

Assignees

Labels

conclusion: declinedWill not be worked ontopic: codeRelated to content of the project itselftype: imperfectionPerceived defect in any part of project

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions