It occurred to me that I've been using
fpc 3.3.1 in all my attempts so far, so I installed
3.2.2 under my
Lazarus_4.0 folder which I moved to my own user folder. I also
chmod -R 755'd everything and
chown -R carlcaulkett:staff'd everything. I made sure to set all of the correct settings in the initialisation dialog.
I amended my component code to...
unit testEdit;
{$mode ObjFPC}{$H+}
interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls;
type
TtestEdit = class(TEdit)
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents('Test',[TtestEdit]);
ShowMessage('Register called'); // <== added this
end;
end.
On trying to install the component and rebuilding the IDE and restarting, the
'Register called' message does not appear and the component is not added. However the timestamp of the
lazarus executable show that it is being rebuilt and written to disk. This suggests that in
4.0rc1, on
macOS at least,
Lazarus is not even attempting to call
Register. This is why, presumably, third party component packages fail to install, as well.
If I do the same operation in
fpc 3.31/Laz 3.99, the
'Register called' message does appear when
Lazarus restarts and the component is added to the library.
If some OS intervention is taking place, it must be very selective, choosing to affect
Lazarus 4.0rc1 and not
Lazarus 3.99