<div dir="ltr"><div><div><div><div>This is the way I solved #1:<br><br></div>a) in your .yaml add the lines:<br><br>QMakeOptions:<br>- VERSION=%{version}<br><br></div>b) in your .pro add the lines:<br><br># App version<br>DEFINES += APP_VERSION=\"\\\"$${VERSION}\\\"\"<br><br></div>c) in your .c's main() function add the lines:<br><br>    QScopedPointer<QGuiApplication> app(SailfishApp::application(argc, argv));<br><br>    app->setApplicationVersion(QString(APP_VERSION));<br><br></div>d) now your app's version is available in QML through<br><br>Qt.application.version<br><div><div><div><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 23, 2014 at 5:44 PM, Alfonso Martone <span dir="ltr"><<a href="mailto:alfq@bk.ru" target="_blank">alfq@bk.ru</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  

    
  
  <div text="#000000" bgcolor="#FFFFFF">
    Sorry to ask here, but I wasn't able to get some official
    guidelines.<br>
    <br>
    1) Version/Release numbers:<br>
    <br>
    - I have to place them both in the <i>.yaml </i>file (for RPM
    build) and in some <i>.h</i> or <i>.qml </i>source (to show it in
    some "about" dialog): is there a way to define the Version/Release
    numbers in a <i>single</i> file of the project, making them
    available to C++, QML and RPM-build ?<br>
    <br>
    2) from time to time my software has to write some output file
    (collected data) that the user may use in another app:<br>
    <br>
    - is it correct to save in <i>$HOME/Documents</i> ?<br>
    <br>
    Thanks.<br>
  </div>

<br>_______________________________________________<br>
SailfishOS.org Devel mailing list<br>
To unsubscribe, please send a mail to <a href="mailto:devel-unsubscribe@lists.sailfishos.org">devel-unsubscribe@lists.sailfishos.org</a><br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Luca Donaggio</div>
</div>