RRUZ / wmi-delphi-code-creator

Generate Object Pascal (Delphi, FPC), Oxygene, C++ and C# code to access the WMI
https://theroadtodelphi.wordpress.com/
182 stars 44 forks source link

command line #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I am using  XP and XE
The program dose not generate exe
1. when compiled it dose not return ANY dos error
to screen.
2. Compilation is NOT done although the path is correct
I thought to add " like
     if CreateProcess(nil, PChar('"'+lpCommandLine+'"'), @lpPipeAttributes,
but it did not help
the dos command dose not find the long name path i guess
But worse error do NOT return to screen.

Original issue reported on code.google.com by limel...@gmail.com on 16 Jun 2011 at 6:55

GoogleCodeExporter commented 9 years ago
Sorry but i cannot reproduce your issue in the current version 1.1.2.106, can 
you test the last version of the tool to check if the issue still exist?

Original comment by Rodrigo.Ruz.V@gmail.com on 30 Jun 2011 at 2:35

GoogleCodeExporter commented 9 years ago
i SEND YOU A PICTURE

Original comment by limel...@gmail.com on 30 Jun 2011 at 3:00

Attachments:

GoogleCodeExporter commented 9 years ago
Actually  CaptureConsoleOutput(CompilerName + ' ' + Format(' -B -CC  %s', 
[ProjectFile]), Console);
has every input ok but i guess it dose not compile
tried to compile with 6 and xe may be security of my computer?

Original comment by limel...@gmail.com on 30 Jun 2011 at 3:10

GoogleCodeExporter commented 9 years ago
Thanks for the picture. can you execute the same command which is shown in the 
screen (C:\Program Files\CodeGear\RAD Studio\8.0\bin\Dcc32.exe  -B -CC 
C:\Users\Dexter\AppData\Local\Temp\WMITemp_20110630175513046.dpr  ) from the 
cmd.exe and see what happen?

Original comment by Rodrigo.Ruz.V@gmail.com on 30 Jun 2011 at 3:12

GoogleCodeExporter commented 9 years ago
How can i help?
Send me a version you think will work ?

limelect AT gmail dot com

Original comment by limel...@gmail.com on 30 Jun 2011 at 3:12

GoogleCodeExporter commented 9 years ago
If i execute (in my case) with quotes C:\Program Files\Embarcadero\RAD 
Studio\8.0\bin\Dcc32.exe >>>>>it finds ok

project file i OK and there
'C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\WMITemp_20110630180233953.dpr' 
but going to 
CaptureConsoleOutput(const lpCommandLine  >> F7 took info 

C:\Program Files\Embarcadero\RAD Studio\8.0\bin\Dcc32.exe  -B -CC  
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\WMITemp_20110630182420171.dpr
i got this string it dose not work on cmd screen with or without quot
File dpr is there

The picture is with and without quot i hop you can see

Original comment by limel...@gmail.com on 30 Jun 2011 at 3:32

Attachments:

GoogleCodeExporter commented 9 years ago
you are passing a wrong filename to the dcc32 please fix the extension ("dp") 
of the dpr file and check again. 

Original comment by Rodrigo.Ruz.V@gmail.com on 30 Jun 2011 at 3:42

GoogleCodeExporter commented 9 years ago
Ok now it works
This is the solution it is not the best make better
I found in my cs i have to CD (change directory) to delphi dir
So those are the lines

  Console.Add('');
  Console.Add('CD '+ExtractFilePath(CompilerName));
 // CaptureConsoleOutput(CompilerName + ' ' + Format(' -B -CC  %s', [ProjectFile]), Console);
  CaptureConsoleOutput('Dcc32.exe' + ' ' + Format(' -B -CC  %s', [ProjectFile]), Console);

You have to do it better
PLZ tell me whene you will have a new one
Thanks www.limelect.com 

Original comment by limel...@gmail.com on 30 Jun 2011 at 4:02

GoogleCodeExporter commented 9 years ago
The dp is copy mistake it IS DPR !!! sorry

Original comment by limel...@gmail.com on 30 Jun 2011 at 4:03

GoogleCodeExporter commented 9 years ago
I'm glad you which you find a solution. But I still concern about the initial 
issue. can you sende me a picture with the execution of the next command from 
the cmd.exe

"C:\Program Files\Embarcadero\RAD Studio\8.0\bin\Dcc32.exe"  -B -CC  
"C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\WMITemp_20110630182420171.dpr"

Thanks.

Original comment by Rodrigo.Ruz.V@gmail.com on 30 Jun 2011 at 4:09

GoogleCodeExporter commented 9 years ago
No need it works
With quot on each section !!!

Original comment by limel...@gmail.com on 30 Jun 2011 at 4:16

GoogleCodeExporter commented 9 years ago
I wander what different from your PC?
mine is XP is this the only reason ?

Original comment by limel...@gmail.com on 30 Jun 2011 at 4:17

GoogleCodeExporter commented 9 years ago
Send me the changes you do to
 CaptureConsoleOutput(CompilerName + ' ' + Format(' -B -CC  %s', [ProjectFile]), Console);
i will add and try

Original comment by limel...@gmail.com on 30 Jun 2011 at 4:19

GoogleCodeExporter commented 9 years ago
I guess you have the same solution

  CaptureConsoleOutput('"'+CompilerName+'"' + ' ' + Format(' -B -CC  "%s"', [ProjectFile]), Console);
 But the dos screen dose not close

Original comment by limel...@gmail.com on 30 Jun 2011 at 4:25

GoogleCodeExporter commented 9 years ago
Sorry my mistake it is the program execute
every thing is ok
Thanks
good luck

Original comment by limel...@gmail.com on 30 Jun 2011 at 4:28

GoogleCodeExporter commented 9 years ago
I have done many tests in Windows XP, 7 , 2003 y 2008  and in all versions 
calling the delphi compiler from the tool works ok. so the Windows XP is not a 
problem (Maybe can be related to your system configuration, can you test in 
another machine? ),  if you show me a picture with the results of execute that 
line from the cmd.exe

"C:\Program Files\Embarcadero\RAD Studio\8.0\bin\Dcc32.exe"  -B -CC  
"C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\WMITemp_20110630182420171.dpr"

will help me to discard some possibles causes.

Original comment by Rodrigo.Ruz.V@gmail.com on 30 Jun 2011 at 4:31

GoogleCodeExporter commented 9 years ago
I do not have another machine here
I am with my lap top
I will be at work on Sunday where i can test
>>> If i want forget 

Original comment by limel...@gmail.com on 30 Jun 2011 at 4:46

GoogleCodeExporter commented 9 years ago
This what happens

Original comment by limel...@gmail.com on 30 Jun 2011 at 4:50

Attachments:

GoogleCodeExporter commented 9 years ago
Ok i tried it on another computer and it works
The one that works is XP service pack 2
My lap top is XP service pack 3
Dose it make sense?
In any case with and without quote it works
as i said so may be to be on the safe side
put quotes
P.S if no ini file there is an error
so you should initialize an ini as if it was there

Good luck shlomo
Happy to help any time

Original comment by limel...@gmail.com on 3 Jul 2011 at 5:23

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r11.

Original comment by Rodrigo.Ruz.V@gmail.com on 4 Jul 2011 at 6:02