Recent

Author Topic: TOTAL NEWBIE: how to install Lazarus on OS X intel Max  (Read 53866 times)

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: TOTAL NEWBIE: how to install Lazarus on OS X intel Max
« Reply #15 on: February 27, 2007, 06:54:05 pm »
Quote from: "abb"
Quote from: "Phil"
Quote from: "jhyams"
I then saw all that stuff about Fink and http://wiki.lazarus.freepascal.org/OS_X_Programming_Tips

I'm sorry to interfere with your discussion but I'm also a perfect newbie in Mac :) And I appreciate the link above! But the comparative table of different libraries and their capabilities makes me blue... I'd like to port a big (in code) Delphi app into Mac OS. But I don't need too many several visual components but few scrollboxes TImage and TTreeView. But I'd like to create really easy-to-install and easy-to-use Mac app just as it is for Windows now. And I'd prefer to have an app looking natively in Mac OS. So, the question is -- whether I really need Lazarus? Or can I just use X-code with Carbon + FPC 2.1? As I see, after FPC installation a new type of New Project appears in the X-Code -- Pascal Carbon Application. Is it what I can use taking in the account all my wishes, enumerated above?

Please help me understand it!


There's a lot of activity on the Carbon widgetset recently, led by Tom G. See this site for the current status:

http://wiki.lazarus.freepascal.org/Carbon_interface_internals

Also see this site for status of individual widgets (controls) on Carbon:

http://wiki.lazarus.freepascal.org/Roadmap#Widgetset_dependent_components

Information on creating an easy-to-use installer on OS X is here:

http://wiki.lazarus.freepascal.org/Deploying_Your_Application

Note that you can do all your development with GTK. You won't really need Carbon until you're ready to deploy your application.

Thanks.

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: RE: Re: TOTAL NEWBIE: how to install Lazarus on OS X int
« Reply #16 on: February 27, 2007, 06:59:33 pm »
Quote from: "abb"
Quote from: "kalle_19"
Well, you can use XCode, but it's pretty different than delphi RAD - you need to create connections and headers just to use a button...

So, good... are you about a X-Code with FPC? If yes, then why should I "create a button"? Can't I use already existing components from Carbon library? Or I can't use the "X_Code's Carbon" because it is C++ library? Could you clarify it?

Also can I use Lazarus in a way that:

-- would not require to install any special system components like X11, etc. on a target computer? I'm agree to install everything I need on my (developer's) computer, but not at the user's computer.

-- would create an app, easily installable in a user's system just like a package is installed by few mouse clicks?

-- would create a user interface, looking natively in Mac OS? This is because I'm speaking about a commercial project... External look-and-feel is important here!

Appreciate a clarification!


The Carbon widgetset will provide you with all that you need for Lazarus. Work is underway on the Carbon widgetset. I suggest that you work through the steps that you list for a simple app that only uses controls that Carbon currently supports.

http://wiki.lazarus.freepascal.org/Carbon_interface_internals

I think you'll find that Carbon is the answer. If you would like to help out and speed up the development of the Carbon wdgetset, please sign up for something to work on.

Creating an installer doesn't have much to do with what widgetset you use:

http://wiki.lazarus.freepascal.org/Deploying_Your_Application

We all would like what you require, but until now there hasn't been a concerted effort to complete the Carbon widgetset. That's changing quickly with the heroic efforts of Tom G. Get the latest OS X Lazarus snapshot or SVN source and see what he's added!

Thanks.

abb

  • New Member
  • *
  • Posts: 40
Re: RE: Re: TOTAL NEWBIE: how to install Lazarus on OS X int
« Reply #17 on: February 28, 2007, 08:20:28 am »
First of all, Phil, many thanks for your extended answer!

Quote from: "Phil"
I think you'll find that Carbon is the answer. If you would like to help out and speed up the development of the Carbon wdgetset, please sign up for something to work on.

OK, let's look in this direction. But to install Lazarus I need GTK, right? But my Mac is not connected to the Net, so I can't use Fink (at least right now). Also I've found the next phrase at the page you mentioned about:
Quote
To install the GTK libraries on a user's system, you could include instructions for using fink. Or you could create a separate .dmg file containing just the files from the /sw/lib folder on your Mac.

