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

pytmc template filename usage awkward on Windows #299

Closed
klauer opened this issue Nov 9, 2022 · 0 comments · Fixed by #320
Closed

pytmc template filename usage awkward on Windows #299

klauer opened this issue Nov 9, 2022 · 0 comments · Fixed by #320

Comments

@klauer
Copy link
Contributor

klauer commented Nov 9, 2022

os.pathsep is currently used to delimit the input file and the output file:

input_filename, output_filename = template.split(os.pathsep, 1)

This is : on Linux and ; on Windows.
Our ads-ioc Makefile only uses : (https://github.com/pcdshub/ads-ioc/blob/fc8a48a586751be00ba62b79c3a6cac7aface529/iocBoot/templates/Makefile.base#L101)

This is used with ads-deploy in Visual Studio, resulting in something like:

	--template "c:/Repos/ads-ioc/R0.6.0//iocBoot/templates/st.cmd.template":"st.cmd" \

My thought as to a fix:

I think we should standardize on : for all platforms.
On Windows, we can iteratively check for the longest match that is an existing file. The remainder is the output.
It'll be easier for us and users in the end... probably?

For now, this is patched locally/temporarily on plcprog-console

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.

1 participant