Skip to content

Better templates file handling (copying, renaming, replacing content) #497

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

Merged
merged 4 commits into from
May 21, 2024

Conversation

dimitre
Copy link
Member

@dimitre dimitre commented May 21, 2024

PG usually copy files from templates folder to project
renames them (or rename in the copy process)
replaces content inside of them (opening and saving)

this PR creates an object to hold the input file path (template), output file path (project) and replacement pairs
so it can do a straight copy if no replacements are asked
or open the files from source (template)
replaces content
and write definitive content in the project folder.

it also address a problem in msys2 where std::filesystem is not considering overwrite_existing and throwing errors. it removes destination file before copying in msys2 only.

@dimitre dimitre merged commit 236309f into openframeworks:master May 21, 2024
3 checks passed
@dimitre dimitre deleted the msysfix branch May 21, 2024 19:58
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.

1 participant