The first part seems to me as completely unacceptable... I never was so cruel to my users :) As for another part, I can agree, but I'd prefer to include GTK into the software package, so installer could check if GTK installation is required, and install it automatically (possibly with a notification to user).

In this relation I have a question to you guys. Could you please give me GTK as a package or as a DMG file? If anybody has a webhosting, could he upload it? Or if not, give me it and I'll can upload it to my webhosting. Thus, people like me, who do not need Fink, could easily install Lazarus.
Is the above possible?

Thanks!

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: RE: Re: TOTAL NEWBIE: how to install Lazarus on OS X int
« Reply #18 on: February 28, 2007, 04:11:26 pm »
Quote from: "abb"
In this relation I have a question to you guys. Could you please give me GTK as a package or as a DMG file? If anybody has a webhosting, could he upload it? Or if not, give me it and I'll can upload it to my webhosting. Thus, people like me, who do not need Fink, could easily install Lazarus.
Is the above possible?


I think you understand the problem now and why the Carbon widgetset is so important.

I could probably create a .dmg for you for PowerPC GTK libraries. Which processor do you have?

Note that one statement in the Deploying topic is probably not true:

Quote
Also, remember that the GTK libraries installed on your Mac are specific to the version of OS X that you're running.


When I wrote that I thought it was true but when I upgraded to 10.4 not only did Laz apps still work with the GTK libraries I downloaded for 10.3 but when I ran fink again it appeared to retrieve the same GTK libraries as before. I think only the version of fink is different, not the libraries. (Remember that the PowerPC and Intel libraries are different, though.)

I assume you need the GTK libraries to run Lazarus, not necessarily for deployment. Note that fink works fine over a phone modem, taking less than an hour to install the gtk+ and gdk-pixbuf pacakges.

Two other deployment possibilties in the meantime (while waiting for Carbon):

(1) Use Qt widgetset. This isn't finished yet, but it's further along than Carbon and has a fairly easy deployment. Note that this is for open-source apps only.

http://wiki.lazarus.freepascal.org/Qt_Interface_Mac

(2) Use GTK2 widgetset. This widgetset still has some bugs, but the set of working controls is pretty complete and it looks much better than GTK1. I've experimented with installing the Mac version of GIMP, which includes universal GTK2 libraries, and linking and running Lazarus apps against these libraries. This works but involves a bit of linking and launch trickery. I could write this up on the wiki if you think you might like to try it. The idea here is that you tell your users simply to install Gimp, which is a foolproof installation (unlike fink), then install your app.

http://www.apple.com/downloads/macosx/unix_open_source/gimpapp.html

Thanks.

abb

  • New Member
  • *
  • Posts: 40
Re: RE: Re: TOTAL NEWBIE: how to install Lazarus on OS X int
« Reply #19 on: February 28, 2007, 07:04:54 pm »
Quote from: "Phil"
I could probably create a .dmg for you for PowerPC GTK libraries. Which processor do you have?

Look at the topic subject :) I have Intel and OS X 10.4.8

If GTK2 is so good as you describe it, then why not to use it instead of GTK1? Can you give me a DMG with GTK2? Will Lazarus work with it? Or it needs just GTK1 for installation?

As for dialup modem, the only modem I have is Courier VE it is good old horse, but it is not a USB... and can't be therefore connected to my MacBook. It is simpler to Connect my Mac to the same cable as my PC connected to, but I yet need to buy a WiFi adapter for PC, etc... Shorter it would be good to get a standalone package, download it and be happy.

Appreciate your help!

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: RE: Re: TOTAL NEWBIE: how to install Lazarus on OS X int
« Reply #20 on: February 28, 2007, 08:43:40 pm »
Quote from: "abb"
I have Intel and OS X 10.4.8

If GTK2 is so good as you describe it, then why not to use it instead of GTK1? Can you give me a DMG with GTK2? Will Lazarus work with it? Or it needs just GTK1 for installation?


Sorry, I can't help you with the Intel .dmg or GTK2 libraries.

Lazarus works with whatever libraries it's compiled with. Currently the snapshots are compiled against GTK1 with OS X and Linux. I imagine the reason why it doesn't yet use GTK2 is because the GTK2 widgetset still has some bugs.

