<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    QDir::homePath() inside app<br>
    <br>
    while deploying you shouldnt copy anything to home. /usr/share for
    const predefined data. $HOME/.local/share/appname for any
    downloaded/created internal (!) application data like caches.
    Downloaded media you can save in Video/Pictures/Music folders.<br>
    For settings use QSettings class and set default values in code
    like:<br>
    <br>
    <tt>bool mySetting = settings.getValue("mySetting", true).toBool();</tt><br>
    <br>
    And remember: we can help you make your application better, we cant
    help you continue development in bad direction.<br>
    <br>
    <div class="moz-cite-prefix">On 09.03.2014 23:56, Iosif Hamlatzis
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAD2f6zXJSijavBVcUO_vT3jGF1A0Oc=W+83i=eqUynJn5Sdp_Q@mail.gmail.com"
      type="cite">
      <div dir="ltr">ok and the next logical question is: How to get the
        $HOME folder of the emulator or later the actual device in my
        .pro file? I think it shouldn't be hard-coded.
        <div><br>
        </div>
        <div>I tried to use: "/$$(HOME)/.local/share/$${<span
            style="color:rgb(128,0,128)">TARGET</span>}" but it seams
          this translates into <span style="color:rgb(170,0,0)">/home/<b><u>mersdk</u></b>/.local/share/FarWest/Home/</span> which
          is wrong and the deployment fails.</div>
        <div><br>
        </div>
        <div>Is this another "feature" of the QtCreator IDE? And when I
          say "feature" I mean a bug, another thing that doesn't work
          like debugging on the emulator or the device from inside the
          IDE and I would have to resolve to command line again?<br>
          <div class="gmail_extra"><br>
          </div>
          <div class="gmail_extra"><br>
          </div>
          <div class="gmail_extra"><br>
          </div>
          <div class="gmail_extra"><br>
            <div class="gmail_quote">On 9 March 2014 19:35, Andrey
              Kozhevnikov <span dir="ltr"><<a moz-do-not-send="true"
                  href="mailto:coderusinbox@gmail.com" target="_blank">coderusinbox@gmail.com</a>></span>
              wrote:<br>
              <blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
                <div text="#000000" bgcolor="#FFFFFF">
                  /usr/share/appname is read only for applications<br>
                  <br>
                  $HOME/.local/share/appname is read and write
                  <div>
                    <div class="h5"><br>
                      <br>
                      <div>On 09.03.2014 23:33, Iosif Hamlatzis wrote:<br>
                      </div>
                    </div>
                  </div>
                  <blockquote type="cite">
                    <div>
                      <div class="h5">
                        <div dir="ltr">
                          <div>When deploying a game/application where
                            should its resources (images/sounds/settings
                            files) be stored so that the
                            game/application can have both read and
                            write permissions?</div>
                          <div><br>
                          </div>
                          <div>I tried to use the /usr/share/$$(TARGET)
                            folder where $$(TARGET) is the name of my
                            game but it seams the game doesn't have
                            permissions on this folder. Not even read
                            permissions.</div>
                          <div><br>
                          </div>
                          <div>I use: </div>
                          <div><br>
                          </div>
                          <div>FILE* pFile =
                            fopen("/usr/share/MyGame/Home/settings.bin",
                            "r+b");</div>
                          <div>and pFile is NULL, I know the file exists
                            because I ssh into the emulator and my
                            resources are all there under the folder, so
                            the deployment succeeded but I notice the
                            owner and the group is root although I would
                            have expected something like nemo.</div>
                        </div>
                        <br>
                        <fieldset></fieldset>
                        <br>
                      </div>
                    </div>
                    <pre>_______________________________________________
SailfishOS.org Devel mailing list</pre>
                  </blockquote>
                  <br>
                </div>
                <br>
                _______________________________________________<br>
                SailfishOS.org Devel mailing list<br>
              </blockquote>
            </div>
            <br>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SailfishOS.org Devel mailing list</pre>
    </blockquote>
    <br>
  </body>
</html>