Recent

Author Topic: Modular Lazarus  (Read 3630 times)

Selfmade.exe

  • New Member
  • *
  • Posts: 36
Modular Lazarus
« on: June 24, 2019, 01:47:48 am »
Hello everyone,

This topic might seem a bit odd (given the today's hardware) but I 'll give it a shot:

After recompiling IDE the size on the disk is about 1.30GB!! Without compile is about 1GB.
For me this is kinda ridiculous; It means that I need 1GB+ of software just to write, just say, a simple non gui program.. hmm.. I could produce the same* program with borland 7 for windows that takes no more than 25mb! (* yes I know, ancient staff, no support for modern processors, etc).
But the borland IDE was very straightforward and simple. I know that lazarus has a lot of staff, but it would be nice if I can have an IDE that I can select the components according to my programing needs and functions of IDE that I want (and thus a smaller install size).  UNLESS this can done already. Also a portable option with the config on the same folder would be nice!

RAW

  • Hero Member
  • *****
  • Posts: 868
Re: Modular Lazarus
« Reply #1 on: June 24, 2019, 01:59:54 am »
Hi,
Borland 7 was Windows only or am I wrong? (16 bit ...?)
Years ago I installed a modern Delphi version (I think it was XE5 UPD 2) and that version needed approx. 5 GB disk space.
For non GUI Lazarus is not necessary, I guess you already know that ...  :)
Nowadays nobody cares about 1 GB SSD or HDD space ...

Quote
Also a portable option with the config on the same folder would be nice!
A secondary installation has the CFG folder exactly there, but I guess you need to setup some paths manually ... never needed this...
Maybe it's enough to change these files or use a little startup exe file that does all the changes ???

lazarus/lazarus.cfg: --primary-config-path=P:\lazarus\laz_conf
lazarus/environmentoptions.xml: <LazarusDirectory Value="P:\lazarus">
lazarus/laz_config/editoroptions.xml
lazarus/laz_config/environmentoptions.xml
lazarus/laz_config/fpcdefines.xml

I guess starting lazarus from USB is slow  :)
by the way: what about fpcUpDeluxe ... ? Is there an easier way possible ?
« Last Edit: June 24, 2019, 02:17:24 am by RAW »
Windows 7 Pro (x64 Sp1) & Windows XP Pro (x86 Sp3).

Selfmade.exe

  • New Member
  • *
  • Posts: 36
Re: Modular Lazarus
« Reply #2 on: June 24, 2019, 02:39:37 am »
Quote
Borland 7 was Windows only or am I wrong? (16 bit ...?)
Borland 7 was for windows 3.1 (!) but run fine through xp, and wayyy better that the atrocity called TurboPascal interface.

Quote
For non GUI Lazarus is not necessary
Well I know that I can use notepad too, but IDE is what it is supposed to be: an enviroment for programming, and if you dont have agood enviroment, then if you have second thoughts on starting something,well then you get one more..  :D

Quote
Nowadays nobody cares about 1 GB SSD or HDD space ..
Thats why I said that this topic might be odd, but this and the lack of the option to select is frustrating

Quote
A secondary installation has the CFG folder exactly there
I know that, but lazarus is the kind of the program that needs the "usual and proper" install on windows. Other programs even after a normal install ( just install in one folder, not appdata or roaming folders) run fine if you just transfer them from one installation to another. They are kinda portable.

Quote
what about fpcUpDeluxe
i don't know anything about this..

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: Modular Lazarus
« Reply #3 on: June 24, 2019, 07:26:12 am »
A small, self-contained, mostly portable install with which to write simple, non-GUI programs?  Install just FPC, without Lazarus.

Depending on your system and what you install you'll need between 40 to 450 MiB(*), and you get, along a modern Object Pascal compiler plus lots of libraries, a multiplatform text-mode IDE very close in operation to the venerable Borland Pascal one.

Difficult to beat, hey? :)

