Recent

Author Topic: [SOLVED] Mac OS X SOLUTION...  (Read 21655 times)

Fred vS

  • Hero Member
  • *****
  • Posts: 3716
    • StrumPract is the musicians best friend
Re: Mac OS X problems...
« Reply #15 on: February 07, 2011, 09:40:10 pm »
OK, i understand, i must forget mac OS X (Xcode full of bugs, no help, source lazarus linux/windows not compatible ...)  :'(
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Mac OS X problems...
« Reply #16 on: February 07, 2011, 09:52:46 pm »
I have no idea what you're talking about. You're not even using Xcode per se.

Can't you just look at your code and track down where the first exception is occurring?

Thanks.

-Phil

Fred vS

  • Hero Member
  • *****
  • Posts: 3716
    • StrumPract is the musicians best friend
Re: Mac OS X problems...
« Reply #17 on: February 08, 2011, 03:59:47 pm »
Hi Phil.
It is really difficult to explain to you my problem.
In Lazarus when i load in os x the project done in Linux, the main form (i have 2 forms, 1 splash form and 1 main form) does not appear like it have to be.

In main form, I cannot see any images, only a few of the components are there (few timers).
All the panels are not showed. The labels are not there.
Strange because in Object inspector all the components are there.

With the splash form, no problem, i see the image , panel and labels...

When i load the same lpi project in Linux or Windows, in main form all the components are showed, images, panel, etc...

Now for the code, if i use a breakpoint, in first line of formcreate (for example a dialog message), i get also the error explained in topics before.

And the button OK of dialog message is not working.

So, i m sure it is not about the code but about the loading of the form.
Thanks

 PS I have a other freeware :
https://sites.google.com/site/biotray/
who uses trayicons and also same problems on main form in OS X (this project works on linux and windows).

PS2 I have no idea what you're talking about. Do you really read what i write ?
« Last Edit: February 08, 2011, 05:01:35 pm by fredvs »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Mac OS X problems...
« Reply #18 on: February 08, 2011, 05:07:02 pm »
PS2 I have no idea what you're talking about. Do you really read what i write ?

You may indeed have discovered one or more problems with Lazarus and Carbon, but just writing about them doesn't help anyone solve them. You'll have to produce some code that allows others to reproduce them, as I suggested above.

Thanks.

-Phil

Fred vS

  • Hero Member
  • *****
  • Posts: 3716
    • StrumPract is the musicians best friend
Re: Mac OS X problems...
« Reply #19 on: February 10, 2011, 10:45:30 pm »
Yeeeep, i get it  ;D

Application.Location was the guilty...

If i load the program from myprogram.app, the path is different.
And all my libraries depend of that path...

I only have to use :

Code: [Select]
opath := Application.Location  ;
  {$IFDEF Darwin}
       opath := copy(opath,1,Pos('/myprogram.app',opath)-1);
         {$ENDIF}      

Now, let me say that : LAZARUS IS MARVELLOUS.

That application.location was the only one problem, with the fixes all the program load and run PERFECTLY, like in Linux or in Windows.
The external libraries (Bass audio) load dynamically without problems, the carbons components are very fine (much more that the one of Windows).

Im very impressed by Lazarus, now with the same source i compile my freeware for Linux, Windows AND Mac OS X.

Many, many thanks for that incredible brilliant work.

PS. The only thing that i have marked is that Trackbars work in opposite incrementation than for Linux or Windows. A little{$IFDEF Darwin}{$ENDIF} in my code gonna arrange that (or maybe in the next release it could be good to tune Trackbar Lazarus OSX with Trackbar Lazarus for Linux and Windows.)

PS2. Any idea how to change the icon of myprogram.app ?

Many, many congratulations.  :P
 
« Last Edit: February 10, 2011, 10:50:27 pm by fredvs »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Mac OS X problems...
« Reply #20 on: February 10, 2011, 10:53:18 pm »
Yeeeep, i get it  ;D

Application.Location was the guilty...

If i load the program from myprogram.app, the path is different.
And all my libraries depend of that path...

I only have to use :

Code: [Select]
opath := Application.Location  ;
  {$IFDEF Darwin}
       opath := copy(opath,1,Pos('/myprogram.app',opath)-1);
         {$ENDIF}       

Sounds great.

Don't forget that before distributing your app you'll need to copy the actual executable into the .app bundle, replacing the symlink that Lazarus creates there. You can do that in a number of ways, for example from the command line:

rm "myapp.app/contents/macos/myexec"
cp -p myexec "myapp.app/contents/macos"


The wiki covers adding an icon:

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

Related information is here:

http://web.me.com/macpgmr/ObjP/MacXPlatform_Part8.html

Thanks.

-Phil

Fred vS

  • Hero Member
  • *****
  • Posts: 3716
    • StrumPract is the musicians best friend
Re: [SOLVED] Mac OS X SOLUTION...
« Reply #21 on: February 10, 2011, 11:13:24 pm »
Whaw Phil, you are the best (and maybe also the brilliant brain of Lazarus OS X ?).

Thank you so much (and of course i gonna write you when MiXimum for OS X is ready).  :P
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: [SOLVED] Mac OS X SOLUTION...
« Reply #22 on: February 10, 2011, 11:19:19 pm »
Whaw Phil, you are the best (and maybe also the brilliant brain of Lazarus OS X ?).

No, I'm just a user.

Thanks.

-Phil

Fred vS

  • Hero Member
  • *****
  • Posts: 3716
    • StrumPract is the musicians best friend
Re: [SOLVED] Mac OS X SOLUTION...
« Reply #23 on: February 12, 2011, 03:14:15 pm »
Hello everybody.  ::)
Im very happy to announce you the birth of miXimum, the DJ's best friend, for Mac Os X.
The 2 brothers (miXimum for Linux and miXimum for Windows) are waiting for you too.

Download it free here :

https://sites.google.com/site/fiensprototyping/

Have fun....

PS: Of course 100% pure Lazarus/FPC... ;D
« Last Edit: April 12, 2011, 01:29:07 am by fredvs »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

obijohn

  • New member
  • *
  • Posts: 9
Re: [SOLVED] Mac OS X SOLUTION...
« Reply #24 on: February 16, 2011, 02:47:45 am »
Awesome work, fredvs! It's encouraging to see new work like yours being developed with Lazarus/FPC.  :)

 

TinyPortal © 2005-2018