williamoberg / godot-dotnet-tools

Generate .NET related files for your Godot project
https://marketplace.visualstudio.com/items?itemName=woberg.godot-dotnet-tools
MIT License
9 stars 0 forks source link

Proposal: remove the "{EXECUTABLE PATH}" configuration #1

Closed joined72 closed 7 months ago

joined72 commented 7 months ago

First of all, let me sincerely congratulate with you for your really great work, thank you so much! ;)

I'll be happy to can help a bit with a simple idea to remove the "{EXECUTABLE PATH}" configuration step.

Why do not simple iterate from all running processes to find the Godot IDE and use it directly or, if isn't still executed, simply show an error message? This will speedup the configuration processes, ins't it? :)

PS: I would be really happy to could make a donation to you, can you tell me how to proceed, please?

williamoberg commented 7 months ago

@joined72 Thanks, I'm happy you find it useful!

Yes i agree, this would be very nice indeed. However, I tried getting this to work a while ago but couldn't really find a way to list the current processes. VsCode lets you manually pick from running processes when launching a debugger on attach, but that was the closest i came to a solution.

Maybe there is some existing npm package out there for more low level stuff like listing processes and such, but for a simple extension like this? i don't know..

Also, when creating the launch.json file, i just copy a preconfigured file from my package, so if I would somehow find the process, the launch file would have to be edited on runtime or before creating it.

So yeah.. great idea but unforunately it kind of feels a bit out of scope for this simple extension to be honest. But feel free to contribute if you would find a solution. And if you do, I apologise in advance for the source code, it was thrown together pretty fast.. javascript is not my strong suite.

joined72 commented 7 months ago

Yes, I understand, but isn't at least possible to insert the Godot path as an extension setting instead that as a project one? This will have 2 great benefits:

  1. adding this setting only one time (at the extension installation/configuration time)
  2. letting the project source code be machine/developer agnostic (currently if 2 developers shared the same project on a git repository, they must use the same Godot path)
williamoberg commented 7 months ago

Oh yeah, I have not thought of that! That is a pretty smart solution. I'll have a look at it when I get home from work.

joined72 commented 7 months ago

Happy to can help. Let me updated, please. ;)

williamoberg commented 7 months ago

I added this feature now! You should now be able to set the path in the settings 👍 I have tested it a bit and it seems to work, but please let me know if you have any issues. Check out the README for more info!

Thanks for the suggestion, cheers!

joined72 commented 7 months ago

Great, but this solve only the First issue, not the second. Isn't possibile use and Env variabile or a Symlink or other so to do not change the lanch.json file avoid the creation of conflict on Git repository for devs that used differenti Godot path?

Take a look here: https://stackoverflow.com/questions/29971572/how-do-i-add-environment-variables-to-launch-json-in-vscode

williamoberg commented 7 months ago

I'm not sure if VsCode can read env variables and such. Even if it could, it could probably complicate things for other users.

I mean, a simple solution to your problem is just to gitignore the launch file in your project, so everyone on your team has their own version.

Anyways, I don't think I'll make this feature more advanced than it currently is.

joined72 commented 7 months ago

Ok, thank you for your support.

williamoberg commented 7 months ago

No problem! I hope it will atleast be more useful than before :)

joined72 commented 7 months ago

Yes it is, definitively! :)