(*) Those 450 MiB are about what a normal Lazarus installs of FPC and why the total is 1 GiB instead of just half that; and it includes 200+ MiB of source code for the rtl, fcl and all the extra "packages".
« Last Edit: June 24, 2019, 07:31:48 am by lucamar »
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: Modular Lazarus
« Reply #4 on: June 24, 2019, 07:55:38 am »
Hello everyone,
This topic might seem a bit odd (given the today's hardware) but I 'll give it a shot:
After recompiling IDE the size on the disk is about 1.30GB!! Without compile is about 1GB.
For me this is kinda ridiculous; It means that I need 1GB+ of software just to write, just say, a simple non gui program.. hmm.. I could produce the same* program with borland 7 for windows that takes no more than 25mb! (* yes I know, ancient staff, no support for modern processors, etc).
But the borland IDE was very straightforward and simple. I know that lazarus has a lot of staff, but it would be nice if I can have an IDE that I can select the components according to my programing needs and functions of IDE that I want (and thus a smaller install size).  UNLESS this can done already. Also a portable option with the config on the same folder would be nice!
If you mean something similar with old Netbeans versions (see attached image), your idea is good but not feasible for Free Pascal and Lazarus because of many reasons.
https://web.archive.org/web/20170506091836/https://netbeans.org/downloads/index.html

To achieve modularity, Lazarus project would need be greatly reorganized. There are neither human and money resources nor intention for that.

Recompile Free Pascal or making Lazarus cross-compiling easier and intuitive are much more requested and will not be implemented any time soon.

Android and iOS and Web (with pas2js) programming in IDE still need some IDE extra manual adjusts. They are more needed than modularity and are still neither easy nor intuitive for beginners.
« Last Edit: June 24, 2019, 12:11:55 pm by valdir.marcos »

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11446
  • FPC developer.
Re: Modular Lazarus
« Reply #5 on: June 24, 2019, 11:11:13 am »
Just do an install, and cut down to the items you want. Educational institutions do this routinely, and copy the relevant parts to the machine you want.

The number of paths in configuration can be quite low (see the various topics about portable versions).

If you want to put in a bit more effort, you can make own installers. The installer scripts and everything are also open source, just go ahead!

Selfmade.exe

  • New Member
  • *
  • Posts: 36
Re: Modular Lazarus
« Reply #6 on: June 26, 2019, 06:39:37 pm »
Quote
Just do an install, and cut down to the items you want

and how do I know which parts are necessary or not? or do I have to trial & error with 11,469 files for every program that I make??
Do any of the devs have some kind of csv file to keep track of the files?

Thaddy

  • Hero Member
  • *****
  • Posts: 14364
  • Sensorship about opinions does not belong here.
Re: Modular Lazarus
« Reply #7 on: June 26, 2019, 06:53:09 pm »
Quote
Just do an install, and cut down to the items you want

and how do I know which parts are necessary or not? or do I have to trial & error with 11,469 files for every program that I make??
Do any of the devs have some kind of csv file to keep track of the files?
Lucky for you: the compiler determines that.....Except for the system unit everything else is strictly on demand.
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

Selfmade.exe

  • New Member
  • *
  • Posts: 36
Re: Modular Lazarus
« Reply #8 on: June 26, 2019, 10:25:36 pm »
Quote
Lucky for you: the compiler determines that.....Except for the system unit everything else is strictly on demand.

Can you elaborate more on that?

Thaddy

  • Hero Member
  • *****
  • Posts: 14364
  • Sensorship about opinions does not belong here.
Re: Modular Lazarus
« Reply #9 on: June 26, 2019, 11:06:36 pm »
Any library code that is not actually used is eliminated by the compiler. So seem to believe everythink is linked in. That is not the case.
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9857
  • Debugger - SynEdit - and more
    • wiki
Re: Modular Lazarus
« Reply #10 on: June 26, 2019, 11:08:10 pm »
Under menu:
  Package > Package Graph
  View > Unit Dependencies  (Ensure to check "All package units")

You can see which package (folder components) uses depends on what. You then have to decide if you will ever need a package or not. Any package you may need (including those used by the IDE), has to stay (as a whole), and all its dependencies have to stay too.

For Lazarus you can try rebuild packages that you need, but setting debugging to NONE. That may shrink ppu and o files.


In the fpc directory you can go through the packages dir. But there is no dependencies graph (i.e. which Lazarus package depends on which fpc package). And the ppu are all mixed into one folder... So that will be harder to decide on.

On the other hand in the fpc directory, the source (rtl and packages) are only used by codetools (the IDE navigation and code completion).
- If you do not need navigation and code completion then you can delete all of them.
- If you do need navigation and code completion, then you have at least to keep rtl sources. And maybe some packages (no idea which ones, no easy way to find out)

Still in the fpc dir: ppu and o files (in the lib or units folder) are from rtl and packages (they match the names of the source files).
If you NEVER need database stuff, you can find db related packages, note the source file names, find the corresponding ppu and o files and remove them.



Not sure if it is worth the work....

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11446
  • FPC developer.
Re: Modular Lazarus
« Reply #11 on: June 27, 2019, 01:33:58 am »
Quote
Just do an install, and cut down to the items you want

and how do I know which parts are necessary or not? or do I have to trial & error with 11,469 files for every program that I make??
Do any of the devs have some kind of csv file to keep track of the files?

Then just trust the default install. They all are useful for something, or wouldn't be there.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9857
  • Debugger - SynEdit - and more
    • wiki
Re: Modular Lazarus
« Reply #12 on: June 27, 2019, 01:50:05 am »
Do any of the devs have some kind of csv file to keep track of the files?
No csv files exist.

Files are organized into packages (Lazarus packages, and fpc packages - there is a diff).
You know by the folder, so no csv needed.

Each package has a description. (and sources, if the description is unclear)

And then there are other folders, most of them self explaining: examples, ide, debugger, docs, ...



lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: Modular Lazarus
« Reply #13 on: June 27, 2019, 02:15:59 am »
As a last resort you could try other IDEs. Lazarus is just the more advanced, not the only one.

Note that I've never tried any alternative so I don't know how good (or bad) any of them are. Well, except Dev-Pascal which I know is ... not really up to par (and quite obsolete).
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: Modular Lazarus
« Reply #14 on: June 27, 2019, 03:30:39 am »
Netbeans IDE took years of effort to be modular before Sun to be sold to Oracle, and Oracle to donate it to Apache Foundation.
Eclipse IDE was born already modularized and plugable.

Not sure if it is worth the work....
Although it would be good to have a modularized and plugable IDE,  there are much more important things to be done.

 

TinyPortal © 2005-2018