<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>i.MX ProcessorsのトピックRe: Creating a .desktop for yocto distribution Qt Creator which requires environment variables</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Creating-a-desktop-for-yocto-distribution-Qt-Creator-which/m-p/344820#M47560</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, Ossian, for your contribution to the community’s knowledge base. I’m sure this document will help other users!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Oct 2014 13:43:11 GMT</pubDate>
    <dc:creator>gusarambula</dc:creator>
    <dc:date>2014-10-23T13:43:11Z</dc:date>
    <item>
      <title>Creating a .desktop for yocto distribution Qt Creator which requires environment variables</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Creating-a-desktop-for-yocto-distribution-Qt-Creator-which/m-p/344819#M47559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I know some love the command line and are OK with executing a modified version of qtcreator.sh such as described in the following link:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/309578"&gt;Setup QT Creator with Yocto Build&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, I like having a Qt Creator desktop icon/launcher in ubuntu. The following tips will hopefully be helpful to others that would like to do the same.&lt;/P&gt;&lt;P&gt;Recently the master yocto Qt recipe was updated to fix some environment path issue with qmake, as part of this update the setting of some of the Qt environment variables were moved from &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;to qt5.sh in the&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; "/opt/poky/1.7/sysroots/x86_64-pokysdk-linux/environment-setup.d"&lt;/SPAN&gt; directory. This was a good chance in that qmake build correctly and Qt Creator is happy when launched form the command line using qtcreator.sh.&lt;/P&gt;&lt;P&gt;But, when attempting to launch qtcreator.sh form a ".desktop" file/launcher I was finding that my environment variables within Qt Creator where not being set properly for the OE compiler settings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, in order to get a ".desktop" launcher to work I had to make modifications to the qtcreator.sh file.&lt;/P&gt;&lt;P&gt;Add the following lines above the "#! /bin/sh" in qtcreator.sh located in your "~/Qt5.3.2/Tools/QtCreator/bin". It is important to note that you need to use "." instead of "source", since using "source" does not appear to work with ".desktop" files. Note, the paths are a direct copy from the "qt5.sh" file with the addition of some quotes, the quotes are important creator will not launch without them (all $ variables need to have quotes around them").&lt;/P&gt;&lt;P&gt;So, in order to get a ".desktop" launcher to work I had to make the following modifications to the qtcreator.sh file:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: seagreen; background: white;"&gt;. /opt/poky/1.7/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: seagreen; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: seagreen; background: white;"&gt;# Start - Additions for the yocto distribution of Qt&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: seagreen; background: white;"&gt;export PATH=$OECORE_NATIVE_SYSROOT/usr/bin/qt5:$PATH&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: seagreen; background: white;"&gt;export OE_QMAKE_CFLAGS="$CFLAGS"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: seagreen; background: white;"&gt;export OE_QMAKE_CXXFLAGS="$CXXFLAGS"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: seagreen; background: white;"&gt;export OE_QMAKE_LDFLAGS="$LDFLAGS"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: seagreen; background: white;"&gt;export OE_QMAKE_CC="$CC"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: seagreen; background: white;"&gt;export OE_QMAKE_CXX="$CXX"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: seagreen; background: white;"&gt;export OE_QMAKE_LINK="$CXX"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: seagreen; background: white;"&gt;export OE_QMAKE_AR="$AR"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: seagreen; background: white;"&gt;export QT_CONF_PATH="$OECORE_NATIVE_SYSROOT"/usr/bin/qt5/qt.conf&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: seagreen; background: white;"&gt;export OE_QMAKE_LIBDIR_QT=`qmake -query QT_INSTALL_LIBS`&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: seagreen; background: white;"&gt;export OE_QMAKE_INCDIR_QT=`qmake -query QT_INSTALL_HEADERS`&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: seagreen; background: white;"&gt;export OE_QMAKE_MOC="$OECORE_NATIVE_SYSROOT"/usr/bin/qt5/moc&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: seagreen; background: white;"&gt;export OE_QMAKE_UIC="$OECORE_NATIVE_SYSROOT"/usr/bin/qt5/uic&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: seagreen; background: white;"&gt;export OE_QMAKE_RCC="$OECORE_NATIVE_SYSROOT"/usr/bin/qt5/rcc&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: seagreen; background: white;"&gt;export OE_QMAKE_QDBUSCPP2XML="$OECORE_NATIVE_SYSROOT"/usr/bin/qt5/qdbuscpp2xml&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: seagreen; background: white;"&gt;export OE_QMAKE_QDBUSXML2CPP="$OECORE_NATIVE_SYSROOT"/usr/bin/qt5/qdbusxml2cpp&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: seagreen; background: white;"&gt;export OE_QMAKE_QT_CONFIG=`qmake -query QT_INSTALL_LIBS`/qt5/mkspecs/qconfig.pri&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: seagreen; background: white;"&gt;export QMAKESPEC=`qmake -query QT_INSTALL_LIBS`/mkspecs/linux-oe-g++&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: seagreen; background: white;"&gt;# End - Additions for the yocto distribution of Qt&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: seagreen; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: seagreen; background: white;"&gt;#! /bin/sh&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For those interested in creating a ".desktop" file create a file something like "qtcreator.desktop", open the file in a text editor and insert the following information:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: seagreen; background: white;"&gt;[Desktop Entry]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: seagreen; background: white;"&gt;Version=5.3.2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: seagreen; background: white;"&gt;Name=Qt5 Creator&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: seagreen; background: white;"&gt;Comment=Qt5 Creator 5.3.2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: seagreen; background: white;"&gt;Exec=~/Qt5.3.2/Tools/QtCreator/bin/qtcreator.sh&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: seagreen; background: white;"&gt;Icon=~/Qt5.3.2/Tools/QtCreator/bin/qtcreator.png&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: seagreen; background: white;"&gt;Terminal=false&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: seagreen; background: white;"&gt;Type=Application&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: seagreen; background: white;"&gt;Categories=Development;Application;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Remember to set the proper path to "qtcreator.sh". Also you can fetch a Qt Creator png (with transparency) off the net and use a path to this image to create a nice image on you desktop/launcher.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There might be an easier way, but this is what worked for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ossian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2014 16:48:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Creating-a-desktop-for-yocto-distribution-Qt-Creator-which/m-p/344819#M47559</guid>
      <dc:creator>ossian</dc:creator>
      <dc:date>2014-10-22T16:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a .desktop for yocto distribution Qt Creator which requires environment variables</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Creating-a-desktop-for-yocto-distribution-Qt-Creator-which/m-p/344820#M47560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, Ossian, for your contribution to the community’s knowledge base. I’m sure this document will help other users!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Oct 2014 13:43:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Creating-a-desktop-for-yocto-distribution-Qt-Creator-which/m-p/344820#M47560</guid>
      <dc:creator>gusarambula</dc:creator>
      <dc:date>2014-10-23T13:43:11Z</dc:date>
    </item>
  </channel>
</rss>

