Fp-Doc. Question No.1

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Fp-Doc. Question No.1

Tiziano - Mekar Srl -

I'm using Windows XP (HE) Lazarus 0.9.14 with FPC 2.0.2

After reading the recent threads in the Lazarus mailing list, I realized
that I should study how Fp-Doc works.

this is the first command I tried:

C:\lazarus\pp\bin\i386-win32\fpdoc --package=test --input=test.pas

and this was the output:

FPDoc - Free Pascal Documentation Tool
(c) 2000 - 2003 Areca Systems GmbH / Sebastian Guenther,
[hidden email]

Writing 112 pages...
Could not create file "test\index-1.html": Access denied
Could not create file "test\index-2.html": Access denied
Could not create file "test\versione.html": Access denied
.......
Could not create file "test\arc_sen.html": Access denied
Could not create file "test\arc_cos.html": Access denied
Done.

I looked in the fp-doc sources and tried to fix the problem:

patch in dw_html.pp:
--------------------------
//  if not FileExists(Path) then old
  if not DirectoryExists(Path) then new
  begin
    CreatePath(Path);
    MkDir(Path);
  end;

now it is working ok. But I don't know if the reason is:

a) Fileexists non more works on directories, only on files
b) Fileexists works on Linux but not on Windows

someone could give me an advice?

This is the first of a series of Fp-Doc questions...

bye
tiziano



###########################################

This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange.
For more information, connect to http://www.f-secure.com/
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Fp-Doc. Question No.1

Vincent Snijders
Tiziano - Mekar Srl - schreef:

> I'm using Windows XP (HE) Lazarus 0.9.14 with FPC 2.0.2
>
> After reading the recent threads in the Lazarus mailing list, I realized
> that I should study how Fp-Doc works.
>
> this is the first command I tried:
>
> C:\lazarus\pp\bin\i386-win32\fpdoc --package=test --input=test.pas
>
> and this was the output:
>
> FPDoc - Free Pascal Documentation Tool
> (c) 2000 - 2003 Areca Systems GmbH / Sebastian Guenther,
> [hidden email]
>
> Writing 112 pages...
> Could not create file "test\index-1.html": Access denied
> Could not create file "test\index-2.html": Access denied
> Could not create file "test\versione.html": Access denied
> .......
> Could not create file "test\arc_sen.html": Access denied
> Could not create file "test\arc_cos.html": Access denied
> Done.
>
> I looked in the fp-doc sources and tried to fix the problem:
>
> patch in dw_html.pp:
> --------------------------
> //  if not FileExists(Path) then old
>   if not DirectoryExists(Path) then new
>   begin
>     CreatePath(Path);
>     MkDir(Path);
>   end;
>
> now it is working ok. But I don't know if the reason is:
>
> a) Fileexists non more works on directories, only on files
> b) Fileexists works on Linux but not on Windows
>
> someone could give me an advice?

FileExists should not be used for directories. On linux you can get away with it.

Vincent.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Fp-Doc. Question No.1

Marco van de Voort
> > now it is working ok. But I don't know if the reason is:
> >
> > a) Fileexists non more works on directories, only on files
> > b) Fileexists works on Linux but not on Windows
> >
> > someone could give me an advice?
>
> FileExists should not be used for directories. On linux you can get away with it.

Search for a procedure sysutils.forcedirectories ?
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

RE: Fp-Doc. Question No.1

Tiziano - Mekar Srl -
In reply to this post by Tiziano - Mekar Srl -

If I understand correctly your answer, fp-doc doesn't work only on
windows.

Maybe a better patch could be applied using Forceditectories, as Marco
suggests.

tiziano

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of
> Vincent Snijders
> Sent: Tuesday, May 23, 2006 10:19 AM
> To: FPC-Pascal users discussions
> Subject: Re: [fpc-pascal] Fp-Doc. Question No.1
>
> >
> > someone could give me an advice?
>
> FileExists should not be used for directories. On linux you
> can get away with it.
>
> Vincent.
> _______________________________________________
> fpc-pascal maillist  -  [hidden email]
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
###########################################

This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange.
For more information, connect to http://www.f-secure.com/
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

RE: Fp-Doc. Question No.1

Michael Van Canneyt


On Tue, 23 May 2006, Tiziano - Mekar Srl - wrote:

>
> If I understand correctly your answer, fp-doc doesn't work only on
> windows.
>
> Maybe a better patch could be applied using Forceditectories, as Marco
> suggests.

I will have a look. I know there are some issues with the 'output'
parameter, but I thought I had fixed them all. Apparently not.

For now, always specify a --output parameter...


Michael.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

RE: Fp-Doc. Question No.1

Tiziano - Mekar Srl -
In reply to this post by Tiziano - Mekar Srl -

If I don't specify the output parameter, html is taken as default.
It seems correct to me, but the help should say it.

for the other output parameters see my Question No.2

tiziano

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of
> Michael Van Canneyt
> Sent: Tuesday, May 23, 2006 1:48 PM
> To: FPC-Pascal users discussions
> Subject: RE: [fpc-pascal] Fp-Doc. Question No.1
>
>
>
> On Tue, 23 May 2006, Tiziano - Mekar Srl - wrote:
>
> >
> > If I understand correctly your answer, fp-doc doesn't work only on
> > windows.
> >
> > Maybe a better patch could be applied using
> Forceditectories, as Marco
> > suggests.
>
> I will have a look. I know there are some issues with the 'output'
> parameter, but I thought I had fixed them all. Apparently not.
>
> For now, always specify a --output parameter...
>
>
> Michael.
> _______________________________________________
> fpc-pascal maillist  -  [hidden email]
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
###########################################

This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange.
For more information, connect to http://www.f-secure.com/
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal