Add command to install PDX on device

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 :confused:

1 Like

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.

https://sdk.play.date/inside-playdate/#_running_your_game_on_playdate_hardware

A command line option that can be integrated in the build process world be useful.

1 Like

Oh nice! That shortcut is certainly handy. Would be nice to have this documented, or show up in the menu item like other shortcuts.

EDIT: hmm...this doesn't seem to work on Windows. I tried both CTRL+U and ALT+U :frowning:

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.

I will add a hot key to the Windows Sim for the next release, thanks for pointing that out.

2 Likes

Awesome thank you! That will definitely help a ton🀘

A CLI option would still be preferable - is that something that will be added too?

@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.

3 Likes

Oh yeah that works! Definitely doesnt need to be in the pdc command. Thanks!