Skip to content

Commit

Permalink
Support launchSoundPath and contentWarning in pdxinfo
Browse files Browse the repository at this point in the history
  • Loading branch information
Nycto committed Feb 22, 2025
1 parent d748c52 commit ed9b994
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/playdate/build/pdxinfo.nim
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import std/[os, parsecfg, streams, strutils, strformat, times, osproc], nimbledu

type PdxInfo* = object
## Details used to populate the pdxinfo file
name*, author*, description*, bundleId*, imagePath*, version*, buildNumber*: string
name*, author*, description*, bundleId*, imagePath*, version*: string
buildNumber*, launchSoundPath*, contentWarning*, contentWarning2*: string

proc `$`*(pdx: PdxInfo): string =
for key, value in pdx.fieldPairs:
Expand Down
6 changes: 6 additions & 0 deletions tests/t_pdxinfo.nim
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ suite "Pdxinfo generation":
imagePath=launcher
version=1.2.3
buildNumber=20250216
launchSoundPath=path/to/launch/sound/file
contentWarning="Beware the Jabberwock, my son!"
contentWarning2="The jaws that bite, the claws that catch!"
""").parsePdx("[stream]")

check($pdx == """
Expand All @@ -41,6 +44,9 @@ suite "Pdxinfo generation":
imagePath=launcher
version=1.2.3
buildNumber=20250216
launchSoundPath=path/to/launch/sound/file
contentWarning=Beware the Jabberwock, my son!
contentWarning2=The jaws that bite, the claws that catch!
""".dedent())

test "Join together multiple pdxinfo objects":
Expand Down

0 comments on commit ed9b994

Please sign in to comment.