Pdutil on MacOS?

Hi, pardon the newbie question:

I see from the thread about using the windows sdk there is a “pdutil” binary you can use to install compiled .pdx files to the device. Is there no pdutil on MacOS or is it maybe just not included in SDK 0.10.1?

If you simply want to transfer a game to the playdate, on macOS the Playdate Simulator is used to do that ( Device > Upload game to device or ⌘U)

However if you want to push a game on the device just with a command line, I don’t think it is possible in the current SDK.

Fantastic! I didn’t notice that you could push from the sim – was expecting something more difficult :wink:


:wave: thanks had the same question !

While the SDK does not ship a ready-to-use pdutil on macOS, you can still automate the various steps. Use

echo "datadisk" > /dev/cu.usbmodem00000000001A1

to put the device into a mode where you can interact with its file system. Then, you can use

 rsync --delete -vr path/to/you.pdx /Volumes/PLAYDATE/Games/

to transfer your game to it (--delete removes stale files, e.g. when you renamed assets).
To put the device back into normal mode, eject the volume

diskutil eject /Volumes/PLAYDATE

before launching the game

echo "run /Games/your.pdx" > /dev/cu.usbmodem00000000001A1

In my project, I created a helper pdutil.py that recovers from various conditions, uses timeouts, forwards the logs to the terminal and even attempts to detect crashes so it presents the most-recent /crashlog.txt and /errorlog.txt in such a scenario.

I read somewhere that macOS will get pdutil sometime soon. If 0.10.2 won’t include it, I will generalize my tool and make it available more broadly.