This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

The batch file problem

Hi,
In the project settings, I check the "Create batch file" opitons in the "Output" panel to generate a batch file, so that I may build the project without the Keil IDE.
But the keil is install in the dir "D:\Program Files\Keil" on my computer (there is a ' ' in the path string).
The last line of the batch file created by keil is
D:\Program Files\Keil\ARM\BIN40\fromelf.exe ".\output\test.axf" --i32combined --output ".\output\test.hex"
Note that there's no quote surrounding the path string. So I have to add the quotes to avoid the syntax error. It's very troublesome to editor the batch file every time after I rebuild the project in the Keil IDE (when a new source file is added, I have to rebuild it to update the batch file).

How can I solved this? Write another batch file to automaticly check and modify the batch file and finally open it?

Parents
  • No. Unix systems do support spaces, but most Unix-based development tools still don't handle them correctly anyway.

    And most Windows development tools are based on Unix tools.

    Talking about Windows and file name support - M$ have for ages had rules for how to write well-working programs. Like not expecting what characters are valid in a file name except the characters that are explicitly forbidden. Despite that, it took many years before M$ managed to follow that rule in their own programs. They often either failed to save/load with people used national characters, or could save/load but used a font that showed a black box instead of the national characters.

    The problems with spaces in file and directory names comes from todays use of graphical user interfaces, where spaces are natural to use. People who worked on the command line, either directly noticed issues with spaces and avoided using them, or learned to quote or escape their commands.

    From the problems with spaces in file and directory names, we have to assume that Keil staff forgets to install their tools or source code in paths with spaces and then verify that all generated files do quote or escape spaces as required.

Reply
  • No. Unix systems do support spaces, but most Unix-based development tools still don't handle them correctly anyway.

    And most Windows development tools are based on Unix tools.

    Talking about Windows and file name support - M$ have for ages had rules for how to write well-working programs. Like not expecting what characters are valid in a file name except the characters that are explicitly forbidden. Despite that, it took many years before M$ managed to follow that rule in their own programs. They often either failed to save/load with people used national characters, or could save/load but used a font that showed a black box instead of the national characters.

    The problems with spaces in file and directory names comes from todays use of graphical user interfaces, where spaces are natural to use. People who worked on the command line, either directly noticed issues with spaces and avoided using them, or learned to quote or escape their commands.

    From the problems with spaces in file and directory names, we have to assume that Keil staff forgets to install their tools or source code in paths with spaces and then verify that all generated files do quote or escape spaces as required.

Children