As I can see unit paths are still in relative (but long enough) format.
true, but those were pointed to a non-portable folder that only exists on my local computer. But now I am confused, what's the meaning of the "<Units>...</Units>" section? are those the units to be compiled in this project or just the editor opened tabs?
How do you use those units (and all stuff declared there) in your code then?
there are only two places that the GLScene unit names are involved, one is in the lpr:
https://github.com/fangq/mcx/blob/etherdome/mcxstudio/mcxstudio.lpr#L10the other is the uses section of the rendering window at
https://github.com/fangq/mcx/blob/master/mcxstudio/mcxrender.pas#L15-L19I don't think there are other places they are needed.
lazbuild also emit the following warning:
.../mcxstudio.lpr(10,10) Hint: (5023) Unit "GLScene_RunTime" not used in mcxstudio
I did not copy the GLScene_RunTime.lpk file to my project.
The above message was about unit GLScene_RunTime.(pas), not package. And as I see a purpose of this unit is to place all these GL*.pas units in its uses section.
Look, your project is complex enough and I'm unable to make a full review of it. But I'd recommend you to make a minimal glscene test project and work out automated build on something simple, so you'll get used to build modes, paths, side libraries and so on.
My personal approach is something like this: I have some of the "Release" modes dedicated solely for automated build, where I have all 3rd party packages and units removed from project (lpi), although their search paths are still there. This way they (3rd party units) are still being compiled as needed, because they are included in uses sections in particular places of my units.
Here is what I have tried, I logged on my computer (installed lazarus 1.8.3, with a recompiled lazarus-gui binary after installing glscene from my own account) with an account different from mine, then, when I run lazbuild mcxstudio.lpi, I got the below error as the 3rd line output from lazbuild
Error: (lazbuild) Broken dependency: GLScene_RunTime
I need to understand what changes I need to make to let lazbuild know where to find the needed glscene units. You are right, the GLScene_RunTime contains nearly all .pas units in the package, as you can see from here
https://sourceforge.net/p/glscene/code/HEAD/tree/branches/GLSceneLCL/Packages/GLScene_RunTime.pasdoes that mean I need to copy all .pas units that is shown in the uses section of GLScene_RunTime.pas into my project folder in order for lazbuild to compile them? (actually, I tried that, but it still gave me the same error).
for a small reproducer, you can checkout the mcxshow.lpi project under the same folder, it contains only 1 window involving glscene.
https://github.com/fangq/mcx/blob/etherdome/mcxstudio/mcxshow.lpr