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

paths with spaces do not work for settings in build.properties #3

Open
nikitalita opened this issue May 5, 2021 · 1 comment
Open

Comments

@nikitalita
Copy link

Using paths with spaces in the *.include or *.cc variables will result in the path being used with unescaped spaces in the various commands and it will be treated as multiple paths (i.e. "C:/Program Files/jdk11/include" = "C:/Program", "Files/jdk11/include"). This results in commands failing (i.e. the jorgan-creative build fails with win.include not found - please check your build.properties).

This is particularly a pain if you try to target a system-installed JDK on Windows, since by default it installs in Program Files. I'm not that familiar with Ant, so I'm not really sure how to fix this issue; Using escaped quotes in either the commands that use these variables or the variables themselves does not work, neither does escaping the space, etc..

This stackoverflow seems suggest a fix for the issue, but I'm not sure how to apply it to the build files: https://stackoverflow.com/questions/10709314/ant-file-set-using-path-with-spaces-in-it

@svenmeier
Copy link
Owner

I cannot reproduce your findings, to me the usage of these variables is correct:

<exec failonerror="true" executable="${win.cc}">
  <arg value="-std=c99" />
  <arg value="-I${win.include}" />

For a test I've added spaces to unix.cc and unix.include and some matching symlinks: the build still works fine here. I don't have a Windows system available to verify this, but I don't see why it shouldn't work on Windows too.

Maybe the is just failing for you? Add an echo before it to make sure the value is correct:

<echo message="${win.include}'" />  	
<fail message="win.include not found - please check your build.properties">

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

No branches or pull requests

2 participants