Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There's a good chance that this is because the quotes aren't making it through (they may need to be escaped, see the <a href="http://doc.trolltech.com/4.6/qprocess.html#start" rel="nofollow noreferrer">docs for QProcess::start()</a>). </p> <p>cmd.exe treats equals signs in command line options that aren't quoted as a separator between arguments similar to a space or tab. Just one of very many bits of oddness in Windows cmd scripting:</p> <pre><code>C:\test&gt;type c:\util\cmdechoargs.cmd @echo off setlocal set /a i=0 echo args[*]: %* :loop if {%1} == {} goto :eof echo argv[%i%]: %1 set /a i=%i% + 1 shift goto :loop C:\test&gt;cmdechoargs testing=123 args[*]: testing=123 argv[0]: testing argv[1]: 123 C:\test&gt;cmdechoargs "testing=123" args[*]: "testing=123" argv[0]: "testing=123" </code></pre> <p>The best documentation I've come across for how to handle command line arguments in Windows cmd scripts is <a href="http://rads.stackoverflow.com/amzn/click/1578700477" rel="nofollow noreferrer">Tim Hill's "Windows NT Shell Scripting"</a> - get one used for only a penny!</p> <p>Based on the examples given in your update, I think you might want your options that have equals signs in them to have quotes embedded inside them:</p> <pre><code>"\"--variant=%1-%2\"" "\"--source-release=%1\"" </code></pre> <hr> <h2>Edit -- new material</h2> <p>The following script has a routine that will strip the quotes off of an argument passed to a cmd script. The routine returns the 'dequoted' argument in an environment variable named <code>RET</code> using an idiom/technique from Tim Hill's book I mentioned above. I stole some of the dequoting code from an example here: <a href="http://ss64.com/nt/syntax-esc.html" rel="nofollow noreferrer">http://ss64.com/nt/syntax-esc.html</a>, but made it a bit more robust to handle empty quotes.</p> <pre><code>@echo off setlocal set /a i=0 echo args[*]: %* :loop if {%1} == {} goto :eof echo. echo argv[%i%]: %1 call :dequote %1 set dequoted_arg=%RET% echo argv[%i%] ^(dequoted^): %dequoted_arg% set /a i=%i% + 1 shift goto :loop :dequote setlocal SET _string=###%1### if {%_string%} == {######} goto :dequote_empty if {%_string%} == {###""###} goto :dequote_empty SET _string=%_string:"###=% SET _string=%_string:###"=% SET _string=%_string:###=% goto :dequote_done :dequote_empty set _string= :dequote_done endlocal &amp; (set RET=%_string%) &amp; goto :eof </code></pre> <p>This kind of thing is why you want to avoid (in my opinion) cmd scripts except for the simplest of tasks. But, I hope this helps you pass unquoted arguments to your scons process through your batch file.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload