Recent

Author Topic: How to run IDE in 64bit/Cocoa and compile apps with 64bit/Cocoa?  (Read 7848 times)

Hansaplast

  • Hero Member
  • *****
  • Posts: 674
  • Tweaking4All.com
    • Tweaking4All
How to run IDE in 64bit/Cocoa and compile apps with 64bit/Cocoa?
« on: September 20, 2015, 12:55:00 pm »
I know this might be a silly question, and with the risk of sounding dumb or being ignored ... but anyhow:
I was wondering if the Lazarus IDE can completely run 64 bit/Cocoa.

I have tried SVN trunk and building a cross compiler (link, link and link), I've tried the GetLazarus.org method, but whatever I try, I keep running into issues.

Would anybody be willing to help me with this or make a small write up on how to accomplish this?

tecurb

  • Newbie
  • Posts: 3
Re: How to run IDE in 64bit/Cocoa and compile apps with 64bit/Cocoa?
« Reply #1 on: September 30, 2015, 10:24:33 am »
I don't think this has ever been done successfully, at least not with yosemite and xcode 7. I don't think it can be done without a lot of work, at least getting the IDE built this way. Cross-compiling from the (Carbon based and working) i386 build of the IDE to create x86_64 apps built with Cocoa "works" but in my experience (with Lazarus 1.4.2) the cocoa widget set is still very incomplete; my test case projects compile and run, sort of, but many widgets are not rendered correctly (in cocoa) and they don't respond to mouse input very well.

Very interested to learn if anyone can provide examples that prove me wrong  :)

Hansaplast

  • Hero Member
  • *****
  • Posts: 674
  • Tweaking4All.com
    • Tweaking4All
Re: How to run IDE in 64bit/Cocoa and compile apps with 64bit/Cocoa?
« Reply #2 on: September 30, 2015, 03:10:34 pm »
Hi tecurb!

Thanks for the reply and thanks for confirming ,...
I absolutely love Lazarus, and maybe this is personal, but I have yet to find an alternative that works a easy as Lazarus Pascal [Delphi]. And yes I have been looking around, but have not find anything that comes even close. (Apple! Are you taking notes?)


I'd love to see some Cocoa progress.
Nothing but respect for those involved with the Lazarus development, it's absolutely awesome, but could it be that the Mac corner is a little dormant? I do try to figure things out by myself, and even though I'm not the best and most experienced programmer, I do try to assist in finding/fixing bugs where I can and do fail miserably at times. Sometimes it just goes way over my head  :o ...


Note: I'm most certainly not trying to criticize any of the Mac developers - I know this is voluntair work, and I'm very grateful for what has been done so far and what will be done in the future.


Anyhow ... if anyone knows a way, please share.

Bostjan

  • New Member
  • *
  • Posts: 14
Re: How to run IDE in 64bit/Cocoa and compile apps with 64bit/Cocoa?
« Reply #3 on: September 30, 2015, 03:20:45 pm »
I think taht i saw here on forums that one user is making big contributions for Cocoa on OSX. I presume that this code is not yet present in stable build of lazarus and you need to build latest version from trunk.


What I mean is - if I build a solution on Carbon/Lazarus today - can I risk it will suddenly not work? And/or are people here betting on Cocoa implementation then being ready? (I am fine with not being able to build 64bit for OSX for many years or having access to new APIs)

I am working in LCL-Cocoa. Please test your application with it and report problems in the BTS. Please attach in bug reports minimal applications reproducing the problem. That's my proposed answer to your Carbon question: Test Cocoa, report bugs.


tecurb

  • Newbie
  • Posts: 3
Re: How to run IDE in 64bit/Cocoa and compile apps with 64bit/Cocoa?
« Reply #4 on: October 01, 2015, 01:19:04 am »
I'll give the latest lazarus trunk a go soon. Do you know if FPC 2.6.4 is sufficient or does one need to use 3 for the lazarus trunk?

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: How to run IDE in 64bit/Cocoa and compile apps with 64bit/Cocoa?
« Reply #5 on: October 01, 2015, 01:46:10 am »
2.6.4 is enough

Hansaplast

  • Hero Member
  • *****
  • Posts: 674
  • Tweaking4All.com
    • Tweaking4All
Re: How to run IDE in 64bit/Cocoa and compile apps with 64bit/Cocoa?
« Reply #6 on: October 01, 2015, 05:03:37 pm »
@tecurb;


