[Qt-interest] how to copy any app bundle on MacOS from one location to the other using QT methods?

Serge mb0 at km.ru
Tue May 18 15:25:22 CEST 2010


Oliver.Knoll at comit.ch wrote:
> Serge wrote on Tuesday, May 18, 2010 1:44 PM:
> 
>> Hello,
>>
>> my QT program needs to copy another application bundle from one
>> location to the other on Mac OS and launch it?
> 
> An application bundle under Mac OS X is nothing more than a directory ending with ".app" extension (http://en.wikipedia.org/wiki/Application_Bundle), containing sub-directories (the binaries, resources etc.) of well-known names, so basically a "cp -r" ("recursive copy") should do it, as far as the copying is concerned.
> 
> According to the Wiki page the class CFBundle in the Mac "Core Foundation" API is used to manipulate app bundles, if you don't mind messing around with the Mac API. Or maybe setting the working directory into the "app bundle" directory and calling the executable therein with QProcess does the job as well (not sure about how the resources/shared libraries etc. are then resolved though).
> 
> Cheers, Olive

can i use in my qt program:
cp -r
?

how can i check result of it? was copy successfull or not?

--
Thank you!



More information about the Qt-interest-old mailing list