Closed paulstraw closed 1 year ago
Ehy! Yes, using the project name for the final pdx would be ideal.
The issue with it lies in the VSCode launch config file. It currently has no way of figuring out the name of the pdx it has to launch when debugging, and I'd prefer not to require the user to edit it.
Maybe we can fix that using an .env file, but that would mean having to maintain two files containing the project name.
Oh, I honestly hadn't even seen the VSC launch file. That looks super useful! I'll pull that into my own code and see if I can figure out a solution for the name issue that doesn't involve a separate .env
.
I messed around with this for a while locally. It seems like the easiest solution would be to make the bundlePDX
change I originally mentioned, and update the launch.json
to:
{
// …
"args": [
"${workspaceFolder}/${workspaceFolderBasename}.pdx"
],
// …
}
This assumes that the folder and my_project.nimble
names match, but so far that seems like it's a fairly reasonable assumption. Happy to open a PR if you're alright with this direction.
Yeah seems reasonable enough. We could even do an extra step to be 100% sure the name will always match and also name the PDX the same as the project containing folder.
👋 figured I'd start with some easy feedback. It's very possible I'm just missing something. Right now when I build, the output is a
playdate.pdx
. That means when I upload to device via the sim, other apps with that PDX name get overwritten.It seems like this should be easy to change by updating the
bundlePDX
build proc to useprojectName()
:This change seems to work well for me locally, but I'm not sure whether there's a specific reason it's set up like this, so I figured I'd open an issue instead of just PRing.