Arduino Due custom platform for school and library installation
Exit the Arduino IDE.
Create a folder in the Arduino IDE installation folder named portable. This will cause the Arduino IDE to run in portable mode.
Start the Arduino IDE.
Tools > Board > Boards Manager
Wait for the download to finish.
Click on "Arduino SAM Boards".
Click "Install".
Wait for installation to finish.
Make your modifications to the Arduino SAM Boards hardware package installed at {Arduino IDE installation folder}/portable/packages/arduino/hardware/sam.
If necessary, configure File > Preferences to your liking.
Exit the Arduino IDE.
Zip the Arduino IDE installation folder.


When you run the Arduino IDE in portable mode it causes hardware packages installed via Boards Manager to be installed to the portable folder, rather than a folder outside the Arduino IDE installation folder. It also stores preferences.txt in the portable folder. This means you can supply a .zip file that contains a copy of the Arduino IDE with the customized Arduino SAM Boards package already installed.

By default it will also set the sketchbook folder to be there but that can be changed via File > Preferences > Sketchbook location if you like.