diff options
author | Graeme Geldenhuys <graemeg@gmail.com> | 2014-10-19 09:54:35 +0100 |
---|---|---|
committer | Graeme Geldenhuys <graemeg@gmail.com> | 2014-10-19 09:54:35 +0100 |
commit | 667674c4e56603716a55e2bd92d71e81c31bcb0d (patch) | |
tree | 2b7fbfdda98fbd0e01d5d7b48c58f120066a8a89 | |
parent | 47cacef10c3a5dbe9e6ad3b8b33efca071cfc136 (diff) | |
download | fpGUI-667674c4e56603716a55e2bd92d71e81c31bcb0d.tar.xz |
docs: Removed obsolete scripts or programs to generate documentation.
The preferred method is to simply use fpdoc and the documentation
project file.
eg:
fpdoc --project=fpgui-docs-project.xml
The XML project file contains INF output format as default, but the
other settings like HTML, RTF etc are included, just commented.
-rwxr-xr-x | docs/build_html.sh | 39 | ||||
-rwxr-xr-x | docs/build_ipf.sh | 38 | ||||
-rwxr-xr-x | docs/build_rtf.sh | 37 | ||||
-rw-r--r-- | docs/builddocs.pas | 221 |
4 files changed, 0 insertions, 335 deletions
diff --git a/docs/build_html.sh b/docs/build_html.sh deleted file mode 100755 index b43cdd63..00000000 --- a/docs/build_html.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh -# fpc/bin must be in your PATH - -app=fpdoc -#app=/opt/fpc_2.5.1/x86_64-linux/bin/fpdoc -#app=/media/flash16gig/programming/fpdoc_ipf/fpdoc - -$app \ - --package=fpgui \ - --format=html \ - --output=html/ \ - --charset=UTF-8 \ - --footer-date='yyyy-mm-dd' \ - --input='-Fi../src/corelib ../src/corelib/fpg_base.pas' --descr=xml/corelib/fpg_base.xml \ - --input='-Fi../src/corelib ../src/corelib/x11/fpg_x11.pas' --descr=xml/corelib/x11/fpg_x11.xml \ - --input='-Fi../src/corelib ../src/corelib/gdi/fpg_gdi.pas' --descr=xml/corelib/gdi/fpg_gdi.xml \ - --input='-Fi../src/corelib -Fi../src ../src/corelib/fpg_main.pas' --descr=xml/corelib/fpg_main.xml \ - --input='-Fi../src/corelib ../src/corelib/fpg_extinterpolation.pas' --descr=xml/corelib/fpg_extinterpolation.xml \ - --input='-Fi../src/corelib ../src/corelib/fpg_imgfmt_bmp.pas' --descr=xml/corelib/fpg_imgfmt_bmp.xml \ - --input='-Fi../src/corelib ../src/corelib/fpg_widget.pas' --descr=xml/corelib/fpg_widget.xml \ - --input='-Fi../src/corelib -Fi../src/corelib/x11 ../src/corelib/fpg_utils.pas' --descr=xml/corelib/fpg_utils.xml \ - --input='-Fi../src/corelib ../src/corelib/fpg_wuline.pas' --descr=xml/corelib/fpg_wuline.xml \ - --input='-Fi../src/corelib ../src/corelib/fpg_constants.pas' --descr=xml/corelib/fpg_constants.xml \ - --input='-Fi../src -Fu../src/corelib/x11/ -Fi../src/corelib/x11/ -Fu../src/gui/ -Fu../src/corelib/ ../src/corelib/fpg_command_intf.pas' --descr=xml/corelib/fpg_command_intf.xml \ - --input='-Fi../src/gui ../src/gui/fpg_dialogs.pas' --descr=xml/gui/fpg_dialogs.xml \ - --input='-Fi../src/gui ../src/gui/fpg_hyperlink.pas' --descr=xml/gui/fpg_hyperlink.xml \ - --input='-Fi../src/gui ../src/gui/fpg_colormapping.pas' --descr=xml/gui/fpg_colormapping.xml \ - --input='-Fi../src/gui ../src/gui/fpg_colorwheel.pas' --descr=xml/gui/fpg_colorwheel.xml \ - --input='-Fi../src/gui ../src/gui/fpg_button.pas' --descr=xml/gui/fpg_button.xml \ - --input='-Fi../src/gui ../src/gui/fpg_tree.pas' --descr=xml/gui/fpg_tree.xml - -# --input='-Fi../src/gui ../src/gui/fpg_.pas' --descr=xml/gui/fpg_.xml \ -# --input='-Fi../src/gui ../src/gui/fpg_.pas' --descr=xml/gui/fpg_.xml \ -# --input='-Fi../src/gui ../src/gui/fpg_.pas' --descr=xml/gui/fpg_.xml \ - -# --input='-Fi../src/gui ../src/gui/fpg_.pas' --descr=xml/gui/fpg_.xml \ -# --input='-Fi../src/corelib ../src/corelib/fpg_.pas' --descr=xml/corelib/fpg_.xml \ - - diff --git a/docs/build_ipf.sh b/docs/build_ipf.sh deleted file mode 100755 index bdb841b1..00000000 --- a/docs/build_ipf.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh -# fpc/bin must be in your PATH - -app=fpdoc -#app=/opt/fpc_2.5.1/x86_64-linux/bin/fpdoc -#app=/media/flash16gig/programming/fpdoc_ipf/fpdoc - -$app \ - --package=fpgui \ - --format=ipf \ - --output=fpgui.ipf \ - --duplinkeddoc \ - --input='-Fi../src/corelib ../src/corelib/fpg_base.pas' --descr=xml/corelib/fpg_base.xml \ - --input='-Fi../src/corelib ../src/corelib/x11/fpg_x11.pas' --descr=xml/corelib/x11/fpg_x11.xml \ - --input='-Fi../src/corelib ../src/corelib/gdi/fpg_gdi.pas' --descr=xml/corelib/gdi/fpg_gdi.xml \ - --input='-Fi../src/corelib -Fi../src ../src/corelib/fpg_main.pas' --descr=xml/corelib/fpg_main.xml \ - --input='-Fi../src/corelib ../src/corelib/fpg_extinterpolation.pas' --descr=xml/corelib/fpg_extinterpolation.xml \ - --input='-Fi../src/corelib ../src/corelib/fpg_imgfmt_bmp.pas' --descr=xml/corelib/fpg_imgfmt_bmp.xml \ - --input='-Fi../src/corelib ../src/corelib/fpg_widget.pas' --descr=xml/corelib/fpg_widget.xml \ - --input='-Fi../src/corelib -Fi../src/corelib/x11 ../src/corelib/fpg_utils.pas' --descr=xml/corelib/fpg_utils.xml \ - --input='-Fi../src/corelib ../src/corelib/fpg_wuline.pas' --descr=xml/corelib/fpg_wuline.xml \ - --input='-Fi../src/corelib ../src/corelib/fpg_constants.pas' --descr=xml/corelib/fpg_constants.xml \ - --input='-Fi../src -Fu../src/corelib/x11/ -Fi../src/corelib/x11/ -Fu../src/gui/ -Fu../src/corelib/ ../src/corelib/fpg_command_intf.pas' --descr=xml/corelib/fpg_command_intf.xml \ - --input='-Fi../src/gui ../src/gui/fpg_dialogs.pas' --descr=xml/gui/fpg_dialogs.xml \ - --input='-Fi../src/gui ../src/gui/fpg_hyperlink.pas' --descr=xml/gui/fpg_hyperlink.xml \ - --input='-Fi../src/gui ../src/gui/fpg_colormapping.pas' --descr=xml/gui/fpg_colormapping.xml \ - --input='-Fi../src/gui ../src/gui/fpg_colorwheel.pas' --descr=xml/gui/fpg_colorwheel.xml \ - --input='-Fi../src/gui ../src/gui/fpg_button.pas' --descr=xml/gui/fpg_button.xml \ - --input='-Fi../src/gui ../src/gui/fpg_tree.pas' --descr=xml/gui/fpg_tree.xml - -# --input='-Fi../src/gui ../src/gui/fpg_.pas' --descr=xml/gui/fpg_.xml \ -# --input='-Fi../src/gui ../src/gui/fpg_.pas' --descr=xml/gui/fpg_.xml \ -# --input='-Fi../src/gui ../src/gui/fpg_.pas' --descr=xml/gui/fpg_.xml \ - -# --input='-Fi../src/gui ../src/gui/fpg_.pas' --descr=xml/gui/fpg_.xml \ -# --input='-Fi../src/corelib ../src/corelib/fpg_.pas' --descr=xml/corelib/fpg_.xml \ - - diff --git a/docs/build_rtf.sh b/docs/build_rtf.sh deleted file mode 100755 index 33b1825e..00000000 --- a/docs/build_rtf.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh -# fpc/bin must be in your PATH - -app=fpdoc -#app=/opt/fpc_2.5.1/x86_64-linux/bin/fpdoc -#app=/media/flash16gig/programming/fpdoc_ipf/fpdoc - -$app \ - --package=fpgui \ - --format=rtf \ - --output=fpgui.rtf \ - --input='-Fi../src/corelib ../src/corelib/fpg_base.pas' --descr=xml/corelib/fpg_base.xml \ - --input='-Fi../src/corelib ../src/corelib/x11/fpg_x11.pas' --descr=xml/corelib/x11/fpg_x11.xml \ - --input='-Fi../src/corelib ../src/corelib/gdi/fpg_gdi.pas' --descr=xml/corelib/gdi/fpg_gdi.xml \ - --input='-Fi../src/corelib -Fi../src ../src/corelib/fpg_main.pas' --descr=xml/corelib/fpg_main.xml \ - --input='-Fi../src/corelib ../src/corelib/fpg_extinterpolation.pas' --descr=xml/corelib/fpg_extinterpolation.xml \ - --input='-Fi../src/corelib ../src/corelib/fpg_imgfmt_bmp.pas' --descr=xml/corelib/fpg_imgfmt_bmp.xml \ - --input='-Fi../src/corelib ../src/corelib/fpg_widget.pas' --descr=xml/corelib/fpg_widget.xml \ - --input='-Fi../src/corelib -Fi../src/corelib/x11 ../src/corelib/fpg_utils.pas' --descr=xml/corelib/fpg_utils.xml \ - --input='-Fi../src/corelib ../src/corelib/fpg_wuline.pas' --descr=xml/corelib/fpg_wuline.xml \ - --input='-Fi../src/corelib ../src/corelib/fpg_constants.pas' --descr=xml/corelib/fpg_constants.xml \ - --input='-Fi../src -Fu../src/corelib/x11/ -Fi../src/corelib/x11/ -Fu../src/gui/ -Fu../src/corelib/ ../src/corelib/fpg_command_intf.pas' --descr=xml/corelib/fpg_command_intf.xml \ - --input='-Fi../src/gui ../src/gui/fpg_dialogs.pas' --descr=xml/gui/fpg_dialogs.xml \ - --input='-Fi../src/gui ../src/gui/fpg_hyperlink.pas' --descr=xml/gui/fpg_hyperlink.xml \ - --input='-Fi../src/gui ../src/gui/fpg_colormapping.pas' --descr=xml/gui/fpg_colormapping.xml \ - --input='-Fi../src/gui ../src/gui/fpg_colorwheel.pas' --descr=xml/gui/fpg_colorwheel.xml \ - --input='-Fi../src/gui ../src/gui/fpg_button.pas' --descr=xml/gui/fpg_button.xml \ - --input='-Fi../src/gui ../src/gui/fpg_tree.pas' --descr=xml/gui/fpg_tree.xml - -# --input='-Fi../src/gui ../src/gui/fpg_.pas' --descr=xml/gui/fpg_.xml \ -# --input='-Fi../src/gui ../src/gui/fpg_.pas' --descr=xml/gui/fpg_.xml \ -# --input='-Fi../src/gui ../src/gui/fpg_.pas' --descr=xml/gui/fpg_.xml \ - -# --input='-Fi../src/gui ../src/gui/fpg_.pas' --descr=xml/gui/fpg_.xml \ -# --input='-Fi../src/corelib ../src/corelib/fpg_.pas' --descr=xml/corelib/fpg_.xml \ - - diff --git a/docs/builddocs.pas b/docs/builddocs.pas deleted file mode 100644 index c85abe58..00000000 --- a/docs/builddocs.pas +++ /dev/null @@ -1,221 +0,0 @@ -{ - Simple program to buid a documenation script. - It looks for xml description files. Matches those to source files, - and includes those matches in the documentation script. - - TODO: - * Parameter to build script or execute directly fpdoc. - * Make program build Linux shell scripts and Windows Batch scripts. - * Add parameter to include all units, not just those that have documentation - * Order of files are important to fpdoc, so we need some way of indicating the - order in which files must be processed. -} -program builddocs; - -{$mode objfpc}{$H+} - -uses - Classes, SysUtils, CustApp, Process; - -const - cFPDOC = 'fpdoc'; - cFPDocParameters = ' --package=fpgui --format=ipf --output=fpgui.ipf --content=fpgui.cnt --duplinkeddoc '; - cFilePath = '-Fi../src -Fu../src/corelib/x11/ -Fi../src/corelib/x11/ -Fu../src/gui/ -Fu../src/corelib/ %s'; - cFileLine = ' --input=''%s'' --descr=%s'; - -type - TBuildDocsApp = class(TCustomApplication) - private - FXMLFiles: TStrings; - FPasFiles: TStrings; - FCommand: string; - FDivider: string; - procedure FileSearch(SearchDir: string; ExtensionMask: string; var FileList: TStrings; Recursive: boolean = True); - function ExtractFileNameOnly(AFilename: string): string; - procedure BuildCommandLine; - procedure WriteScript; - procedure ExecuteFPDoc; - protected - procedure DoRun; override; - public - constructor Create(TheOwner: TComponent); override; - destructor Destroy; override; - procedure WriteHelp; virtual; - end; - -{ TBuildDocsApp } - -procedure TBuildDocsApp.FileSearch(SearchDir: string; ExtensionMask: string; - var FileList: TStrings; Recursive: boolean); -var - Info : TSearchRec; - ExtensionList: TStrings; -begin - SearchDir := IncludeTrailingPathDelimiter(SearchDir); - - ExtensionList := TStringList.Create; - ExtensionList.Delimiter := ';'; - ExtensionList.DelimitedText := ExtensionMask; - - if FindFirst(SearchDir+AllFilesMask, faAnyFile and faDirectory, Info) = 0 then - begin - repeat - if Recursive then - if ((Info.Attr and faDirectory) = faDirectory) and (Info.Name <> '.') and (Info.Name <> '..')then - FileSearch(SearchDir + Info.Name, ExtensionMask, FileList, Recursive); - - if ExtensionList.IndexOf(ExtractFileExt(Info.Name)) <> -1 then - begin - if FileList.IndexOf(SearchDir + Info.Name) = -1 then - FileList.Add(SearchDir + Info.Name); - end; - until FindNext(Info)<>0; - end; - FindClose(Info); - - ExtensionList.Free; -end; - -function TBuildDocsApp.ExtractFileNameOnly(AFilename: string): string; -var - p: integer; -begin - Result := ExtractFileName(AFilename); - p := Length(ExtractFileExt(Result)); - Result := Copy(Result, 1, Length(Result)-p); -end; - -procedure TBuildDocsApp.BuildCommandLine; -var - lPFile, lXFile: string; - i, j: integer; - lFPDoc: string; -begin - lFPDoc := GetEnvironmentVariable('fpdoc'); - if lFPDoc = '' then - lFPDoc := cFPDOC; - FCommand := lFPDoc + cFPDocParameters; - FileSearch('xml/', '.xml', FXMLFiles, True); - FileSearch('../src/', '.pas', FPasFiles, True); - - for i := 0 to FXMLFiles.Count-1 do - begin - lXFile := ExtractFileNameOnly(FXMLFiles[i]); - for j := 0 to FPasFiles.Count-1 do - begin - lPFile := ExtractFileNameOnly(FPasFiles[j]); - if SameText(lXFile, lPFile) then - begin - // fix command line separators at the same time - FCommand := FCommand + FDivider + Format(cFileLine, [SetDirSeparators(Format(cFilePath, [FPasFiles[j]])), FXMLFiles[i]]); - end; - end; - end; - -// FCommand := SetDirSeparators(FCommand); - {.$IFDEF Windows} - FCommand := StringReplace(FCommand, '''', '"', [rfReplaceAll]); - {.$ENDIF} -end; - -procedure TBuildDocsApp.WriteScript; -begin - FXMLFiles.Text := FCommand; - {$IFDEF Windows} - FXMLFiles.SaveToFile('runme2.bat'); - {$else} - FXMLFiles.SaveToFile('runme2.sh'); - {$endif} -end; - -procedure TBuildDocsApp.ExecuteFPDoc; -var - p: TProcess; -begin - p := TProcess.Create(nil); - try -// writeln('------------ START -------------------'); -// writeln(FCommand); -// writeln('------------ END -------------------'); - p.CommandLine := FCommand; - p.Options := [poWaitOnExit]; - p.Execute; - finally - p.Free; - end; -end; -procedure TBuildDocsApp.DoRun; -var - ErrorMsg: String; -begin - // quick check parameters - ErrorMsg:=CheckOptions('hs','help'); - if ErrorMsg<>'' then begin - ShowException(Exception.Create(ErrorMsg)); - Terminate; - Exit; - end; - - // parse parameters - if HasOption('h','help') then - begin - WriteHelp; - Terminate; - Exit; - end; - - if HasOption('s','script') then - FDivider := {$ifdef unix}' \' + LineEnding {$else} '' {$endif} - else - FDivider := ''; - - BuildCommandLine; - - if HasOption('s','script') then - WriteScript - else - ExecuteFPDoc; - - // stop program loop - Terminate; -end; - -constructor TBuildDocsApp.Create(TheOwner: TComponent); -begin - inherited Create(TheOwner); - StopOnException:=True; - FXMLFiles := TStringList.Create; - FPasFiles := TStringList.Create; -end; - -destructor TBuildDocsApp.Destroy; -begin - FXMLFiles.Free; - FPasFiles.Free; - inherited Destroy; -end; - -procedure TBuildDocsApp.WriteHelp; -begin - { add your help code here } - writeln('Usage: ',ExeName,' -h'); - writeln(''); - writeln(' -h Show this help'); - writeln(' -s Generate a script/batch file to run later. Recommended'); - writeln(' for Linux systems.'); - writeln(''); - writeln('If no command line parameters are specified, it will execute FPDoc.'); - writeln('This option is recommended for Windows systems.'); - writeln(''); -end; - -var - Application: TBuildDocsApp; - -begin - Application:=TBuildDocsApp.Create(nil); - Application.Title:='Build Docs App'; - Application.Run; - Application.Free; -end. - |