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

change the gdextension to use the build directly from the cli output #1

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Dracks
Copy link

@Dracks Dracks commented Jun 26, 2024

I don't know the windows version, and not sure if all linux distributions will use the same folder, but this should make life slightly easy, as it doesn't require any copy of files to update the dependencies.

Of course I need to change the readme, but first let me know if you like it or not (and if not, can you provide the why?)

Thanks!

@lorenalexm
Copy link
Owner

Thanks for submitting a PR! This will certainly help with iteration time over having to copy the files manually.

I have been wanting to create a script to do it on build, but SwiftPM doesn't offer that functionality yet. Having to run a .sh or .bat each time to copy them over was another undesired step.

In the future, after SwiftPM allows for script execution, I will evaluate a build step to do the copying. In the mean time though, LGTM! If you want to make the changes to the README I will get this merged afterwards. Thanks again!

@Dracks
Copy link
Author

Dracks commented Jun 27, 2024

If you wish to run an script after the build, maybe there is a better solution, last week I start using entr to watch for changes and build automatically (see https://github.com/Dracks/developer-tricks/blob/main/src/SUMMARY.md#build-and-run-on-change ) I didn't finish the script, as it doesn't detect new files and this. But this is common in nodejs, and helps a lot improve the performance of testing.

I won't have time to modify the readme until next week. If you wish to merge, you can merge it also, and we can modify the readme a posteriory (but usually is better to have all in one pack) Also, if you have some windows, can you test it and get the folder of the windows? (and if you have some linux that is not a fedora, can you check if the name is the same?)

@lorenalexm
Copy link
Owner

I was not familiar with entr, thank you for sharing! This may work well during development, but what I was hoping for were build phase scripts to be implemented into SwiftPM. There has been talk about it since 2021, but I have not seen it grow since. The thought was to automatically copy the library files after a build had succeeded without having to run any other commands or install dependencies to do so.

In the interim, I think running from the build folders would suffice. It would present the need for changes during distribution I believe, but I could very well be mistaken on that front.

For building both on Windows and Linux (Ubuntu), I use the .build\release\ path to obtain the compiled libraries. You can see for example in the workflows for this repository: https://github.com/lorenalexm/Starter-Kit-3D-Platformer-Swift/tree/main/.github/workflows

@Dracks
Copy link
Author

Dracks commented Jul 5, 2024

I was not familiar with entr, thank you for sharing! This may work well during development, but what I was hoping for were build phase scripts to be implemented into SwiftPM. There has been talk about it since 2021, but I have not seen it grow since. The thought was to automatically copy the library files after a build had succeeded without having to run any other commands or install dependencies to do so.

I found about entr last week, or so... before in a swift project, I had a small typescript code to do the watch and reload. Do you wish I also add the entr script I've got?

In the interim, I think running from the build folders would suffice. It would present the need for changes during distribution I believe, but I could very well be mistaken on that front.

For building both on Windows and Linux (Ubuntu), I use the .build\release\ path to obtain the compiled libraries. You can see for example in the workflows for this repository: https://github.com/lorenalexm/Starter-Kit-3D-Platformer-Swift/tree/main/.github/workflows

This also can be used for the debug build I think.

@Dracks
Copy link
Author

Dracks commented Jul 7, 2024

Hey, I just tested, I realise the project was not loading the source folder, and I needed to move the gdextension out of the source folder, but then everything worked fine.

Feel free to review and comment possible changes/improvements

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 this pull request may close these issues.

2 participants