Recent

Author Topic: macOS & 64bit  (Read 13620 times)

Frank

  • Jr. Member
  • **
  • Posts: 69
macOS & 64bit
« on: January 03, 2018, 09:07:29 pm »
Hi All,
  I was codesigning a project, when Xcode gave me this warning :

"macOS High Sierra is the last version of macOS that will run 32-bit apps without compromise. It is strongly recommended that apps support 64-bit as soon as possible. The Mac App Store will require new apps to include 64-bit support by January 2018 and for all apps (including updates) to be exclusively 64-bit by June 2018."

Does this mean the end to Lazarus/carbon ?

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: macOS & 64bit
« Reply #1 on: January 03, 2018, 09:15:18 pm »
Does this mean the end to Lazarus/carbon ?

Yes for Mac App Store apps, maybe for post High Sierra - we don't know whether Carbon will be dropped.

Here's Apple's announcement from last summer:

https://developer.apple.com/news/?id=06282017a

This will affect very few developers since most have been on 64-bit Cocoa for many years. Only Lazarus is affected.

You could test your app against the Cocoa widgetset code in SVN and report any errors in the Bugtracker system at left. Dmitry is fixing things at a rapid pace.

Frank

  • Jr. Member
  • **
  • Posts: 69
Re: macOS & 64bit
« Reply #2 on: January 03, 2018, 09:24:29 pm »
@Phil Once again, thanks. I've tinkered with Cocoa, but relied on carbon... Cocoa it is...

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: macOS & 64bit
« Reply #3 on: January 03, 2018, 09:26:17 pm »
@Phil Once again, thanks. I've tinkered with Cocoa, but relied on carbon... Cocoa it is...

You might find these instructions handy:

https://macpgmr.github.io/MacXPlatform/UsingCocoaFromTrunk.html

You can skip steps 4-6 if you don't use TWebBrowser.

If you have packages that you added to your Carbon IDE and rebuilt the IDE, you can compile them as in step 4 - you only need to compile them with the SVN lazbuild, you don't need to install them in the Cocoa IDE.

jwdietrich

  • Hero Member
  • *****
  • Posts: 1232
    • formatio reticularis
Re: macOS & 64bit
« Reply #4 on: January 03, 2018, 09:49:06 pm »
This is an important topic. Let's push the Cocoa widgetset...
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

Frank

  • Jr. Member
  • **
  • Posts: 69
Re: macOS & 64bit
« Reply #5 on: January 03, 2018, 09:51:52 pm »
@Phil
  I had a quick look at the web page, I already use 1.9svn trunk with alternate install.

  And it should be fun ;)

  Thanks !

jwdietrich

  • Hero Member
  • *****
  • Posts: 1232
    • formatio reticularis
Re: macOS & 64bit
« Reply #6 on: January 03, 2018, 10:10:29 pm »
Sphere 10 offers a bounty of USD $3000 for a completed implementation of the Cocoa widgetset. See http://wiki.lazarus.freepascal.org/Bounties#Cocoa_bounties for details.
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

Frank

  • Jr. Member
  • **
  • Posts: 69
