Recent

Author Topic: PackageMaker with Qt requirement  (Read 12547 times)

Ocye

  • Hero Member
  • *****
  • Posts: 518
    • Scrabble3D
PackageMaker with Qt requirement
« on: September 16, 2010, 09:01:15 am »
How do I insert Qt4 requirement in the Packagemaker?

Without Qt on target pkg is installed but the program doesn't start and does not show a specific error, at least I was told so.
Lazarus 1.7 (SVN) FPC 3.0.0

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1059
Re: PackageMaker with Qt requirement
« Reply #1 on: September 16, 2010, 01:48:46 pm »
How do I insert Qt4 requirement in the Packagemaker?

Without Qt on target pkg is installed but the program doesn't start and does not show a specific error, at least I was told so.

You should embed the Qt framework in your application bundle, as explained at http://doc.trolltech.com/4.3/deployment-mac.html

That guarantees that
a) Qt will be available
b) it will be the right version
c) it will be removed again when the used deletes your program

Ocye

  • Hero Member
  • *****
  • Posts: 518
    • Scrabble3D
Re: PackageMaker with Qt requirement
« Reply #2 on: September 16, 2010, 03:55:35 pm »
Sounds rather uncomfortable for the user. Isn't there a file that can be checked for availability? Beside a possible version conflict...
A similar problem is when the user can start the app without installed framework. I found entries in Info.plist that could point to something before start.
Lazarus 1.7 (SVN) FPC 3.0.0

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1059
Re: PackageMaker with Qt requirement
« Reply #3 on: September 16, 2010, 04:02:01 pm »
Sounds rather uncomfortable for the user. Isn't there a file that can be checked for availability? Beside a possible version conflict...
A similar problem is when the user can start the app without installed framework. I found entries in Info.plist that could point to something before start.
If you embed the framework in the application bundle,
a) the framework will always be installed, since it's part of the application
b) there can be no version conflict (this is not Windows where only one version of a shared library with a particular name can be loaded at a time; you can run 100 different programs using 100 different versions of the Qt framework at the same time). Your program will always use the version of the Qt framework that you tested and shipped.

I don't understand how making sure that the program always works is uncomfortable for the user. It's also the recommended way by Apple to ship applications using frameworks that are not guaranteed to be installed on the user's system.

Ocye

  • Hero Member
  • *****
  • Posts: 518
    • Scrabble3D
Re: PackageMaker with Qt requirement
« Reply #4 on: September 17, 2010, 10:01:08 am »
I don't understand how making sure that the program always works is uncomfortable for the user. It's also the recommended way by Apple to ship applications using frameworks that are not guaranteed to be installed on the user's system.
In terms of bandwidth its uncomfortable to download Qt. Unfortunately, I will have a lot of patches in near future and to integrate Qt costs some MBs. But you are right, it's the usual way. I was only wondering how to implement a feature similar to Dependencies in Rpm or Deb configs. Thanks a lot.
Lazarus 1.7 (SVN) FPC 3.0.0

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1059
Re: PackageMaker with Qt requirement
« Reply #5 on: September 17, 2010, 10:10:10 am »
I was only wondering how to implement a feature similar to Dependencies in Rpm or Deb configs.
There is no such system in the standard Mac OS X installer. You can add checks to the installer package to verify that certain files are installed (e.g. the FPC installer does some cursory checks to verify that Xcode is installed), but it's not recommended for end-user programs.

In fact, it's not recommended to use an installer package at all. If possible, put all files into the application bundle (except possibly for a readme) and simply distribute a disk image with that application bundle, an alias to the Applications folder and a background image with an arrow that instructs the user to drag the application into the folder alias.

Some applications also include an auto-updater that downloads patches/only changed files and then updates the installed application, so that the user doesn't have to download the entire application again when a new version is released.

kamischi

  • Full Member
  • ***
  • Posts: 177
Re: PackageMaker with Qt requirement
« Reply #6 on: September 17, 2010, 04:02:02 pm »
I don't understand how making sure that the program always works is uncomfortable for the user. It's also the recommended way by Apple to ship applications using frameworks that are not guaranteed to be installed on the user's system.
In terms of bandwidth its uncomfortable to download Qt. Unfortunately, I will have a lot of patches in near future and to integrate Qt costs some MBs. But you are right, it's the usual way. I was only wondering how to implement a feature similar to Dependencies in Rpm or Deb configs. Thanks a lot.

