<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Mac deployment not very easy but maybe a solution]]></title><description><![CDATA[<p dir="auto">Hi,<br />
I've got a problem  with deploying my Qt/c++ app on macos but maybe i solved it... don't really know as i don't have a clean mac os to test.<br />
My app works well with Qt creator.<br />
Here's what i did :<br />
i ran macdeployqt on the .app folder created by QTCreator<br />
This tool claimed that /Users/(...)/clang_64/<em>Frameworks</em>/(...)/QtWidgets was missing<br />
and i had the same msg for all essential Qt libs.<br />
after a little find command i found at that my files were in /Users/(...)/clang_64/<em>Lib</em>/(...)/QtWidgets<br />
and that i had no "Frameworks" directory in /Users/(...)/clang_64.<br />
So i made a "ln -s /Users/(...)/clang_64/<em>Lib</em> /Users/(...)/clang_64/<em>Frameworks</em><br />
seems it did the trick as rerunin macdeployqt on a fresh created .app folder was apparently working (no error message).<br />
But now then i tried to run my app directly from the finder it does nothing and by launching it in the terminal i get an error message claiming that "This application failed to start cause it can't find or load the Qt platform plugin cocoa"<br />
i added a platforms directory in the Content folder of my .app folder and copied libcocoa.dylib in it<br />
Now i'm able to launch the binary directly from terminal; but i'm wondering if it will run on another mac...</p>
]]></description><link>https://forum.qt.io/topic/41458/mac-deployment-not-very-easy-but-maybe-a-solution</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Apr 2026 04:25:02 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/41458.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 15 May 2014 18:31:32 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Mac deployment not very easy but maybe a solution on Thu, 15 May 2014 18:57:09 GMT]]></title><description><![CDATA[<p dir="auto">oh really ? Cool ! That's the sandbox effect i guess, u're right. as the app should not try to search for system lib right ?<br />
I tried to copy my dmg file anywhere and still working :)))<br />
so i guess it's ok. Just gotta learn to create a deb and a rpm and my project will run almost everywhere (as i already created the windows installer with innosetup)<br />
That's a lot of work for deployment.. I'm really wondering if i should not use Qt Installer framework.. On the other hand linux and mac users would prefer a native installer... cruel dilemma</p>
<p dir="auto">IN CASE SOMEONE READS THIS :</p>
<p dir="auto">in fact, 'spite the dmg format the binary file in it was referencing /Users/[MyUsername]/Qt/5.2/clang_64/....Qtwidgets  and every other lib so moving dmg file on disk is not a good solution. I found out by trying to install on a fresh copy of mac OS (which is finally really simple to obtain I intialy dual booting macOS with another macos would be hard but it's very easy ^^)<br />
whatever seems i have to use a tool named install_tool_name find out that in the doc ^^.<br />
should have start from there i guess but experimenting is always fun and a more effective to learn deeply :p</p>
]]></description><link>https://forum.qt.io/post/228657</link><guid isPermaLink="true">https://forum.qt.io/post/228657</guid><dc:creator><![CDATA[muuiwndii]]></dc:creator><pubDate>Thu, 15 May 2014 18:57:09 GMT</pubDate></item><item><title><![CDATA[Reply to Mac deployment not very easy but maybe a solution on Thu, 15 May 2014 18:55:58 GMT]]></title><description><![CDATA[<p dir="auto">Hi, you can test by moving your Qt installation somewhere else temporarily, or just rename the Qt directory. Then try to run your app from the finder.</p>
<p dir="auto">It's a cheap way of simulating running on another Mac :-)</p>
]]></description><link>https://forum.qt.io/post/228656</link><guid isPermaLink="true">https://forum.qt.io/post/228656</guid><dc:creator><![CDATA[hskoglund]]></dc:creator><pubDate>Thu, 15 May 2014 18:55:58 GMT</pubDate></item><item><title><![CDATA[Reply to Mac deployment not very easy but maybe a solution on Thu, 15 May 2014 18:53:38 GMT]]></title><description><![CDATA[<p dir="auto">just to clarrify as now i'm able to create a working dmg file (i still don't know how it will act on a non developer mac...)<br />
here are the steps i followed</p>
<ul>
<li>
<p dir="auto">Build release with QtCreator</p>
</li>
<li>
<p dir="auto">ln -s /Users/(….)/clang_64/Lib /Users/(…)/clang_64/Frameworks (do that only once it's permanent)</p>
</li>
<li>
<p dir="auto">create a "platforms" folder in yourApplication.app/Content/MacOS directory and put libqcocoa.dylib (found in &lt;QtDir&gt;/clang_64/platforms) in it.</p>
</li>
<li>
<p dir="auto">macdeployqt yourApplication.app -dmg</p>
</li>
</ul>
<p dir="auto">And you have a portable (i hope) dmg file<br />
i'll let u know as soon as i try on a nude OS</p>
]]></description><link>https://forum.qt.io/post/228655</link><guid isPermaLink="true">https://forum.qt.io/post/228655</guid><dc:creator><![CDATA[muuiwndii]]></dc:creator><pubDate>Thu, 15 May 2014 18:53:38 GMT</pubDate></item></channel></rss>