On Tue, 6 Jul 2010, Paul Ishenin wrote:

06.07.2010 21:01, Michael Van Canneyt wrote:
No, different shells is more likely to be the cause.
I made a small bat file:

@echo off
echo 1 %1
echo 2 %2

C:\>test -o"My Test Project.exe" C:\WINDOWS\TEMP\project1.lpr
1 -o"My Test Project.exe"
2 C:\WINDOWS\TEMP\project1.lpr

So quotes are passed right.

This is not bulletproof; Windows cmd may do the handling for the batch interpreter.

Do not use a batch file, but a plain executable to test:

program mytest;

Var
 i : integer;
begin
  For I:=1 to ParamCount do
   Writeln(I,' : ',Paramstr(i));
end.

and test then with

mytest -o"My Test Project.exe" C:\WINDOWS\TEMP\project1.lpr

Only then we'll know who does the interpreting of the quotes.

In case it still differs, this doesn't explain why Marco's example works fine.
He seems to be using the same executable. Maybe different windows versions
handle it differently...

Michael.
_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to