Re: macOS & 64bit
« Reply #7 on: January 03, 2018, 11:12:56 pm »
  Followed instructions, all went well. My 2 Delphi 10.2 FMX programs are now running 64-bit Cocoa Lazarus/FPC.
  I (as of yet) only see one issue, the ListView does not allow selection of an item (Bug tracker #0032011).

  And yes, 64-bit Cocoa Lazarus, while I did use it to compile/run the programs, does need some fine tuning. Do I report the IDE issues the same as component/widgetset ones ?

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: macOS & 64bit
« Reply #8 on: January 03, 2018, 11:32:14 pm »
And yes, 64-bit Cocoa Lazarus, while I did use it to compile/run the programs, does need some fine tuning. Do I report the IDE issues the same as component/widgetset ones ?

It might be useful to isolate IDE bugs into small projects that illustrate the bug with the relevant control used in the IDE. Once all the widgetset bugs have been fixed, the IDE should, in theory, just work. (Although you probably know the expression: "In theory, reality is the same as theory; but in reality, it ain't.")


Josh

  • Hero Member
  • *****
  • Posts: 1271
Re: macOS & 64bit
« Reply #9 on: January 29, 2018, 09:01:53 am »
Just downloaded latest Trunk of Lazarus Cocoa.

Issues after 30 minutes of testing.

IDE Issues
after fresh install onto new partition, starting lazarus (startlazarus) getting arithmetic error message. neeed to rebuild/clean lazarus to stop this error.

I think Lazarus should start wit the Messages, Object Inspector and Source Editor Windows visible as default, at the moment when I started for first time, just the Main Menu and Component Menu Bar are visible.

When you choose to rebuild lazarus either from options menu  or after installing a package manually or via OPM; lazarus does not restart after the rebuild. Starting lazarus from startlazarus shortcut.

OPM screen does not always come to front, and the Icons to install, update etc do not appear, if you stretch OPM screen the icons appear above where they should be and you can use this as a reference to where the non visible control is by clicking the blank are underneath.

Various windows and dialogs do not  always come to front, so the IDE looks non responsive ( as they appear underneath form/source editor, which are then inactive because the modal dialog is active but underneath another visible form).

Various dialogs where you have options for Okay, Cancel the buttons are visible but not active; you need to use the dialig close button to abort.

The Show Form command does not always work, switching between various projects units that have forms, the show form command is not highlighted and the shortcut does not work either, closing the unit source file and re-openeing generaly corrects this, but then after switcing between various units again the form will not be availabe again to be shown.

Tried to use KControls component, this compiles and installs, but if you place various components on form ( ie Kgrid) you get error graphics resource cannot be loaded.

Took 3 attempts to install BGRABitmap, this failed in OPM, but managed to finally install it after 3rd attempt of manual installl of package ussing the repositry entry created by OPM.

On screen default font visibly much smaller than previous version tested 3 months ago. on 32 inch sceen (1920x1080) readable, on 21 inch screen (1920x1080) too small to read. Carbon version of latest trunk, font visible size is OK.

Unable to move the Main Component Menu Bar underneath the Lazarus Main Menu, there is a gap of about 40/50 pixels.

Hopefully the above issues/findings are not too big, the KControls issue would be a nice one to fix but as its a 3rd party component it might not be so easy.

So far the progress from when I tested a few months back, is amazaing and it is developing nicely and at a fast pace, well done to the developer(s).

 
The best way to get accurate information on the forum is to post something wrong and wait for corrections.

MISV

  • Hero Member
  • *****
  • Posts: 783
Re: macOS & 64bit
« Reply #10 on: January 29, 2018, 04:40:46 pm »
I just tried Trunk as well using fpcdeluxe (thanks!) Can you recompile IDE to carbon? I wanted to use IDE in carbon but try compile my code in Coca

When I try - I get error
Quote
carbonproc.pp(563,13) Error: Identifier not found "ATSUFindFontFromName"

Anyhow - beyond that - I think IDE looks great in Coca - last outstanding issues solved and everything is good to go it seems to me :)



esvignolo

  • Full Member
  • ***
  • Posts: 159
  • Using FPC in Windows, Linux, Macos
Re: macOS & 64bit
« Reply #11 on: January 29, 2018, 05:20:32 pm »
I MISV, can u send a couple of screenshots?

Thanks!

I just tried Trunk as well using fpcdeluxe (thanks!) Can you recompile IDE to carbon? I wanted to use IDE in carbon but try compile my code in Coca

When I try - I get error
Quote
carbonproc.pp(563,13) Error: Identifier not found "ATSUFindFontFromName"

Anyhow - beyond that - I think IDE looks great in Coca - last outstanding issues solved and everything is good to go it seems to me :)

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: macOS & 64bit
« Reply #12 on: January 29, 2018, 05:48:16 pm »

MISV

  • Hero Member
  • *****
  • Posts: 783
Re: macOS & 64bit
« Reply #13 on: January 30, 2018, 01:10:55 pm »
When I try - I get error
Quote
carbonproc.pp(563,13) Error: Identifier not found "ATSUFindFontFromName"

http://wiki.freepascal.org/Cocoa_Interface#Compiling

http://wiki.freepascal.org/Carbon_Interface#Error_ATSUFindFontFromName

Thank you - that solved that (carbon+darwin+i386) albeit I know get

Quote
"Fatal: Cannot find system used by fcllaz of package FCL."

I will try research hat error and report back

Josh

  • Hero Member
  • *****
  • Posts: 1271
Re: macOS & 64bit
« Reply #14 on: January 30, 2018, 01:32:56 pm »
Hi

Try a rescan of sources, this may fix it. ( Tools -> Rescan FPC Source Directory )
If issue is with IDE try a Clean Build. ( Tools -> Configure Build lazarus, in window that pops up make sure no 'Odd' settings  are set and tick the option Clean All.

Make sure your project options match the CPU and Wdgetset used,   carbon = i386, cocoa =X86-64.

Just some ideas
The best way to get accurate information on the forum is to post something wrong and wait for corrections.

 

TinyPortal © 2005-2018