Lazarus

Using the Lazarus IDE => General => Topic started by: sheeptheanarchist on September 27, 2021, 03:24:38 pm

Title: Adding all packages,components and libraries like in Codetyphoon
Post by: sheeptheanarchist on September 27, 2021, 03:24:38 pm
Hello, all. I am newbie to programming and newbie at here..
I searched what i am gonna ask but found no clue.. Somehow if my question has been asked before, i am really sorry
I want to ask that is that any easy way to use Lazarus with all packages, components and libraries like in codetyphoon.
I want to make programs for windows for begining..
Thank you in advance for replying me kindly
Title: Re: Adding all packages,components and libraries like in Codetyphoon
Post by: Martin_fr on September 27, 2021, 03:27:26 pm
Did you try the online package manager?

Last entry in the menu "package"
Title: Re: Adding all packages,components and libraries like in Codetyphoon
Post by: sheeptheanarchist on September 27, 2021, 03:42:14 pm
Whenever i try online package manager, downloads all contents but doesnt compile or install lots of packages/components
Title: Re: Adding all packages,components and libraries like in Codetyphoon
Post by: wp on September 27, 2021, 03:45:27 pm
Why do you want "all" components - 99% of them you will never need. Every unneeded package is a burden to the IDE. A single unmaintained buggy package can stop you from working. Every package to be installed increases the building time for the IDE. - I try to keep my IDE as slim as possible.
Title: Re: Adding all packages,components and libraries like in Codetyphoon
Post by: sheeptheanarchist on September 27, 2021, 04:05:45 pm
I want because i want to try all of them to make experience for myself and learn how to use.. when i will be experienced like you i will do that way like yours
Title: Re: Adding all packages,components and libraries like in Codetyphoon
Post by: sheeptheanarchist on September 27, 2021, 04:08:09 pm
Whenever i try online package manager, downloads all contents but doesnt compile or install lots of packages/components

It always says unable to create eyecandycontrolz zip bla bla.. i also have enough hdd space
Title: Re: Adding all packages,components and libraries like in Codetyphoon
Post by: balazsszekely on September 27, 2021, 04:50:47 pm
Hi sheeptheanarchist,

Quote
It always says unable to create eyecandycontrolz zip bla bla.. i also have enough hdd space
What is your Lazarus/FPC version? OS, widgetset? It looks like a permission issue to me. You can also download the packages and install it manually.
Title: Re: Adding all packages,components and libraries like in Codetyphoon
Post by: wp on September 27, 2021, 04:52:40 pm
Whenever i try online package manager, downloads all contents but doesnt compile or install lots of packages/components
"download all contents" - does this mean you want to install "all" packages in one run? What bitness is your IDE since the 32-bit IDE will definitely run out of memory. 64-bit could work depending on the amount of memory on your system, but I doubt if anybody has ever done this. I also fear that some rarely used packages are not well-maintained and could break the building process.

"download all contents but does not compile or install" - I don't know what you are doing, but this sounds to me that you are not using Online-Package-Manager in the correct way. In order to install a package from OPM, simply set the checkbox of the package in the OPM list and click "Install". Everything else will be done automatically; you will only have to confirm to rebuild the IDE.

Just installed the EyeCandyControls, and it worked correctly.
Title: Re: Adding all packages,components and libraries like in Codetyphoon
Post by: sheeptheanarchist on September 27, 2021, 05:55:06 pm
Hi sheeptheanarchist,

Quote
It always says unable to create eyecandycontrolz zip bla bla.. i also have enough hdd space
What is your Lazarus/FPC version? OS, widgetset? It looks like a permission issue to me. You can also download the packages and install it manually.

Lazarus recent version, i ve just downloaded it. Os is Win 10 Enterprise 2016 LTSB.my os and cpu is x64 and i use x64 edition of lazarus
Title: Re: Adding all packages,components and libraries like in Codetyphoon
Post by: Martin_fr on September 27, 2021, 06:12:19 pm
So, what are the exact steps you do?

Because if you are *installing* all packages, then EyeCandy might be about a quarter down the list (depends on dependencies...).
That would mean that everything before was processed (not necessary installed).

What happens if You just try to install one package? Or maybe 5 in one go?



Quote
unable to create eyecandycontrolz zip
Are you sure that is the exact error?

Because I can not find that text in the source code.
I can find:
"Cannot create zip file:"

Now, I am not an expert on the OnlinePackage manager, but I have an inkling this may be an error you get when you create a package, rather than when you install it. If so (and I may be wrong) then you pressed the wrong button somewhere [1].
=> Hence, what are the exact steps you do....



Which might mean OPM can maybe be improved to be easier to use... Don't know. But again, we first need to understand were it goes wrong.
Title: Re: Adding all packages,components and libraries like in Codetyphoon
Post by: sheeptheanarchist on September 27, 2021, 06:33:11 pm
So, what are the exact steps you do?

Because if you are *installing* all packages, then EyeCandy might be about a quarter down the list (depends on dependencies...).
That would mean that everything before was processed (not necessary installed).

