Recent

Author Topic: Minimum OS version to run apps made with Cocoa  (Read 2453 times)

AL

  • Sr. Member
  • ****
  • Posts: 264
Minimum OS version to run apps made with Cocoa
« on: March 31, 2020, 04:37:45 pm »
What is the minimum MacOS version to run apps made with Lazarus Cocoa widgetset?
I have tested my app on Mojave, but wonder if it would run on previous versions.
Especially since I use AudioQueue to input the Mic.
Laz 3.1, fpc 3.2.2, Win10
Laz 3.1  fpc 3.2.2, MacOS Monterey running on VMWare/Win 10
Laz 3.1  fpc 3.2.2 Ubuntu 20.04

jwdietrich

  • Hero Member
  • *****
  • Posts: 1232
    • formatio reticularis
Re: Minimum OS version to run apps made with Cocoa
« Reply #1 on: March 31, 2020, 06:41:40 pm »
As far as I can find out they run well on macOS 10.12 Sierra (and, of course 10.13 High Sierra, 10.14 Mojave and 10.15 Catalina), but they don't run on macOS 10.6 Snow Leopard. I am not sure about the versions in between.
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.2.6 | FPC 3.2.2 | PPC, Intel, ARM | macOS, Windows, Linux

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Minimum OS version to run apps made with Cocoa
« Reply #2 on: March 31, 2020, 06:55:02 pm »
Cocoa widgetset code is macOS 10.6 compatible.

However, when compiling on a newer macOS, it might be necessary to specify compatibility framework during linking the project.

By default, the linker uses the "current" macOS system.
Meaning a project compiled on a certain macOS version will run on the version, and likely will run on future versions.

Yet, it's not guaranteed to run on previous macOS versions.

AL

  • Sr. Member
  • ****
  • Posts: 264
Re: Minimum OS version to run apps made with Cocoa
« Reply #3 on: March 31, 2020, 08:42:35 pm »
Cocoa widgetset code is macOS 10.6 compatible.
However, when compiling on a newer macOS, it might be necessary to specify compatibility framework during linking the project.

How do we do that?
Laz 3.1, fpc 3.2.2, Win10
Laz 3.1  fpc 3.2.2, MacOS Monterey running on VMWare/Win 10
Laz 3.1  fpc 3.2.2 Ubuntu 20.04

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Minimum OS version to run apps made with Cocoa
« Reply #4 on: March 31, 2020, 09:34:20 pm »
try to add "-WM10.6" to your FPC command-line parameter.
(which specifies the minimal macOS version to 10.6)

AL

  • Sr. Member
  • ****
  • Posts: 264
Re: Minimum OS version to run apps made with Cocoa
« Reply #5 on: March 31, 2020, 10:00:39 pm »
Thank you
Laz 3.1, fpc 3.2.2, Win10
Laz 3.1  fpc 3.2.2, MacOS Monterey running on VMWare/Win 10
Laz 3.1  fpc 3.2.2 Ubuntu 20.04

jwdietrich

  • Hero Member
  • *****
  • Posts: 1232
    • formatio reticularis
Re: Minimum OS version to run apps made with Cocoa
« Reply #6 on: March 31, 2020, 10:33:10 pm »
try to add "-WM10.6" to your FPC command-line parameter.
(which specifies the minimal macOS version to 10.6)

Good to know. Thanks.
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.2.6 | FPC 3.2.2 | PPC, Intel, ARM | macOS, Windows, Linux

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Minimum OS version to run apps made with Cocoa
« Reply #7 on: March 31, 2020, 10:55:13 pm »
Good to know. Thanks.
https://wiki.freepascal.org/FPC_New_Features_2.6.2#Support_for_specifying_and_querying_the_deployment_version
https://wiki.freepascal.org/User_Changes_3.2#Default_Target_macOS_version

IF it doesn't work you, you might need to explicitly specify SDK folder . (SDK folder will look like /Developer/SDKs/macOS10.6.sdk) using "-XR" parameter. as well as "-FD" for utility binaries (pretty much the linker)




 

TinyPortal © 2005-2018