- DocC catalog (Sources/PlayDate/PlayDate.docc) with a curated landing page and a Getting Started article; swift-docc-plugin wired up for `swift package generate-documentation`, and a GitHub Pages deployment workflow renders docs on every push to main. - Examples/HelloPlaydate: a minimal game (bouncing box, crank needle, button handling, system menu item) whose build.sh compiles the game as a dylib and produces a runnable simulator .pdx via the SDK's pdc. Verified: the pdx builds and exports the eventHandler entry point. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
22 lines
687 B
Bash
Executable File
22 lines
687 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# Builds HelloPlaydate.pdx for the Playdate Simulator: compiles the game as
|
|
# a dylib, places it in the pdc source folder, and runs the SDK's pdc.
|
|
#
|
|
# Device builds need the Embedded Swift + ARM toolchain setup described in
|
|
# the repository README; this script covers the simulator only.
|
|
|
|
set -eu
|
|
cd "$(dirname "$0")"
|
|
|
|
sdk_path="${PLAYDATE_SDK_PATH:-$HOME/Developer/PlaydateSDK}"
|
|
|
|
swift build -c release
|
|
bin_path="$(swift build -c release --show-bin-path)"
|
|
cp "$bin_path/libpdex.dylib" Source/pdex.dylib
|
|
|
|
"$sdk_path/bin/pdc" Source HelloPlaydate.pdx
|
|
|
|
echo "Built HelloPlaydate.pdx — run it with:"
|
|
echo " open -a \"$sdk_path/bin/Playdate Simulator.app\" HelloPlaydate.pdx"
|