What happens if You just try to install one package? Or maybe 5 in one go?



Quote
unable to create eyecandycontrolz zip
Are you sure that is the exact error?

Because I can not find that text in the source code.
I can find:
"Cannot create zip file:"

Now, I am not an expert on the OnlinePackage manager, but I have an inkling this may be an error you get when you create a package, rather than when you install it. If so (and I may be wrong) then you pressed the wrong button somewhere [1].
=> Hence, what are the exact steps you do....



Which might mean OPM can maybe be improved to be easier to use... Don't know. But again, we first need to understand were it goes wrong.
Now i am trying setup from the begining on another computer.. I will write all steps one by one if i will be failed again
Title: Re: Adding all packages,components and libraries like in Codetyphoon
Post by: sheeptheanarchist on September 27, 2021, 07:04:51 pm
well...nothing has changed after all..
now i tried on a newly windows installed machine with clean setup of lazarus and now i havent checked all the boxes at online package manager.. just one and here is the result shown on that ss...cannot install package.. continue with next one?

by the way i have 16 gig of ddr4ram with i7 6700hq cpu
Title: Re: Adding all packages,components and libraries like in Codetyphoon
Post by: wp on September 27, 2021, 07:24:44 pm
To which directory did you install Lazarus? Don't install to "c:\Program files", you don't have write access as normal user here, but you need write access when you want to install packages.
------------
BGRABitmapPack is a runtime package which can only be "compiled" but not "installed". But I just checked its installation with OPM and I see that OPM detects this and does not attempt to "install" it. I am clueless what you are doing...

Please try a simpler package:Try CalLite which I wrote myself and which is definitely working. Check it in OPM, the package callight_pkg.lpk will then be checked automatically. Then click "Install". On v2.0.12 you get the option the "Install from repository" or "Install from external source"  - select the first one. After a while you will be asked whether the IDE should be recompiled. Confirm this. Now the entire IDE is recompiled which will take some time. When finished the IDE restarts and you find the TCalendarLite component on the "Misc" palette.
Title: Re: Adding all packages,components and libraries like in Codetyphoon
Post by: Martin_fr on September 27, 2021, 07:30:31 pm
"ppc386"

It seems somewhere in some settings there is a setup to cross compile to32 bits.
Of course that does not work (as you have not / nor should you need to - installed a 32 bit compiler)

Now you set a clean install / on a new windows.
So presumingly there were not even any old Lazarus configs (because they are kept, even if you unistall ).

Maybe the project you loaded "ct2laz" is set for cross-bitness compilation.
If that is what is causing it, then IMHO there is a bug in OPM.

