Recent

Author Topic: App deployment  (Read 14288 times)

Jo

  • Jr. Member
  • **
  • Posts: 63
    • http://www.taomedic.com
App deployment
« on: March 22, 2008, 03:37:39 pm »
After creating a project package from the project options, I get a Project1 (.app) that I can double click and execute ok. When I try to package it and deploy it doesn’t work. It looks as if the packaging is handled ok and the installation looks ok, but I can’t find the installed application. What am I missing?

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: App deployment
« Reply #1 on: March 22, 2008, 05:52:26 pm »
Quote from: "Jo"
After creating a project package from the project options, I get a Project1 (.app) that I can double click and execute ok. When I try to package it and deploy it doesn’t work. It looks as if the packaging is handled ok and the installation looks ok, but I can’t find the installed application. What am I missing?


For ease of development, the .app bundle has a symbolic link that points to the actual executable, which is in the same folder as the rest of your project. When ready to deploy, replace the link with the executable. For example:

rm myprogram.app/contents/macos/myprogram
cp -p myprogram myprogram.app/contents/macos/myprogram

Let me know if that doesn't fix it for you.

Thanks.

-Phil

Jo

  • Jr. Member
  • **
  • Posts: 63
    • http://www.taomedic.com
App deployment
« Reply #2 on: March 22, 2008, 11:13:56 pm »
Thanks Phil, it does help to turn the app into something I can copy anywhere and execute. I can't however work it out with the PackageMaker.

Phil

  • Hero Member
  • *****
  • Posts: 2737
App deployment
« Reply #3 on: March 22, 2008, 11:34:22 pm »
Quote from: "Jo"
Thanks Phil, it does help to turn the app into something I can copy anywhere and execute. I can't however work it out with the PackageMaker.


Did you take a look at this?

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

I wrote that a couple years ago but the steps should still be the same.

Where are you getting stuck with PackageMaker?

Thanks.

-Phil

Jo

  • Jr. Member
  • **
  • Posts: 63
    • http://www.taomedic.com
App deployment
« Reply #4 on: March 23, 2008, 05:25:22 pm »
Yes I did look at it. I think I'm getting it to work now, seems like the internal/flat feature was the issue, not sure yet.

Phil

  • Hero Member
  • *****
  • Posts: 2737
App deployment
« Reply #5 on: March 23, 2008, 06:24:02 pm »
Quote from: "Jo"
Yes I did look at it. I think I'm getting it to work now, seems like the internal/flat feature was the issue, not sure yet.


I still find the combination of PackageMaker and Disk Utility confusing to use, but I think that's because I'm coming from a Windows background. I've conveniently forgotten how much horsing around I've had to do over the years with various Windows installer tools just getting the app's registry settings right (file associations, uninstalling, App Paths, etc.). In that light the Apple tools don't look so bad and I suppose if I used them on a more frequent basis I wouldn't find them confusing.

Thanks.

-Phil

windy

  • Full Member
  • ***
  • Posts: 186
App deployment
« Reply #6 on: March 27, 2008, 03:56:37 am »
Hi
Question:
is it possible to get package maker to execute a .sh fille?
(i.e to  install some library files)
thanks!
Brian

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Package Maker
« Reply #7 on: March 27, 2008, 08:37:49 am »
Quote from: "windy"
Hi
Question:
is it possible to get package maker to execute a .sh fille?
(i.e to  install some library files)
thanks!
Brian


This is an excellent question, but really wrong forum =)

Apple provides outstanding help for it's applications (all help is XCode included), but here're on-line answers =)

Common answer is:
http://developer.apple.com/documentation/DeveloperTools/Conceptual/PackageMakerUserGuide/Introduction/chapter_1_section_1.html

Scripting answer is:
http://developer.apple.com/documentation/DeveloperTools/Conceptual/PackageMakerUserGuide/Workflow/chapter_3_section_4.html

Phil

  • Hero Member
  • *****
  • Posts: 2737
App deployment
« Reply #8 on: March 27, 2008, 02:46:39 pm »
Quote from: "windy"
Hi
Question:
is it possible to get package maker to execute a .sh fille?
(i.e to  install some library files)
thanks!
Brian


With 10.4 and later you can use JavaScript scripts in your installer package.

You can also include libraries in your app bundle.

You can also create a metapackage if you need to install more than one package.

Study Apple's docs and use Google. For example, I found this:

http://www.peachpit.com/articles/article.aspx?p=669067

Thanks.

-Phil

windy

  • Full Member
  • ***
  • Posts: 186
App deployment
« Reply #9 on: April 06, 2008, 06:39:41 am »
Hi
thanks for the replies
I had a brain wave...to create a package that installs the library files to /usr/lib/ ....with a readme.txt for the person to double click on that package (which is included,i.e package in a package)...hopefully easier than running a teminal windows and then tying in the name of the install.sh file etc!

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1071
App deployment
« Reply #10 on: April 06, 2008, 11:54:09 pm »
Quote from: "windy"
Hi
thanks for the replies
I had a brain wave...to create a package that installs the library files to /usr/lib/ ....with a readme.txt for the person to double click on that package (which is included,i.e package in a package)...hopefully easier than running a teminal windows and then tying in the name of the install.sh file etc!


Do not install anything in /usr/lib, that is reserved for system use. Custom libraries have to go in /usr/local/lib. See "man hier" (in a Terminal window, without the quotes) for more information.

And unless the point is to make those libraries available to all applications, this is probably the wrong approach (if only because another program could overwrite those libraries with its own, incompatible version). If it's just for your application, include the libraries in the application bundle itself. And if possible, avoid installer packages as much as possible so that people can just copy your application from a disk image to their hard drive, and delete it afterwards without any stray files remaining behind.

See http://developer.apple.com/tools/installerpolicy.html for more info.

windy

  • Full Member
  • ***
  • Posts: 186
App deployment
« Reply #11 on: April 07, 2008, 07:02:42 am »
humm, I cant remember if I have actualy tried that, having the needed library files in the MacOS folder in the applicartion bundle
I will test that out now and let you know :)

windy

  • Full Member
  • ***
  • Posts: 186
App deployment
« Reply #12 on: April 07, 2008, 07:07:55 am »
Quote
if it's just for your application, include the libraries in the application bundle itself.
OMG
I dont know why I had not tried that before
That works!
Thanks for that tip!!

 

TinyPortal © 2005-2018