Lazarus

Installation => macOS / Mac OS X => Topic started by: bsilver on October 19, 2020, 09:19:16 pm

Title: Package installed status: "Partially"
Post by: bsilver on October 19, 2020, 09:19:16 pm
Lazarus version 2.0.10, FPC 3.2.0, OSX 10.15.7

Trying to learn my way around the IDE; wanted to install some support for encryption.
Package-> Online Package Manager
Installed DCPcrypt
Recompiled the IDE
when it came back up, there were tabs for DCPcrypt and DCPhash.
When I restart the IDE again, the tabs are gone.

I go to the Online Package Manager, it shows DCPcrypt "Installed" column is "Partially".
Selecting DCPcrypt, it says dcpcrypt.lpk "Installed" column is 2.0.4.1, "Status" up to date and dcpcrypt_laz.lpk "installed" column is "-", status "extracted".

Package Links shows both dcpcrypt and dcpcrypt_laz at version 2.0.4.1 in a .lazarus folder in my home directory with a state of "valid".

Package install/uninstall shows dcpcrypt_laz 2.0.4.1 in the install column, current state selected for installation, not installed, DesignTime and the "save and rebuild IDE" button is greyed out.

Is there something I'm overlooking to activate that package/component for the IDE?
Title: Re: Package installed status: "Partially"
Post by: ASBzone on October 19, 2020, 10:15:49 pm
Not sure how to help you with that issue, but DCPcrypt is very old at this point.

I'd recommend that you use HashLib4Pascal instead.  More robust and better supported.
Title: Re: Package installed status: "Partially"
Post by: trev on October 20, 2020, 01:52:04 am
Lazarus version 2.0.10, FPC 3.2.0, OSX 10.15.7

Trying to learn my way around the IDE; wanted to install some support for encryption.
Package-> Online Package Manager
Installed DCPcrypt
Recompiled the IDE
when it came back up, there were tabs for DCPcrypt and DCPhash.
When I restart the IDE again, the tabs are gone.

Lazarus in installed into a read-only directory on macOS so when you add a new package which requires Lazarus to recompile itself, it finds it cannot write to the direct in which it is installed, so it writes the new version of the executable to the /Users/<name>/.lazarus/bin directory instead. This is fine until you exit Lazarus and start it again. When you start it again, it runs the original executable without your recently installed package.

The current solution is to run the Lazarus executable that you will find in the .lazarus directory in your home directory.

Alternatively, install your own copy of Lazarus from source in your home directory so that recompilatiions of Lazarus can write to its directory - full details in the Wiki article Installing Lazarus on macOS (https://wiki.freepascal.org/Installing_Lazarus_on_macOS).

I have reported this to the BugTracker here (https://bugs.freepascal.org/view.php?id=37753) for resolution.

[Edit: corrected path]
Title: Re: Package installed status: "Partially"
Post by: bsilver on October 20, 2020, 03:49:27 pm
Thank you for the hint! I found the new executables hiding in ./.lazarus/bin; one launches from a terminal and the other is the .app bundle that behaves as expected. What a sneaky operational bug...
TinyPortal © 2005-2018