samdze / playdate-nim

Nim bindings with extra features for the Playdate SDK
66 stars 3 forks source link

CHANGE pdx name to use project name #54

Closed ninovanhooff closed 8 months ago

ninovanhooff commented 9 months ago

This changes the pdx name from a hardcoded "playdate.pdx" to "wheelsprung.pdx" in my case.

For me, this fixes the simulate task. But perhaps that's because I changed the pdx name somewhere else, too?

Note that the example project also uses workspaceFolderBaseName in launch.json: playdate_example/.vscode/launch.json

samdze commented 9 months ago

Yeah the build config may need a few fixes. For now the best choice is to name the build products the same as the project containing folder.

This is because it's the simplest way to make sure the VSCode launch config and the build process both align on the same (non static) pdx name.

ninovanhooff commented 8 months ago

Not sure I understand whether you agree with this change or that you want me to change something or abandon it.

This change will name the build product after the project folder, which is what you want, right?

samdze commented 8 months ago

Sorry! I agree with the idea, and most of the time your implementation would work, but there probably isn't a 100% guarantee the project name matches the project folder name.

It would be very uncommon to change folder name and lose sync, but I'd like to take this into consideration. system/nimscript's thisDir() or projectDir() can be used to achieve full coverage.

ninovanhooff commented 8 months ago

Done, note that

samdze commented 8 months ago

This should be good to go for now, other uses of projectName() are related to Nim caches or cleaning stuff. Thanks!