Re: [Interest] [Qt-creator] mac: executable binary inside package

5 views
Skip to first unread message

David Kim

unread,
Mar 28, 2012, 12:48:00 PM3/28/12
to Konstantin Tokarev, inte...@qt-project.org
Thanks! Everything works well.

Now I have two more questions.

1.
When the application was deployed with macdeployqt, 
the dmg file also contains .Trashes. Is 
there an option to exclude it?

2. What'd be the way to put the alias of the 
Applications folder inside the dmg file as well, so that 
users could drag-n-drop the application onto 
the Applications folder in there. This is what 
other applications' installation process usually does, 
isn't it?

Best,
David

On Wed, Mar 28, 2012 at 10:55 AM, Konstantin Tokarev <ann...@yandex.ru> wrote:

28.03.2012, 19:41, "David Kim" <davi...@gmail.com>:
> Hello,In case an executable binary
> file is included into the app package (by manually copying/pasting it
> into the Contents folder of the package(.app) file),
> how can it be called from qProcess start. What'd
> be the path to the executable binary?

Use QCoreApplication::applicationDirPath() to determine path.

(Such questions should be directed to interest@)

--
Regards,
Konstantin

Lincoln Ramsay

unread,
Mar 28, 2012, 7:47:58 PM3/28/12
to inte...@qt-project.org
On 03/29/2012 02:48 AM, ext David Kim wrote:
> 1.
> When the application was deployed with macdeployqt,
> the dmg file also contains .Trashes. Is
> there an option to exclude it?

macdeployqt doesn't make a .dmg does it? It didn't the last time I checked.

I have typically used a script to build a .dmg that prepared a directory
with the contents I wanted on the disk image and "sanitized" it,
removing all the .DS_Store and other junk from the filesystem. I'd post
it here but... my Mac is not handy.

> 2. What'd be the way to put the alias of the
> Applications folder inside the dmg file as well, so that
> users could drag-n-drop the application onto
> the Applications folder in there. This is what
> other applications' installation process usually does,
> isn't it?

You need a symlink (points to a fixed location). You can create this in
your deployment script.

eg.

cd /path/to/my/image/folder
ln -s /Applications .

--
Lincoln Ramsay - Senior Software Engineer
Qt Development Frameworks, Nokia - http://qt.nokia.com/
_______________________________________________
Interest mailing list
Inte...@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Lincoln Ramsay

unread,
Mar 28, 2012, 7:57:31 PM3/28/12
to inte...@qt-project.org
On 03/29/2012 09:47 AM, ext Lincoln Ramsay wrote:
> On 03/29/2012 02:48 AM, ext David Kim wrote:
>> 1.
>> When the application was deployed with macdeployqt,
>> the dmg file also contains .Trashes. Is
>> there an option to exclude it?
>
> macdeployqt doesn't make a .dmg does it? It didn't the last time I checked.

Oh right... it has a -dmg argument.

That simply calls hdiutil create [dmgname] -srcfolder [app bundle path]
-format UDZO -volname [app base path].

So since you need to put more than your app in the .dmg, use macdeployqt
to prepare the .app bundle but then setup your image folder explicitly
(eg. adding the /Applications symlink) and call hdiutil yourself.

David Kim

unread,
Mar 28, 2012, 10:38:08 PM3/28/12
to Lincoln Ramsay, inte...@qt-project.org
Thanks! That just worked~

Regards,
David
Reply all
Reply to author
Forward
0 new messages