Recent

Author Topic: Mac install  (Read 3131 times)

Grahame Grieve

  • Sr. Member
  • ****
  • Posts: 365
Mac install
« on: October 15, 2020, 01:02:11 pm »
Installing Lazarus on MacOS remains in the too hard realm for me. I don't know why it's so hard, but I don't know OSX well.

I tried 2 different ways to install.

Downloading the binaries from sourceforge
------------------------------------------------

This worked well, per the instructions on the wiki, and then lazarus runs fine (used the FPC binaries from 2.0.11 release, and 2.0.10 lazarus, since 2.0.11 doesn't seem to exist). The first thing I do is install the anchorDocking and AnchorDockingDsgn packages. The IDE dutifully goes off and rebuilds, and then restarts, with docking (though only once I click on it somewhere). but when it restarts, it's in this funny mode where it doesn't get it's menu - it's running, but I get the finder menu instead. So when i close that and reopen lazarus, then I get the original lazarus, without docking.

Tried that cycle several times, and got the iDE to rebuild itself. no change.... beats me.

FPCUPdeluxe
--------------
ok. try with FPCUpdeluxe, using stable.git for both versions. Builds no problems. sweet.

Lazarus won't run, using the icon it put in the applications folder:

"You can't open the applciation "lazarus" because it is not supported on this type of Mac."

And yes, it is the 64bit version. It does run, actually, if I run the "lazarus" file in the directory I installed it in, next to the lazarus app. but... that runs in the terminal, and I don't get any menus (just get the terminal menu). I can't figure out how to tell MacOS to run the executable properly.

At this point, I'm stuck. I don't think I did anything stupid...


Grahame Grieve

  • Sr. Member
  • ****
  • Posts: 365
Re: Mac install
« Reply #1 on: October 15, 2020, 01:03:01 pm »
oh: brand new Caralina 10.15.7 on a mac mini

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1739
Re: Mac install
« Reply #2 on: October 15, 2020, 01:21:32 pm »
Never seen this error message with FPC and Lazarus trunk.
I will try stable in my Mac VM 10.15.7.

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: Mac install
« Reply #3 on: October 15, 2020, 01:23:00 pm »
The first thing I do is install the anchorDocking and AnchorDockingDsgn packages. The IDE dutifully goes off and rebuilds, and then restarts, with docking (though only once I click on it somewhere). but when it restarts, it's in this funny mode where it doesn't get it's menu - it's running, but I get the finder menu instead. So when i close that and reopen lazarus, then I get the original lazarus, without docking.

Lazarus is installed in a read-only directory for a user/admin. When you rebuild Lazarus, it notices it cannot write to its directory and so it instead writes the new version to ~/.lazarus. You need to start that new version and not the one in the Applications folder.

Yes, it's annoying and I logged it in the BugTracker here.

One solution is to download the Lazarus source with svn or git into your home directory and compile it yourself which is what I do and why I never noticed the issue for more than a year.

Quote
"You can't open the applciation "lazarus" because it is not supported on this type of Mac."

I have never used FPCUPDeluxe, but I suspect that it might be because the application is not signed or notarized, you need to right-click on it and choose Open.

Quote
And yes, it is the 64bit version. It does run, actually, if I run the "lazarus" file in the directory I installed it in, next to the lazarus app. but... that runs in the terminal, and I don't get any menus (just get the terminal menu). I can't figure out how to tell MacOS to run the executable properly.

In macOS you need to open the app bundle to run an application - so in a terminal you would type something like "open /Applications/lazarus.app"
« Last Edit: October 15, 2020, 01:29:09 pm by trev »

Grahame Grieve

  • Sr. Member
  • ****
  • Posts: 365
Re: Mac install
« Reply #4 on: October 15, 2020, 01:28:33 pm »
I did right click and choose 'open' - didn't make any difference. And running from the terminal ran it fine, but it doesn't get a menu..

I'll reinstall from the web site again and try

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: Mac install
« Reply #5 on: October 15, 2020, 01:31:15 pm »
And running from the terminal ran it fine, but it doesn't get a menu..

I just tried "open /Applications/lazarus.app" from a terminal on Catalina 10.15.7 on a 2018 Mac mini and it opened Lazarus complete with menus.

Grahame Grieve

  • Sr. Member
  • ****
  • Posts: 365
Re: Mac install
« Reply #6 on: October 15, 2020, 01:32:32 pm »
trunk.git fails for me:

Found valid git application.
fpcupdeluxe: Executing: /usr/bin/git status --porcelain (working dir: /Users/grahamegrieve/lazarus/fpcsrc)
fpcupdeluxe: Executing: /usr/bin/git config remote.origin.url (working dir: /Users/grahamegrieve/lazarus/fpcsrc)
fpcupdeluxe: ERROR: FPCNativeInstaller (CheckModule: FPC): sources error (URL mismatch).
fpcupdeluxe: ERROR: FPCNativeInstaller (CheckModule: FPC): desired URL=https://github.com/graemeg/freepascal.git/
fpcupdeluxe: ERROR: FPCNativeInstaller (CheckModule: FPC): source URL=https://github.com/graemeg/freepascal.git/

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1739
Re: Mac install
« Reply #7 on: October 15, 2020, 01:38:59 pm »
For sure !
Quote
sources error (URL mismatch).
You have to install in another directory.
I have an install of fixes in a directory named fixes.
I have an install of trunk in a directory named trunk.
I am making an install of stable in a directory named stable.
Those three directories all have a directory named up, if which fpcupdeluxe is placed. So, every install has its own fpcupdeluxe. Not chances of messing around with settings.

Edit:
The screenshot from Windows shows my setup with 7 different combo's.
« Last Edit: October 15, 2020, 01:46:28 pm by DonAlfredo »

Grahame Grieve

  • Sr. Member
  • ****
  • Posts: 365
Re: Mac install
« Reply #8 on: October 15, 2020, 01:50:56 pm »
open lazarus.app for the App that fpcupdeluxe installs:

The application cannot be opened because it has an incorrect executable format


Grahame Grieve

  • Sr. Member
  • ****
  • Posts: 365
Re: Mac install
« Reply #9 on: October 15, 2020, 02:33:09 pm »
So I don't know if this is an install issue or not but if I give my program a working directory in run..parameters, shouldn't that value turn up in getCurrentDir at run time?

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1739
Re: Mac install
« Reply #10 on: October 15, 2020, 03:39:14 pm »
Quote
The application cannot be opened because it has an incorrect executable format
Confirmed. Looking into this.

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1739
Re: Mac install
« Reply #11 on: October 15, 2020, 04:28:13 pm »
Stable up and running on 10.15, installed with fpcupdeluxe. See screenshot.
The problem seems to be the Info.plist inside the lazarus.app and startlazarus.app files/directories. Looking into it.

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1739
Re: Mac install
« Reply #12 on: October 15, 2020, 09:21:17 pm »
Update.
It seems that latest Mac OSX versions do not like the textual links that are included inside lazarus.app and startlazarus.app.
I have uploaded a new version of fpcupdeluxe : 1.8.2c . Download link included.
https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/download/1.8.2c/fpcupdeluxe-x86_64-darwin-cocoa.zip
This version will replace the textual links with real symlinks. That should work better !

Grahame Grieve

  • Sr. Member
  • ****
  • Posts: 365
Re: Mac install
« Reply #13 on: October 15, 2020, 09:59:12 pm »
Awesome. What was the exact change you made in the plist?

lproven

  • New member
  • *
  • Posts: 9
Re: Mac install
« Reply #14 on: October 16, 2020, 01:31:42 pm »
Installing Lazarus on MacOS remains in the too hard realm for me. I don't know why it's so hard, but I don't know OSX well.

I too had _significant_ problems getting it installed and working as an upgrade from a 2017 version on macOS 10.4 "Mojave".

I am not sure if the information is relevant to Catalina though -- I refuse to allow Catalina near any of my Macs (yet).

In the end, I got some help from the mac-pascal mailing list, and some guidance from the FreePascal Reddit.

I have some suggestions for the Mac section of the installation instructions. Who should I talk to about that?

 

TinyPortal © 2005-2018