xod icon indicating copy to clipboard operation
xod copied to clipboard

As a xoder preparing for workshop I want to install packages by double-clicking package files so that the full PC preparation cycle is clear

Open nkrkv opened this issue 6 years ago • 0 comments

Rationale

A XOD workshop or lesson teacher often meets confusion trying to prepare machines of all participants in advance. A typical scenario is when PC has XOD IDE installed without any hardware packages (like Arduino AVR). Trying to download and install the package during the lesson, often with a slow internet connection, burns precious time.

There are two common scenarios we should support:

  • The teacher asks the participants to prepare their personal laptops in advance
  • The teacher prepares several classroom PCs in series

User story

  • When I open the downloads page I see a few “Optional Packages”
  • I download and install the IDE as usual
  • I click the link named “Arduino AVR 1.8.3-1 (for Uno, Mega, Nano, Micro, Leonardo, and other ATmega AVR based boards)”
  • A file with .xodw extension is downloaded
  • I double click the file when the download is complete and XOD IDE opens
  • XOD IDE asks if I want to install the Arduino AVR 1.8.3-1 package to C:\Users\Bob\xod
  • I click OK and see a success message a few moments later

How to implement

We introduce a new file type, .xodw. It’s a zip-file with the custom extension. Inside the archive, we put a subset of workspace and a manifest file. For example:

manifest.json
__packages__/
  extra.txt
  packages/
    arduino/
      hardware/
        avr/
          1.6.23/
            ...
      tools/
        ...

The manifest.json contains the fields:

  • name — to present to a user
  • description — to present to a user
  • version — to present to a user
  • platform — to verify OS compatibility

Acceptance criteria

  • [ ] I can hit File → Add Workspace Package and select the .xodw file
  • [ ] A dialog box appears and I can confirm and has the package installed as described above
  • [ ] Contents of the current extra.txt and those inside the package get merged
  • [ ] An error is shown if I try to install a package made for another OS
  • [ ] File associations for *.xodw are created when building a distro

nkrkv avatar Feb 13 '19 11:02 nkrkv