> > Does there exist a simple way to run "diff", and to redirect
> > its output
> > into an file? A batch file? Platform independence would be
> > nice, of course.
> >
>
> Start the shell instead of diff:
>
> exec('cmd','/c diff -r dir1 dir2 > diff.txt');
>
> The /c tells the shell to exec
>
> This is all windows though.
>
Cross platform solution:
Uses process
...
p:=TProcess.Create(nil);
{$IFDEF WIN32}
p.CommandLine := 'cmd /c diff -r dir1 dir2 > diff.txt';
{$ENDIF}
{$IFDEF LINUX}
p.CommandLine := 'bash -c "diff -r dir1 dir2 > diff.txt"';
{$ENDIF}
p.Execute;
...
Ludo
Andrew Haines schrieb:
The best way I know is described here:
http://wiki.lazarus.freepascal.org/Executing_External_Programs#How_to_redirect_output_with_TProcess
Thanks for the link, I didn't know before that redirecting is such a big
issue.
RunCommandAndDirectOutput('diff', '-r dir1 dir2
On 16 July 2011 22:37, Hans-Peter Diettrich wrote:
>
> Does there exist a simple way to run "diff", and to redirect its output into
> an file? A batch file? Platform independence would be nice, of course.
Execute diff with the two parameters via TProcess. Read the output as
normal, and simply wri
Hi,
When I do a 'make clean' in my fpc trunk directory I get:
make[2]: Entering directory `/home/mattias/...fpc/packages/fcl-web'
./fpmake distclean ...
Invalid command-line argument at position 1: distclean
Usage: ...
The packages/fcl-web/fpmake is an old executable.
Is this normal?
What is th
On 17 Jul 2011, at 11:40, Mattias Gaertner wrote:
> When I do a 'make clean' in my fpc trunk directory I get:
>
> make[2]: Entering directory `/home/mattias/...fpc/packages/fcl-web'
> ./fpmake distclean ...
> Invalid command-line argument at position 1: distclean
> Usage: ...
>
> The packages/f
Ludo Brands wrote:
This is all windows though.
Cross platform solution:
Uses process
...
p:=TProcess.Create(nil);
{$IFDEF WIN32}
p.CommandLine := 'cmd /c diff -r dir1 dir2 > diff.txt';
{$ENDIF}
{$IFDEF LINUX}
p.CommandLine := 'bash -c "diff -r dir1 dir2 > diff.txt"';
{$ENDIF}
p.Execu
On Sun, 17 Jul 2011 11:48:11 +0200
Jonas Maebe wrote:
>
> On 17 Jul 2011, at 11:40, Mattias Gaertner wrote:
>
> > When I do a 'make clean' in my fpc trunk directory I get:
> >
> > make[2]: Entering directory `/home/mattias/...fpc/packages/fcl-web'
> > ./fpmake distclean ...
> > Invalid command
On 17.07.2011 08:08, Felipe Monteiro de Carvalho wrote:
Since we are talking about help stuff, (in another thread)
Do we have any tool to convert documentation written in javadoc style
(those comments in the source code) to fpdoc xml? I like to write my
documentation as comments...
I don't kno
Ludo Brands schrieb:
Start the shell instead of diff:
exec('cmd','/c diff -r dir1 dir2 > diff.txt');
The /c tells the shell to execute the command and exit immediately.
Thanks, this comes close to what I had in mind :-)
But it looks quite platform dependent, like my other idea of invoking
Ludo Brands schrieb:
Cross platform solution:
Uses process
...
p:=TProcess.Create(nil);
{$IFDEF WIN32}
p.CommandLine := 'cmd /c diff -r dir1 dir2 > diff.txt';
{$ENDIF}
{$IFDEF LINUX}
p.CommandLine := 'bash -c "diff -r dir1 dir2 > diff.txt"';
{$ENDIF}
p.Execute;
Looks like this could
Felipe Monteiro de Carvalho schrieb:
Since we are talking about help stuff, (in another thread)
Do we have any tool to convert documentation written in javadoc style
(those comments in the source code) to fpdoc xml? I like to write my
documentation as comments...
I've been working on PasDoc fo
On Sun, 17 Jul 2011, Felipe Monteiro de Carvalho wrote:
Since we are talking about help stuff, (in another thread)
Do we have any tool to convert documentation written in javadoc style
(those comments in the source code) to fpdoc xml? I like to write my
documentation as comments...
There is
> > Cross platform solution:
> >
> > Uses process
> >
> > ...
> > p:=TProcess.Create(nil);
> > {$IFDEF WIN32}
> > p.CommandLine := 'cmd /c diff -r dir1 dir2 > diff.txt'; {$ENDIF}
> > {$IFDEF LINUX}
> > p.CommandLine := 'bash -c "diff -r dir1 dir2 > diff.txt"';
> > {$ENDIF}
> > p.Execute;
>
> Might be safer to refer to sh rather than bash in this context, since
> Debian and Ubuntu are moving from Bash to Dash with sh being an
> appropriate symlink.
>
For this simple example it won't matter but for more complex ones using
certain shell specifics it is a must to launch the corre
On 17 Jul 2011, at 13:32, Ludo Brands wrote:
> For this simple example it won't matter but for more complex ones using
> certain shell specifics it is a must to launch the correct shell. The sh
> symlink can point to anything.
Yes, but bash may not even exist.
Jonas
___
On Sun, 17 Jul 2011 09:51:12 +, Mark Morgan Lloyd wrote about Re:
RE : RE : RE : [fpc-devel] Running programs with output redirection:
>Ludo Brands wrote:
[snip]
>> {$IFDEF LINUX}
>> p.CommandLine := 'bash -c "diff -r dir1 dir2 > diff.txt"';
>> {$ENDIF}
>> p.Execute;
>
>Might be safer to r
On Sun, Jul 17, 2011 at 6:48 AM, Jonas Maebe wrote:
>
> To be safe, you should always make distclean before updating from svn (even
> without fpmake, since directories or units may get moved, which then won't be
> cleaned anymore after the update). Now, for a while make distclean didn't
> work
On 07/17/11 05:50, Hans-Peter Diettrich wrote:
> Andrew Haines schrieb:
>
>> The best way I know is described here:
>> http://wiki.lazarus.freepascal.org/Executing_External_Programs#How_to_redirect_output_with_TProcess
>>
>
> Thanks for the link, I didn't know before that redirecting is such a bi
On 17 Jul 2011, at 16:43, Marcos Douglas wrote:
> On Sun, Jul 17, 2011 at 6:48 AM, Jonas Maebe
> wrote:
>>
>> To be safe, you should always make distclean before updating from svn (even
>> without fpmake, since directories or units may get moved, which then won't
>> be cleaned anymore after
On Sun, Jul 17, 2011 at 12:16 PM, Jonas Maebe wrote:
>
> On 17 Jul 2011, at 16:43, Marcos Douglas wrote:
>
>> On Sun, Jul 17, 2011 at 6:48 AM, Jonas Maebe
>> wrote:
>>>
>>> To be safe, you should always make distclean before updating from svn (even
>>> without fpmake, since directories or units
On 17 Jul 2011, at 17:46, Marcos Douglas wrote:
> I use fixes_2_4, not trunk. But what you said doesn't matter what
> source we use, right?
> I always used these scripts to compile:
> http://wiki.lazarus.freepascal.org/Installing_Lazarus#Compiling.2Finstalling_FPC_and_Lazarus_from_Sources_of_SVN_
On Sun, Jul 17, 2011 at 12:51 PM, Jonas Maebe wrote:
>
> On 17 Jul 2011, at 17:46, Marcos Douglas wrote:
>
>> I use fixes_2_4, not trunk. But what you said doesn't matter what
>> source we use, right?
>> I always used these scripts to compile:
>> http://wiki.lazarus.freepascal.org/Installing_Lazar
On 17 July 2011 12:28, Hans-Peter Diettrich wrote:
>
> I've been working on PasDoc for a while (PasDoc2), and ended up in adding
> documentation in external files. But inline documentation makes sense in the
> implementation section, which is not handled by PasDoc.
The tiOPF had all its document
On 17 July 2011 12:38, Michael Van Canneyt wrote:
>
> The entire purpose of fpdoc is not to have the documentation clutter up the
> sources.
Especially true if you start adding images or diagrams (graphs, UML,
screenshots etc) inside your documentation too.
Documentation belongs outside the sourc
25 matches
Mail list logo