#482 closed task (fixed)
Fix building on Windows in paths containing space characters
Reported by: | Philip Taylor | Owned by: | |
---|---|---|---|
Priority: | Nice to Have | Milestone: | |
Component: | Core engine | Keywords: | simple |
Cc: | Patch: |
Description
When located in a path containing spaces, the Windows builds fail with some error message. If I remember correctly, the problem is we pass an absolute path to the cxxtestgen.exe
tool but don't correctly put quotes around it. It should perhaps be fixed by modifying our patched copy of Premake, so that it emits correct .vcproj files with the necessary quotes.
Someone should verify that this is really the cause of the errors, and fix it.
Attachments (1)
Change History (7)
comment:1 by , 14 years ago
Keywords: | review added |
---|
by , 14 years ago
Attachment: | premake_relative_filepath.patch added |
---|
comment:2 by , 14 years ago
Alternatively, I guess you can also step through the path and prepend all the space characters with backslashes.
comment:3 by , 14 years ago
Huh, that cxxtestgen behaviour does seem a bit odd - I didn't realise it would do that. Relative paths sound like the best way to avoid the problem.
I think your patch won't quite work if the game is checked out into a path containing the string "source" (less common than spaces but not impossible :-) ). But it looks like path
is already of the form ../../../source/[...]
so we can just use that directly with no string manipulation.
comment:4 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:6 by , 8 years ago
Keywords: | review removed |
---|
Ugh, this is mildly infuriating. It looks like cxxtestgen expects forward slashes for directories like they would be in a Unix environment and treats backslashes as escape characters EXCEPT if the input string contains all backslashes in which case it automatically converts it properly. It also tokenizes on spaces, which I guess makes sense since it can take multiple input files, but this also means it completely ignores quotes so it's not even a quoting issue.
Anywho, I've modified vs.c to build a relative file path for the test files and that fixes the problem, but that means that if the folder structure ever changes, the corresponding line needs to be adjusted.