[Interest] Using macdeployqt after Qbs

Charles-Elie Gentil mail at jiyuusoft.net
Fri Jun 2 20:47:59 CEST 2017


Hi James,


This is perfect.

Thank you very much

Best regards,

Charlie

mail at jiyuusoft.net
http://blog.jiyuusoft.net

> Le 2 juin 2017 à 20:32, Jake Petroules <Jake.Petroules at qt.io> a écrit :
> 
> Hi Charles,
> 
> I see the problem - you created a new Qbs application via Qt Creator, and the Qt Creator template is outdated. We will fix that.
> 
> In your test.qbs file, you need to replace the Group item at the bottom of the file with the following two items:
> 
>        Properties {
>            condition: qbs.targetOS.contains("darwin")
>            cpp.rpaths: ["@loader_path/../Frameworks"]
>        }
> 
>        Group {
>            fileTagsFilter: bundle.isBundle ? ["bundle.content"] : product.type
>            qbs.install: true
>            qbs.installSourceBase: product.buildDirectory
>        }
> 
> We will make sure the new app template gets updated for the next Qt Creator release, and the first "Properties" item should also become unnecessary in a future release of Qbs.
> 
> Then after you are finished building and ready to run macdeployqt, run:
> 
> 	macdeployqt test.app -qmldir=/path/to/your/sources
> 
> The qmldir argument to macdeployqt is important in order for it to figure out which QML modules need to be deployed.
> 
> I've tested this process and it should work. Let me know if you have further issues.
> 
>> On Jun 2, 2017, at 12:04 AM, Charles-Elie Gentil <mail at jiyuusoft.net> wrote:
>> 
>> Hi Jake,
>> 
>> Thank you for your quick reply.
>> 
>> Yes, that’s it.
>> 
>> I tried copying my .app bundle to a different location, and it works better, but I always have a problem.
>> 
>> Here, my source code. After building it and depending the case, I pasted the .app bundle in bin/debug or bin/release.
>> 
>> For debug I use this line :
>> /Applications/Qt/5.9/clang_64/bin/macdeployqt test.app -use-debug-libs
>> 
>> and for release, I use this line :
>>    /Applications/Qt/5.9/clang_64/bin/macdeployqt test.app
>> 
>> Libs are correctly pasted, but I can’t run the program if I click on it (see the errorMessage).
>> 
>> 
>> With a built .app bundle with qmake, I don’t have problem.
>> 
>> 
>> 
>> Thank you for your help
>> 
>> 
>> Best regards,
>> 
>> Charlie
>> 
>> mail at jiyuusoft.net
>> http://blog.jiyuusoft.net
>> 
>>> Le 1 juin 2017 à 21:30, Jake Petroules <Jake.Petroules at qt.io> a écrit :
>>> 
>>> Hi Charlie,
>>> 
>>> You said that you don't have a problem initially compiling the project in Qt Creator with Qbs. Do you mean that your initial build succeeds, then you run macdeployqt, and then you run the Qbs build again and receive the failure below?
>>> 
>>> Please show your project files so we can better understand what's going wrong. My initial guess is that your app's installation Group might be wrong. Please check the second paragraph in the "Breaking Changes" section of https://blog.qt.io/blog/2017/05/29/qbs-1-8-released/
>>> 
>>> Also note two things:
>>> - You are not supposed to modify the contents of the qbs build output directory (which in your case is /Users/charlie/build-untitled2-Desktop_Qt_5_9_0_clang_64bit-Debug/qtc_Desktop__23fa2072-debug). Instead, you should copy your .app bundle to a different location before running macdeployqt on it.
>>> - In a future release of Qbs (hopefully 1.9) we will have functionality to bundle frameworks directly in the build system, so you will not need to (and should not) use macdeployqt anymore.
>>> 
>>>> On Jun 1, 2017, at 12:20 PM, Charles-Elie Gentil <mail at jiyuusoft.net> wrote:
>>>> 
>>>> Hello friends,
>>>> 
>>>> I don’t have problem to compile the start project of Qt Creator with Qbs. Now, I want use macdeployqt with this line in %{buildDir} :
>>>> macdeployqt untitled2.app
>>>> 
>>>> 
>>>> Unfortunately, in my cas, I have this error :
>>>> :-1: erreur : Installation error: Could not copy file '/Users/charlie/build-untitled2-Desktop_Qt_5_9_0_clang_64bit-Debug/qtc_Desktop__23fa2072-debug/untitled2.qtc-Desktop--23fa2072.b0b37170/.tmp/untitled2' to '/Users/charlie/build-untitled2-Desktop_Qt_5_9_0_clang_64bit Debug/qtc_Desktop__23fa2072-debug/install-root/untitled2'. Impossible d'ouvrir /Users/charlie/build-untitled2-Desktop_Qt_5_9_0_clang_64bit-Debug/qtc_Desktop__23fa2072-debug/untitled2.qtc-Desktop--23fa2072.b0b37170/.tmp/untitled2 en lecture
>>>> 
>>>> With the same compiled project with qmake, I don’t have this problem !!!
>>>> 
>>>> Do you have an idea ? Have you tried to use macdeployqt after a compilation with Qbs with Qt 5.9 ?
>>>> 
>>>> Thank you in advance,
>>>> 
>>>> Best regards,
>>>> 
>>>> Charlie
>>>> 
>>>> mail at jiyuusoft.net
>>>> http://blog.jiyuusoft.net
>>>> 
>>>> _______________________________________________
>>>> Interest mailing list
>>>> Interest at qt-project.org
>>>> http://lists.qt-project.org/mailman/listinfo/interest
>>> 
>>> -- 
>>> Jake Petroules - jake.petroules at qt.io
>>> The Qt Company - Silicon Valley
>>> Qbs build tool evangelist - qbs.io
>>> 
>> 
>> <test.zip>
> 
> -- 
> Jake Petroules - jake.petroules at qt.io
> The Qt Company - Silicon Valley
> Qbs build tool evangelist - qbs.io
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20170602/647fde35/attachment.html>


More information about the Interest mailing list