Opened 14 years ago

Closed 14 years ago

Last modified 8 years ago

#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)

premake_relative_filepath.patch (1.0 KB ) - added by Xin 14 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 by Xin, 14 years ago

Keywords: review added

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.

comment:2 by Xin, 14 years ago

Alternatively, I guess you can also step through the path and prepend all the space characters with backslashes.

comment:3 by Philip Taylor, 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 philip, 14 years ago

Resolution: fixed
Status: newclosed

(In [7625]) Fix building on Windows in paths containing space characters. Fixes #482, based on patch from Zoomastigophora.

comment:5 by (none), 14 years ago

Milestone: Unclassified

Milestone Unclassified deleted

comment:6 by sanderd17, 8 years ago

Keywords: review removed
Note: See TracTickets for help on using tickets.