Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Standard Path locations, and loacations to save app generated data
Forum Updated to NodeBB v4.3 + New Features

Standard Path locations, and loacations to save app generated data

Scheduled Pinned Locked Moved General and Desktop
windowsappdatastandardpaths
6 Posts 3 Posters 2.1k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    chronix
    wrote on last edited by chronix
    #1

    I created an application it works great, i used Inno setup compiler to create a setup for it, it installs as well. now the app has an update mechanism, it downloads a patch.zip and unzips it and runs the patches it updates the app, the problem is if i run the app from a custom location ie. any folder which has its executable and all the required DLLs the program downloads these patches into the same directory where the executable resides. bt after installation, these files are created in C:\Users\Sanchit\AppData\Local\VirtualStore\Program Files (x86)\<APPNAME>\
    i don't know how to frame my question bt how do other apps(i mean professional apps) handle this? i know there is something called QStandardPaths bt how do i use it?
    Thanks in advance. :)

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Call QStandardPaths::writableLocation with QStandardPaths::AppDataLocation so you'll get the standard folder your application data to be stored.

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      C 1 Reply Last reply
      2
      • SGaistS SGaist

        Hi,

        Call QStandardPaths::writableLocation with QStandardPaths::AppDataLocation so you'll get the standard folder your application data to be stored.

        Hope it helps

        C Offline
        C Offline
        chronix
        wrote on last edited by
        #3

        Thank you @SGaist for replying. I used QStandardPath::standardLocation and called QstandardPath::AppDataLocation it returned me with C:/Users/username/AppData/Roaming/appname seeing this i updated the inno setup script to create a dir their now program primarily writes to this location, is it ok?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Something is not clear, what is doing the update ? Inno Setup or your own updater ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          C 1 Reply Last reply
          0
          • SGaistS SGaist

            Something is not clear, what is doing the update ? Inno Setup or your own updater ?

            C Offline
            C Offline
            chronix
            wrote on last edited by
            #5

            @SGaist I use inno setup to make pkges and update patches. thats aside, the app updates itself, my downloading these patches from the server and executing them. So im was looking for the directory to place the downloaded patch files.

            1 Reply Last reply
            0
            • jsulmJ Online
              jsulmJ Online
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              You could use the temp directory for patch files - after update they are not needed anymore.

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved