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. My app's stored files' shape are as unknown files
Forum Updated to NodeBB v4.3 + New Features

My app's stored files' shape are as unknown files

Scheduled Pinned Locked Moved Unsolved General and Desktop
21 Posts 4 Posters 6.6k Views 1 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.
  • tomyT tomy

    Thank guys, I read the link's answer, although I couldn't find the .sp extension in the registery.
    Anyway, I know by modifying the registery I might be able to do something, but it's not what that should be done! I don't what to change my registery as for the time when I install a software (an app) I don't change the registery but it itself (I think) does that.

    My purpose is when someone installs the app, the app itself make those changes and the user sees a specific shape (related to that app) on the stored files and work with them, just like any other program.
    Have you done this task before? How to do that on a win 7 x64 machine please? It may be beyond the scope of Qt but it's needed for Qt programmers I think.

    jsulmJ Offline
    jsulmJ Offline
    jsulm
    Lifetime Qt Champion
    wrote on last edited by
    #11

    @tomy said in My app's stored files' shape are as unknown files:

    My purpose is when someone installs the app

    Looks like you misunderstood me and I misunderstood your last reply :-) My point was from the beginning that your app or its installer modifies the registry, not the user.

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

    1 Reply Last reply
    0
    • jsulmJ jsulm

      @tomy "I couldn't find the .sp extension in the registery" - that's the point, you have to put it there.
      "I don't what to change my registery" - if you want to register your app for a file type you have to do it this way. This is how it works on Windows.
      "I don't change the registery but it itself (I think) does that" - sorry, but how and why would registry change itself?! If you're installing your app then it is your job to register it (either do it in the installer or in the app), neither Windows nor its registry can know what file type your app is going to use.
      "the app itself make those changes" - yes, but you're writing your app, so you need to implement it.
      Please refer to Microsoft documentation: https://msdn.microsoft.com/de-de/library/windows/desktop/ee872121(v=vs.85).aspx

      tomyT Offline
      tomyT Offline
      tomy
      wrote on last edited by
      #12

      @jsulm

      "I don't change the registery but it itself (I think) does that" - sorry, but how and why would registry change itself?!

      Ow I din't mean either the rigestery or Windows, I meant the app! :)

      (either do it in the installer or in the app),

      Yes, this is what I'm looking for. My installer is Qt Installer Framework. And I also have the source code. Which one should I use and how? Is there any step-by-step tut on this case, please?

      Please refer to Microsoft documentation: https://msdn.microsoft.com/de-de/library/windows/desktop/ee872121(v=vs.85).aspx

      Do you now think I should follow this thread? And don't change the code for that purpose?

      1 Reply Last reply
      0
      • S Stoyan

        @tomy
        When you install a software YOU don't change registry but the installer DO change it. The developer who creates this installer take care to make any necessary changes in registry in background. In this case as developer you have to take care for this.

        tomyT Offline
        tomyT Offline
        tomy
        wrote on last edited by tomy
        #13

        @Stoyan

        When you install a software YOU don't change registry but the installer DO change it. The developer who creates this installer take care to make any necessary changes in registry in background. In this case as developer you have to take care for this.

        You're right, but how? By modifying the code or using the installer (Qt Installer Framework)?

        jsulmJ S 2 Replies Last reply
        0
        • tomyT tomy

          @Stoyan

          When you install a software YOU don't change registry but the installer DO change it. The developer who creates this installer take care to make any necessary changes in registry in background. In this case as developer you have to take care for this.

          You're right, but how? By modifying the code or using the installer (Qt Installer Framework)?

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by jsulm
          #14

          @tomy Both is possible. I don't know what you prefer. If you want to do it in your app you can do it using QSettings.
          Never used Qt Online Installer, so cannot say whether it is possible there.

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

          1 Reply Last reply
          1
          • tomyT tomy

            @Stoyan

            When you install a software YOU don't change registry but the installer DO change it. The developer who creates this installer take care to make any necessary changes in registry in background. In this case as developer you have to take care for this.

            You're right, but how? By modifying the code or using the installer (Qt Installer Framework)?

            S Offline
            S Offline
            Stoyan
            wrote on last edited by
            #15

            @tomy
            If you use installer, this is one time job. After initial settings you can't change them again if for some reason they are changed.
            In a lots of apps this is realized as settings "Associate" in the app. Benefits here is that you can change these settings any time.

            1 Reply Last reply
            1
            • tomyT Offline
              tomyT Offline
              tomy
              wrote on last edited by tomy
              #16

              Thank you.
              So both of you recommend that I use settings or QSetting. I guess it's a Qt class that I can use it in the code so that it applies changes to the registery when the app is being installed on a Windows machine (of a user).
              Have I understood correctly? If so, so I should be familiar with such a class and try to figure out where and how in the code I use it. correct?

              jsulmJ 1 Reply Last reply
              0
              • tomyT tomy

                Thank you.
                So both of you recommend that I use settings or QSetting. I guess it's a Qt class that I can use it in the code so that it applies changes to the registery when the app is being installed on a Windows machine (of a user).
                Have I understood correctly? If so, so I should be familiar with such a class and try to figure out where and how in the code I use it. correct?

                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #17

                @tomy You would use QSettings in your app but not when it is installed. The idea would be to check at start-up whether your file type is registered or not and if not register it.
                Yes, QSettings is a Qt class, take a look at its documentation.
                But it is worth checking whether Qt Installer Framework supports this use case as it is is actually something the installer should take care.

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

                tomyT 1 Reply Last reply
                3
                • jsulmJ jsulm

                  @tomy You would use QSettings in your app but not when it is installed. The idea would be to check at start-up whether your file type is registered or not and if not register it.
                  Yes, QSettings is a Qt class, take a look at its documentation.
                  But it is worth checking whether Qt Installer Framework supports this use case as it is is actually something the installer should take care.

                  tomyT Offline
                  tomyT Offline
                  tomy
                  wrote on last edited by tomy
                  #18

                  @jsulm

                  You would use QSettings in your app but not when it is installed.

                  Yes, I know that. If I'm able to change the code so that the app is the way I need, I also can uninstall the previous app and install this new version, or I send it to a friend and they install it on their Windows machine too.

                  The idea would be to check at start-up whether your file type is registered or not and if not register it.

                  I don't understand this part.

                  Yes, QSettings is a Qt class, take a look at its documentation.
                  But it is worth checking whether Qt Installer Framework supports this use case as it is is actually something the installer should take care.

                  So the first step is to check if Qt Installer Framework supports that or not. And if yes, I use the class QSettings in the code of the app and finally create an new installer and install it.

                  OK, these are too new for me. I've never done these. How to check Qt Installer Framework for that? If Qt Installer Framework supports that, I then should try to use that QSettings class and probably give it an icon to put on the stored files.
                  The process sounds by no way easy! :(
                  Isn't there any straightforward tut on this case?
                  And have you programmers ever done this? You have done absolutely I think. What is your experience in this case, please?

                  1 Reply Last reply
                  0
                  • VRoninV Offline
                    VRoninV Offline
                    VRonin
                    wrote on last edited by
                    #19

                    using QtIF: https://forum.qt.io/topic/68083/qt-installer-framework-create-registry-key/2

                    "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                    ~Napoleon Bonaparte

                    On a crusade to banish setIndexWidget() from the holy land of Qt

                    1 Reply Last reply
                    2
                    • tomyT Offline
                      tomyT Offline
                      tomy
                      wrote on last edited by
                      #20

                      Good. I edited the package.xml file. And also changed all @component.addOperation to @component.addElevatedOperation in the installscript file. There are three operations all for creating shortcuts.
                      Now I seemingly should add this line of code into the code:

                      addElevatedOperation("GlobalConfig", "SystemScope", "Company", "App", "key", "value")
                      

                      I searched for that and found this. It shows no detail on how to use the arguments and where in the code, what header or .cpp file, to use it! :(

                      1 Reply Last reply
                      0
                      • tomyT Offline
                        tomyT Offline
                        tomy
                        wrote on last edited by
                        #21

                        Isn't there any solution? :(
                        I think all programmers have faced or will face such a problem one day.

                        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