Anyway: menu: Project > Project settings => "Config and Target", and all drop downs (3 of them, under "Target platform) to default.
Title: Re: Adding all packages,components and libraries like in Codetyphoon
Post by: sheeptheanarchist on September 27, 2021, 08:00:21 pm
well i thought same and installed lazarus again deleted everything and opened opm again. i Tried CalLite and done what wp told. it worked. then i tried zeosdb too.. it worked.. then i tried rx but boom.. same error again.. i really do not know what i am doing wrong but i am fed up :(
Title: Re: Adding all packages,components and libraries like in Codetyphoon
Post by: balazsszekely on September 27, 2021, 08:07:31 pm
@sheeptheanarchist

Quote
then i tried rx but boom.. same error again.. i really do not know what i am doing wrong but i am fed up
For the moment Rx is not working: https://forum.lazarus.freepascal.org/index.php/topic,34297.msg417853.html#msg417853
 
Title: Re: Adding all packages,components and libraries like in Codetyphoon
Post by: wp on September 28, 2021, 12:01:37 am
Whenever i try online package manager, downloads all contents but doesnt compile or install lots of packages/components

It always says unable to create eyecandycontrolz zip bla bla.. i also have enough hdd space

You probably had run the installation of the EyeCandyControls before and thus have the unzipped package files already on your disk. In this situation I can confirm that this is an issue. The problem is that the package contains a write-protected jpeg file, and when you execute the installation a second time the unzipper must abort the installation because it cannot overwrite this file. Maybe OPM has to be modified to take care of this situation (https://forum.lazarus.freepascal.org/index.php/topic,34297.msg419813.html#msg419813).
Title: Re: Adding all packages,components and libraries like in Codetyphoon
Post by: avra on September 28, 2021, 12:51:40 pm
i really do not know what i am doing wrong but i am fed up :(
Let me explain. Every CodeTyphon version is fixed to specific FPC and Lazarus version, which both were the most recent at the time when it was decided to go with another release. So, it is easier to have package being tested against just one FPC/LAZ combo. From time to time they drop some components when they do not catch up with trunk FPC and LAZ. On the other hand, OPM collects so many packages from different authors, OPM is just used for distribution, and each author is responsible for testing his own packages. However, OPM is distributed with so many LAZ/FPC combos, that authors even in their craziest effort would not be able to test them all. For example, some users will try to install package on some old LAZ 1.6 with FPC 3.04 on x86 Debian, someone else will try the same package on LAZ 2.0 with FPC 3.2 on x64 Windows, another one will try with LAZ trunk and FPC trunk on Pi (32 or 64) or even some old ARMv5 or ARMv6 board, and another while chasing a bug that shows just on Apple M1. Do you really expect that everything compiles everywhere in all possible combos? That is not a realistic expectation. A package can be made for latest FPC, while you might have old 3.0.4, or FPC and LAZ move on but author did not upgrade his package (or OPM version was not yet updated). To ease things a little, some packages provide info on what platform and FPC/LAZ combos they have been tested. As an example, most of CodeTyphon packages in OPM (they all have pl_ prefix) are tested with stable FPC/LAZ combo on Windows x32 and Linux x64. But even in such a case, you can not expect a Windows specific package to magically work on Linux just because it is available in OPM.

So, when you find that some package does not work, uninstall it and report it to the author mentioning your exact FPC/LAZ/OS/Bitness combo and see where that goes. And never install more then few packages at once, so that you can easily do a manual roll back. Or... simply stay with CodeTyphon if that works for your use case.
Title: Re: Adding all packages,components and libraries like in Codetyphoon
Post by: balazsszekely on September 28, 2021, 01:37:13 pm
Thanks @avra. I lost the will to explain the same thing over and over again. You did an excellent job describing the issue with packages inside OPM. I will bookmark your response for further reference.
Title: Re: Adding all packages,components and libraries like in Codetyphoon
Post by: wp on September 28, 2021, 02:38:00 pm
Whenever i try online package manager, downloads all contents but doesnt compile or install lots of packages/components

It always says unable to create eyecandycontrolz zip bla bla.. i also have enough hdd space

You probably had run the installation of the EyeCandyControls before and thus have the unzipped package files already on your disk. In this situation I can confirm that this is an issue. The problem is that the package contains a write-protected jpeg file, and when you execute the installation a second time the unzipper must abort the installation because it cannot overwrite this file. Maybe OPM has to be modified to take care of this situation (https://forum.lazarus.freepascal.org/index.php/topic,34297.msg419813.html#msg419813).
EyeCandyControls now installs fine, even multiple times over the same installation. Your error should no longer occur.
Title: Re: Adding all packages,components and libraries like in Codetyphoon
Post by: sheeptheanarchist on September 28, 2021, 03:55:23 pm
i really do not know what i am doing wrong but i am fed up :(
Let me explain. Every CodeTyphon version is fixed to specific FPC and Lazarus version, which both were the most recent at the time when it was decided to go with another release. So, it is easier to have package being tested against just one FPC/LAZ combo. From time to time they drop some components when they do not catch up with trunk FPC and LAZ. On the other hand, OPM collects so many packages from different authors, OPM is just used for distribution, and each author is responsible for testing his own packages. However, OPM is distributed with so many LAZ/FPC combos, that authors even in their craziest effort would not be able to test them all. For example, some users will try to install package on some old LAZ 1.6 with FPC 3.04 on x86 Debian, someone else will try the same package on LAZ 2.0 with FPC 3.2 on x64 Windows, another one will try with LAZ trunk and FPC trunk on Pi (32 or 64) or even some old ARMv5 or ARMv6 board, and another while chasing a bug that shows just on Apple M1. Do you really expect that everything compiles everywhere in all possible combos? That is not a realistic expectation. A package can be made for latest FPC, while you might have old 3.0.4, or FPC and LAZ move on but author did not upgrade his package (or OPM version was not yet updated). To ease things a little, some packages provide info on what platform and FPC/LAZ combos they have been tested. As an example, most of CodeTyphon packages in OPM (they all have pl_ prefix) are tested with stable FPC/LAZ combo on Windows x32 and Linux x64. But even in such a case, you can not expect a Windows specific package to magically work on Linux just because it is available in OPM.

So, when you find that some package does not work, uninstall it and report it to the author mentioning your exact FPC/LAZ/OS/Bitness combo and see where that goes. And never install more then few packages at once, so that you can easily do a manual roll back. Or... simply stay with CodeTyphon if that works for your use case.
Thank you everyone for their replies and help. Honestly i struggled with lazarus after seeing an opensource program written in lazarus. it needs rx component suite. i installed lazarus and tried to find that package to compile source how it looks like. then i thought it would be better to install codetyphoon big ide but it didnt compile because of file extensions etc. then i tried mr avra's ct2laz to convert but couldnt find its compiled version..
In high school i saw delphi course.. long time after i tried to begin again as hobby..
Title: Re: Adding all packages,components and libraries like in Codetyphoon
Post by: avra on September 29, 2021, 12:45:31 am
i thought it would be better to install codetyphoon big ide but it didnt compile because of file extensions etc. then i tried mr avra's ct2laz to convert but couldnt find its compiled version..
https://bitbucket.org/avra/ct2laz/downloads/
TinyPortal © 2005-2018