I'd like to have have an option to install a PDX via command line.
I can compile a project and run it in the Simulator via the command line via:
pdc src game.pdx
PlaydateSimulator game.pdx
But then I must use Device > Install Game To device for the final step. The most frustrating bit is that the folder selection window doesn't always remember my last folder.
This isn't terrible, but it does make on-device iteration longer
If a game is running in the Simulator you can press Cmd+U to upload the game to the device. The device needs to be unlocked, of course. This is how I install most things.
When you plug in an unlocked device the Simulator (at least on Mac) get a new toolbar icon. I believe I learned the keyboard shortcut from the menu on that button.
@SHiLLySiT Adding it directly to pdc would be unlikely due to all platform specific USB code that would have to be added to pdc. However, I could look at adding a flag to the Sim so if you passed the game path using the CLI with this flag it would upload it to the device.
Whaaaa?... I've been developing for playdate for a while now and it is my first time learning about pdutil. My bad for only referring to the "Inside Playdate" docs, and nothing else.
pdutil doesn't support the install command on Linux or Mac. However, adding it shouldn't be too hard...hum. Ya'll are making more work for me, not less.
In the meantime, this is the script I use to install and run a pdx to device from Mac.
It uses
Pdutil to reboot device to data disk mode
RSync to copy the pdx (efficiently; only changed files)
Diskutil to stop data disk mode and reboot the device to launcher as a side effect
Pdutil to start the game
If you want to use this, you'll have to remove some unrelated lines and adjust it a bit to your file structure