Fink and MacPorts offer such possibilities. However, their audience is probably smaller, definitely different. I have put packages of fpc and lazarus to fink. You would need to check whether the versions of Qt in fink are what you need.
fpc 2.6.4, lazarus 1.4.0, Mac OS X, fink

Ocye

  • Hero Member
  • *****
  • Posts: 518
    • Scrabble3D
Re: PackageMaker with Qt requirement
« Reply #7 on: September 18, 2010, 11:00:43 am »
In fact, it's not recommended to use an installer package at all.
I read it before and don't understand why dmg should not be used. I understand dmg as a Tar like archive and the user places all stuff where ever he wants. Why shouldn't apps be installed the right way, either /Applications or /usr/bin? Or vice versa: Are Apple user really "smarter" than Windows user and can handle a program itself? (Okay, no need to anwser.)
For me it's necessary (or would be nice) if a patch can be downloaded and installed easily by my program. I simply use OpenDocument(), and with dmg it just opens the content and the user has to move all stuff to the right position. With pkg that procedure is more like an update and needs no knowledge for special folder (pkg are updloaded zipped and decompressed before execution). It's the same procedure on Windows (msi) or Linux (dpk, rpm).
I try to use standard programs so Fink isn't a good option.
Lazarus 1.7 (SVN) FPC 3.0.0

kamischi

  • Full Member
  • ***
  • Posts: 177
Re: PackageMaker with Qt requirement
« Reply #8 on: September 21, 2010, 10:11:53 am »
I read it before and don't understand why dmg should not be used. I understand dmg as a Tar like archive and the user places all stuff where ever he wants.
The use of dmgs is recommended. The typical use of a dmg is to contain the complete application. The user double clicks the dmg, the disk gets mounted on the desktop, the directory opens in the finder and the user drags the application wherever he wants, preferably /Applications
Quote
Why shouldn't apps be installed the right way, either /Applications or /usr/bin?
What do you mean by installed the right way?

/usr/bin is not supposed to be used by anyone else than Apple. A typical Mac user does not even know it exists. Directories starting with a lowercase letter are not directly visible in the Finder. In case your program is a simple binary and not an application bundle, you should probably put it in /usr/local/bin.
Quote
For me it's necessary (or would be nice) if a patch can be downloaded and installed easily by my program. I simply use OpenDocument(), and with dmg it just opens the content and the user has to move all stuff to the right position. With pkg that procedure is more like an update and needs no knowledge for special folder (pkg are updloaded zipped and decompressed before execution). It's the same procedure on Windows (msi) or Linux (dpk, rpm).
I am not sure whether I understand you right, but the required user interaction does not sound very mac-like. A plain dmg without installer is only useful for the distribution of a complete application, but hardly for a partial update. A complete new application is actually how most applications are updated. The user drags the complete new version to /Applications. If an older version is present, he is asked, whether to replace the existing, older one. You cannot assume the user to drag the update part of your program to a particular location, maybe with the exception of very simple and unambiguous cases. Isn't it possible to copy the update to its place from within your program and restart the program?

In many applications the user can now select built-in automatic and online updates. I haven't looked into this until now, but, maybe, this is an option for you?

Could you give some more details about your program? Then we would not have to discuss all possibilities out there in the universe.
fpc 2.6.4, lazarus 1.4.0, Mac OS X, fink

Ocye

  • Hero Member
  • *****
  • Posts: 518
    • Scrabble3D
Re: PackageMaker with Qt requirement
« Reply #9 on: September 22, 2010, 10:33:05 am »
I acknowledge the Apple way of installation but it's very unusual for me. I assumed /Application as read-only and root-owned.
My app is a game (homepage is linked), deployed as application bundle (additional file are placed in GetAppConfigDir). Since I'm still working on the code there will be monthly or so updates. On Windows and Linux (and with pkg on Mac) the user confirm to update, file is downloaded and installed by the usual installer (msi for Windows, dep or rpm on Linux). As far as I see it works similar on Mac with pkg - the bundle is just moved into /Application. There is no need to change it (except Mac-user's anticipation) but I was wondering why people believe Apple's installation procedure to be exceptional easy.
The primary question was how to make sure that Qt is installed. I compile two versions: carbon and Qt, both with major drawbacks (carbon has no pretty self painting but provides OpenGL). If a user selects Qt I'd like to check in pkg if framework is installed. But as Jonas said that is not possible and I should integrate the framework in my pkg.
Lazarus 1.7 (SVN) FPC 3.0.0

 

TinyPortal © 2005-2018