Recent

Author Topic: Directory Structure ?  (Read 3312 times)

DaveP

  • New Member
  • *
  • Posts: 13
Directory Structure ?
« on: October 02, 2023, 09:43:33 pm »
Hi, Running PC-Linux(Trinity), I have Lazarus/FPC installed from the Repo. I have started to create a Library, and it compiles Ok.  so the question is, what directories should I create to keep several libraries          that are known by any app that's being developed,, and each other. ( Lib-3 uses Lib-1 etc ). Also having easy access for further development. ( not having to use root ).  i want to get this set up before going any further. Any suggestions welcome.
Dave P..

TRon

  • Hero Member
  • *****
  • Posts: 1871
Re: Directory Structure ?
« Reply #1 on: October 03, 2023, 01:57:38 am »
Since I do not know what you meant exactly with library I assume you meant unit (and not a dll/so library).

I use a special 3th party units directory for that and which can be 'seen' by FPC through adding the option -Fu"/path/to/my/custom/3th/party/units/$fpctarget/*" to my fpc.cfg file. It is not the cleanest or most correct solution as I also store the source-files there (those should really be located somewhere else but adds the burden of the need to add yet another option to locate the sources).

I use that strictly for non visual units, thus similar to rtl and other units as distributed by FPC.


For Lazarus different rules (configuration options/handling) apply, especially when using custom written components. For me right now, that is a bit too much to explain without knowing if you really seek the answer for that (also the wiki pages do a much better job).
« Last Edit: October 03, 2023, 02:09:57 am by TRon »

lainz

  • Hero Member
  • *****
  • Posts: 4280
    • https://lainz.github.io/
Re: Directory Structure ?
« Reply #2 on: October 03, 2023, 02:03:35 am »
Use lazarus packages. Check the wiki.

cdbc

  • Hero Member
  • *****
  • Posts: 722
    • http://www.cdbc.dk
Re: Directory Structure ?
« Reply #3 on: October 03, 2023, 06:07:36 am »
Hi
I'm on PCLinuxOS too, I can show you how I've got mine setup:
Code: [Select]
/// my username is bc ///
             |- bin/"finished binaries in use on the system" incl. in "path"
/home/bc/src/+- lib64/"finished libraries *.so in use on the system" dynload
             |- bc_rtl/"common unit-files used in all projects *.pas/pp/inc"
             |- sandbox/"main development area, project = sub-directory"
                        |- bc_flacconv/"flac2wav converter"
                        |- bc_etcedit/"config editor"
oh... and I do use soft-links in the test and development stages
This setup works just fine, I test my apps by every day use if posssible  8)
Regards Benny
« Last Edit: October 03, 2023, 06:10:37 am by cdbc »
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6

DaveP

  • New Member
  • *
  • Posts: 13
Re: Directory Structure ?
« Reply #4 on: October 06, 2023, 11:16:08 pm »
Thanks for the replies, I was/am confused by Library and Unit, i assumed that any file with procedures that could be used by any other such file or the app was a library, seems it needs to be a unit.
I don't think I need a library, just a directory for units, and another for the app development.
Sorry for the delay, very busy holiday plans etc. and clarifying units.
Dave P..

 

TinyPortal © 2005-2018