While GTK2 looks better than GTK1, it doesn't compare to Carbon native (or Qt). And of course GTK2 still requires the X11 app to run, although eventually that requirement will be eliminated (work underway on GTK2 widgetset).

Sounds like you need to get your Mac connected. Do you have a wireless router like Apple's Base Station? PC's with wireless cards work well with it too.

harveyrs

  • Newbie
  • Posts: 2
TOTAL NEWBIE: how to install Lazarus on OS X intel Max
« Reply #21 on: March 01, 2007, 01:08:03 pm »
Quote from: "Phil"
Quote from: "harveyrs"
javascript:emoticon(':!:')Here is a simple enough question: has anyone succeeded in installing Lazarus and freePascal on an Intel Mac so it is usable as a DELPHI-STYLED RAD? If so, would they be kind enough to divulge the critical path required. I am amazed at the development work behind this project, but I have, as yet, no evidence that it has fully arrived for owners of new Macs. :!:


What specific problems are you having?


The problem for this newbie is the large number of postings. OK if one has lived with all this amazing development from the outset, but coming in “after tea-break”, it is a mighty challenge to know where to begin. My cry follows a fortnight of downloading, installing and then uninstalling (in order to start with a clean sheet) Fink, GDK, Lasarus, Xll, freePascal et al. At no point have I seen an IDE or reassurance that the various parts of the application are suited to the current Intel Mac. Hence my cry for confirmation that it has been done and, if so, then a Critical Path.

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
TOTAL NEWBIE: how to install Lazarus on OS X intel Max
« Reply #22 on: March 01, 2007, 02:05:37 pm »
I think I can arrange a screenshot of Lazarus on a IntelMac, if you want.

ovidius

  • New Member
  • *
  • Posts: 21
TOTAL NEWBIE: how to install Lazarus on OS X intel Max
« Reply #23 on: March 01, 2007, 09:07:55 pm »
Quote from: "harveyrs"

The problem for this newbie is the large number of postings. OK if one has lived with all this amazing development from the outset, but coming in “after tea-break”, it is a mighty challenge to know where to begin. My cry follows a fortnight of downloading, installing and then uninstalling (in order to start with a clean sheet) Fink, GDK, Lasarus, Xll, freePascal et al. At no point have I seen an IDE or reassurance that the various parts of the application are suited to the current Intel Mac. Hence my cry for confirmation that it has been done and, if so, then a Critical Path.


Actually, I have installed Lazarus on an Intel Mac Mini and it works perfectly. I just followed the instructions of the wiki and used the daily snapshots.

I do not understand what help a screenshot would bring, so I do not post one, but if you consider this helpful, I could do it.

Phil

  • Hero Member
  • *****
  • Posts: 2737
TOTAL NEWBIE: how to install Lazarus on OS X intel Max
« Reply #24 on: March 01, 2007, 09:59:16 pm »
Quote from: "harveyrs"
My cry follows a fortnight of downloading, installing and then uninstalling (in order to start with a clean sheet) Fink, GDK, Lasarus, Xll, freePascal et al. At no point have I seen an IDE or reassurance that the various parts of the application are suited to the current Intel Mac. Hence my cry for confirmation that it has been done and, if so, then a Critical Path.


Okay, now that you have confirmation, please look at steps 1.1 through 1.5 in this link and indicate the first step where you had a problem:

http://wiki.lazarus.freepascal.org/OS_X_Programming_Tips

Since we're not mind readers, we can't diagnose the problem(s) you're having without more information.

Thanks.

abb

  • New Member
  • *
  • Posts: 40
Re: RE: Re: TOTAL NEWBIE: how to install Lazarus on OS X int
« Reply #25 on: March 04, 2007, 08:44:44 pm »
Quote from: "Phil"
Sounds like you need to get your Mac connected. Do you have a wireless router like Apple's Base Station? PC's with wireless cards work well with it too.

Am now saying "Hello World!" from the Mac OS :)

So, I've completed instructions from the doc you gave a link to until the "lazarus tryout" step. At its launch I've got in X11 window:

