Recent

Author Topic: Why need extra file in MacOSX  (Read 8506 times)

azrael11

  • New Member
  • *
  • Posts: 18
Why need extra file in MacOSX
« on: April 25, 2011, 09:57:49 am »
When i build in windows i take .exe file put it in another place on disk and voila is running....
In MacOSX when i buld the project and put it in another place isnt run but need the project run command file...
I look inside the project file and i see that the project command file in here....
So Why can't run only the file....? and why the icon doesn't change...?

Please help....

Shebuka

  • Sr. Member
  • ****
  • Posts: 429
Re: Why need extra file in MacOSX
« Reply #1 on: April 26, 2011, 10:27:52 am »
When i build in windows i take .exe file put it in another place on disk and voila is running....
In MacOSX when i buld the project and put it in another place isnt run but need the project run command file...
I look inside the project file and i see that the project command file in here....
So Why can't run only the file....? and why the icon doesn't change...?

Please help....
On Mac OS X you NEED to run from Application Bundle (it's a Mac OS X standard), for debug purpose Lazarus make an Application Bundle with link to executable, when you need to go release you need to put your executable over the link inside Application Bundle, if not it will not work.

You can assign icon to application bundle only, via info.plist, and it will change as soon as you move the application bundle from one folder to other (and then back if you need).

azrael11

  • New Member
  • *
  • Posts: 18
Re: Why need extra file in MacOSX
« Reply #2 on: April 26, 2011, 01:11:03 pm »
When i build in windows i take .exe file put it in another place on disk and voila is running....
In MacOSX when i buld the project and put it in another place isnt run but need the project run command file...
I look inside the project file and i see that the project command file in here....
So Why can't run only the file....? and why the icon doesn't change...?

Please help....
On Mac OS X you NEED to run from Application Bundle (it's a Mac OS X standard), for debug purpose Lazarus make an Application Bundle with link to executable, when you need to go release you need to put your executable over the link inside Application Bundle, if not it will not work.

You can assign icon to application bundle only, via info.plist, and it will change as soon as you move the application bundle from one folder to other (and then back if you need).

Thanks for the anwser but i think i am confused a little...
So what must do to carry away the build project so i can run from another folder or anothe mac...
That with the info.plist i understand thanks :)
I am new so help....

kamischi

  • Full Member
  • ***
  • Posts: 177
Re: Why need extra file in MacOSX
« Reply #3 on: June 28, 2011, 11:21:50 pm »
You may have to replace the link to the binary by the binary itself. Further explanations of the Mac application bundle are here:

http://doc.qt.nokia.com/qq/qq09-mac-deployment.html

http://developer.apple.com/library/mac/#documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html
fpc 2.6.4, lazarus 1.4.0, Mac OS X, fink

Ocye

  • Hero Member
  • *****
  • Posts: 518
    • Scrabble3D
Lazarus 1.7 (SVN) FPC 3.0.0

jwdietrich

  • Hero Member
  • *****
  • Posts: 1267
    • formatio reticularis
Re: Why need extra file in MacOSX
« Reply #5 on: September 02, 2011, 09:59:06 pm »
These considerations also apply to applications with the Carbon widgetset, not only to GTK applications.
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

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

 

TinyPortal © 2005-2018