Hi,
There are multiple issues related to docview sources as provided in fpGUI release 2.1.0:
- The overall project compilation using pasbuild doesn't include docview compilation.
- README.adoc suggests that "applications" should include the extrafpc.cfg file and should be compiled from within the respective src subdirectory. Docview is explicitly mentioned as an example with the following instructions:
cd docview/src
fpc @extrafpc.cfg docview.lpr
...except that docview/src contains neither extrafpc.cfg (that is one level higher) nor docview.lpr (that is in the subdirectory main/pascal, but the provided extrafpc.cfg doesn't provide the path to this file nor to any other)...
- One might expect that it should be possible to compile docview using pasbuild.
D:\...\fpGUI-2.1.0>pasbuild compile -m docview -p windows
[INFO] PasBuild 1.9.0 — Born ${build.date}. Raised by Graeme Geldenhuys.
[INFO] Compiler: FPC (fpc)
[INFO] Executing goal: reactor-compile
[ERROR] Module not found: docview
[ERROR] Selected module not found or has no dependencies: docview
[ERROR] Goal failed: reactor-compile
As you can see, although project.xml in the main directory of fpGUI specifies docview as one of modules (there's <module>docview</module>), pasbuild cannot find the module.
OK, docview directory contains project.xml as well - maybe one should try building docview in that directory?
D:\...\fpGUI-2.1.0\docview>pasbuild compile -m docview -p windows
[INFO] PasBuild 1.9.0 — Born ${build.date}. Raised by Graeme Geldenhuys.
[INFO] Compiler: FPC (fpc)
[ERROR] Missing required field: <version>
Well, apparently not. :-( Maybe the version attribute should be added to the project information in docview/project.xml? Let's try again:
D:\...\fpGUI-2.1.0\docview>pasbuild compile -m docview -p windows
[INFO] PasBuild 1.9.0 — Born ${build.date}. Raised by Graeme Geldenhuys.
[INFO] Compiler: FPC (fpc)
[INFO] Executing goal: process-resources
[INFO] Processing resources from src/main/resources...
[INFO] Resources processed successfully
[INFO] Executing goal: compile
[INFO] Compiling project...
[INFO] Found 32 source file(s)
[WARNING] Profile not found: windows
[ERROR] docview.lpr(10,12) Fatal: Can't find unit fpg_main used by docview
[ERROR] Fatal: Compilation aborted
[ERROR] Error: D:\FPC\VerInUse\BIN\i386-win32\ppc386.exe returned an error exitcode
[ERROR] Build failed with exit code: 1 (see target\pasbuild-status\compile\compiler.log for details)
[ERROR] Goal failed: compile
Well, clearly not... :/
After iteratively testing command line compilation and adding needed -Fu and -Fi parameters, I noticed that the line "-Fu../components/richtext/" in current extrafpc.cfg is wrong (there's no such path as "components/richtext/" within the fpGUI project - the real path is "src/main/pascal/richtext/"). In addition, -Fisrc/main/resources needs to be added there as well (currently missing). In addition, subdirectory "units" must be created maually, because extrafpc.cfg specifies that compiled units should go there, but there's no such directory in the tree. After fixing all of that, I was able to compile docview successfully (preferably, the executable should probably end up in a different directory, but that's just a cosmetic thing).
Hi,
There are multiple issues related to docview sources as provided in fpGUI release 2.1.0:
...except that docview/src contains neither extrafpc.cfg (that is one level higher) nor docview.lpr (that is in the subdirectory main/pascal, but the provided extrafpc.cfg doesn't provide the path to this file nor to any other)...
As you can see, although project.xml in the main directory of fpGUI specifies docview as one of modules (there's
<module>docview</module>), pasbuild cannot find the module.OK, docview directory contains project.xml as well - maybe one should try building docview in that directory?
Well, apparently not. :-( Maybe the version attribute should be added to the project information in docview/project.xml? Let's try again:
Well, clearly not... :/
After iteratively testing command line compilation and adding needed -Fu and -Fi parameters, I noticed that the line "-Fu../components/richtext/" in current extrafpc.cfg is wrong (there's no such path as "components/richtext/" within the fpGUI project - the real path is "src/main/pascal/richtext/"). In addition, -Fisrc/main/resources needs to be added there as well (currently missing). In addition, subdirectory "units" must be created maually, because extrafpc.cfg specifies that compiled units should go there, but there's no such directory in the tree. After fixing all of that, I was able to compile docview successfully (preferably, the executable should probably end up in a different directory, but that's just a cosmetic thing).