Code: [Select]
TApplication.IconChanged - TODO: convert this message...no implementation in gtk or win32
Note: environment config file not found - using defaults


And a messagebox is popped up, saying:

Code: [Select]
======================================
              Free Pascal Compiler not found

The Free Pascal compiler (filename: ppc386) was not found
It is recommended that you install fpc
======================================


After clicking "Ignore" button (the only one) Lazarus starts. OK. Now I'm dropping a couple of TButton's on a form and am trying to assign an OnClick() event handler... Yet another error appears. It looks like it can't find some units like Classes, etc. A red line appears on the Uses clause in my Unit1.pas window and the Classes.pas file is opened in another unit window.

What does it all mean?

Also, could anybody answer it for me: can I be sure that just Intel versions of GTK and other libraries have been downloaded by fink, if I've used the Intel version of the fink package? How can I check, that all libraries were installed OK?

Thanks.

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
TOTAL NEWBIE: how to install Lazarus on OS X intel Max
« Reply #26 on: March 04, 2007, 08:50:03 pm »
Did you install all 3 dmgs: fpc, fpcsrc and lazarus?

If so, go to the environment options and fill in the correct path for the compiler and the fpc source directory.

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: RE: Re: TOTAL NEWBIE: how to install Lazarus on OS X int
« Reply #27 on: March 04, 2007, 10:16:53 pm »
Quote from: "abb"
Also, could anybody answer it for me: can I be sure that just Intel versions of GTK and other libraries have been downloaded by fink, if I've used the Intel version of the fink package? How can I check, that all libraries were installed OK?


I think you can safely ignore the "TODO" and "Note" messages at start up. I get those too.

I've noticed that for some reason when first installed Lazarus doesn't seem to be able to find the FPC compiler, even though it can find the FPC source. This is easy to fix. In Environment options, under Compiler path, you can enter:

/usr/local/bin/ppcppc

This shouldn't be necessary when you install future snapshots as Lazarus saves this info (and lots more) in the .lazarus folder in your home folder. You can't see this in Finder since it's "hidden", but you can see it in a terminal:

cd ~
ls -a
cd .lazarus
ls

If the Lazarus IDE comes up, that should mean that the GTK libraries are installed okay. Lazarus depends on several of them just to start. You can see which ones as follows:

cd /usr/local/share/lazarus
otool -L lazarus

And these libraries depend on additional GTK libraries. I think you would know it if you didn't have them installed right.

Thanks.

abb

  • New Member
  • *
  • Posts: 40
Re: RE: Re: TOTAL NEWBIE: how to install Lazarus on OS X int
« Reply #28 on: March 05, 2007, 09:59:06 am »
Quote from: "Phil"
/usr/local/bin/ppcppc

In the Intel case I must write "ppc386" instead of "ppcppc"
Quote from: "Phil"
You can't see this in Finder since it's "hidden", but you can see it in a terminal:

cd ~
ls -a
cd .lazarus
ls

Or just use MUCommander :) That's a great tool, which really opened my eyes to the Mac OS disk structure!

The only issue I have now is the inability of Lazarus quick launch. The command from the doc is not working for some reason:
Code: [Select]
open -a /usr/local/share/lazarus/lazarus
2007-03-05 12:43:32.197 open[361] LSOpenFromURLSpec() returned -10827 for application /usr/local/share/lazarus/lazarus path (null).
2007-03-05 12:43:32.198 open[361] Couldn't launch application:  /usr/local/share/lazarus/lazarus

Though the two-step launch from X11 Terminal is working OK:
Code: [Select]
cd /usr/local/share/lazarus
./lazarus


Any ideas?

rc

  • Newbie
  • Posts: 2
problem installing lazarus
« Reply #29 on: March 20, 2007, 06:30:23 pm »
Having trouble installing Lazarus on a PPC iMac G5.
Following the instructions on http://wiki.lazarus.freepascal.org/OS_X_Programming_Tips
when I try to install the Lazarus package, I get a (rather cryptic) error message: "There were errors installing the software. Please try again"

The other packages (fpc and focsrc) installed fine.

Version numbers:
fpc 2.0.4
fpcsrc 2.0.4
lazarus 0.9.20

Thanks for your help

 

TinyPortal © 2005-2018