I've tried trunk several times, but I keep failing miserably (which very well could be because of my lack of experience).
Please post if you've gotten it to work, and ... how you got there ...  8)


@Bostjan;


I have seen that there is at least one major contributor when it comes to Cocoa - kuddos!
Wish I could do something, but my Cocoa knowledge is pretty much zero.  :-[



@skalogryz;


Thanks - I've tried 2.6.4 and 3.x (3.0.1? or 3.1? I forgot) ... no luck.
Again: probably due to my lack of experience.

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: How to run IDE in 64bit/Cocoa and compile apps with 64bit/Cocoa?
« Reply #7 on: October 01, 2015, 05:58:27 pm »
Thanks - I've tried 2.6.4 and 3.x (3.0.1? or 3.1? I forgot) ... no luck.
Again: probably due to my lack of experience.
What exactly is happening for you?

Hansaplast

  • Hero Member
  • *****
  • Posts: 674
  • Tweaking4All.com
    • Tweaking4All
Re: How to run IDE in 64bit/Cocoa and compile apps with 64bit/Cocoa?
« Reply #8 on: October 02, 2015, 01:17:43 pm »
I'll have to redo everything to show you the details - I know, that's not helpful at all.
I'll wait with redoing all that though, and see what tecurb's findings will be.
If he doesn't get to it, then (tecurb) please let me know and I'll give it a try again.

Hansaplast

  • Hero Member
  • *****
  • Posts: 674
  • Tweaking4All.com
    • Tweaking4All
Re: How to run IDE in 64bit/Cocoa and compile apps with 64bit/Cocoa?
« Reply #9 on: October 06, 2015, 09:10:33 pm »
OK, I've don yet another attempt to build from SVN, the explanations out there have been a little confusing.


Some steps I have done, which result in a "working" Lazarus 1.5, the 32 bit version is already goes wrong, so I'm doing something very wrong ... let alone a 64 bit version.
 
Steps I've done so far:
 
Code: Bash  [Select][+][-]
  1. mkdir ~/freepascal
  2. cd ~/freepascal
  3. svn co http://svn.freepascal.org/svn/fpc/trunk fpc
  4. cd fpc
  5. make clean all install INSTALL_PREFIX=~
  6. nano ~/.fpc.cfg
Just to check the contents looks like this:


  #include /etc/fpc.cfg
    -Fu~/lib/fpc/$fpcversion/units/$fpctarget
    -Fu~/lib/fpc/$fpcversion/units/$fpctarget/*
    -Fu~/lib/fpc/$fpcversion/units/$fpctarget/rtl

Code: Bash  [Select][+][-]
  1. mkdir ~/freepascal/lazarus
  2. cd ~/freepascal/lazarus
  3. svn co http://svn.freepascal.org:8080/svn/lazarus/trunk lazarus
  4. (or: svn update)
  5. make LCL_PLATFORM=cocoa
Lazarus starts, but as soon as I drop a TButton on a TForm I get an exception ...
Please tell me where I'm getting wrong.

nhatdung

  • New Member
  • *
  • Posts: 37
Re: How to run IDE in 64bit/Cocoa and compile apps with 64bit/Cocoa?
« Reply #10 on: February 13, 2016, 10:03:34 am »
roadmap here show TForm, TButton working
http://wiki.lazarus.freepascal.org/Roadmap#General_status_of_LCL_interfaces

anyone known how to make Lazarus work with cocoa ? I just make an app with most of components is TGraphicControl and i don't need cocoa components at all, but i need the app in 64bit

zeljko

  • Hero Member
  • *****
  • Posts: 1596
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: How to run IDE in 64bit/Cocoa and compile apps with 64bit/Cocoa?
« Reply #11 on: February 13, 2016, 01:33:27 pm »
Build lazarus for carbon 32 bit and just rebuild your application for cocoa. Cocoa isn't enough stable yet to be used as IDE widgetset.

nhatdung

  • New Member
  • *
  • Posts: 37
Re: How to run IDE in 64bit/Cocoa and compile apps with 64bit/Cocoa?
« Reply #12 on: February 14, 2016, 02:04:02 am »
Build lazarus for carbon 32 bit and just rebuild your application for cocoa. Cocoa isn't enough stable yet to be used as IDE widgetset.

ic, thanks

 

TinyPortal © 2005-2018