3 ms·
One slide mentioned having to fix hardcoded backslashes to forward slashes, and using path.join to make it portable. But on Windows, you can use forward slashe
by derekp7 13y ago
One slide mentioned having to fix hardcoded backslashes to forward slashes, and using path.join to make it portable. But on Windows, you can use forward slashes as well at the system call level. You only need to use backslashes on the command line, since many programs interpret a forward slash as the beginning of an argument.
- blt 13y agoYes, but that doesn't mean the original developers used them :) Some developers are shockingly Microsoft-centric...
- mhurron 13y agoYou mean like DirectX developers? Funny that really.
- flohofwoe 13y agoDoesn't have to be on purpose, for instance Visual Studio inserts backslashes in autocompleted C/C++ header paths by default (can be set to forward slash in the settings, but default is backslash). The case-insensitive filesystems on Windows and OSX are usually also a problem when moving games with hundred-thousands of source- and asset files over to a Linux build system.
- scrollaway 13y agoOSX/HFS has case insensitivity? Since when?
- flohofwoe 12y agoI was baffled too but that's like it is by default, on my MBP #include paths don't have to match case, just like on Windows. Or you can do a 'echo blub >bla.txt' followed by a 'echo blob BLA.txt' and there will only be a single file 'bla.txt' which contains the string 'blob'.
- derekp7 13y agoI meant they didn't have to use path.join, they could have changed them all to forward slashes and it would still work on both.