Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use projectName() instead of static PDX name? #28

Closed
paulstraw opened this issue Nov 25, 2023 · 4 comments · Fixed by #31
Closed

Use projectName() instead of static PDX name? #28

paulstraw opened this issue Nov 25, 2023 · 4 comments · Fixed by #31

Comments

@paulstraw
Copy link
Contributor

paulstraw commented Nov 25, 2023

👋 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 use projectName():

exec(pdcPath() & " --verbose -sdkpath " & sdkPath() & " source " & projectName())

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.

@samdze
Copy link
Owner

samdze commented Nov 25, 2023

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.

@paulstraw
Copy link
Contributor Author

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.

@paulstraw
Copy link
Contributor Author

paulstraw commented Nov 26, 2023

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.

paulstraw added a commit to strawdynamics/pdbmp that referenced this issue Nov 26, 2023
@samdze
Copy link
Owner

samdze commented Nov 26, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants