Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. MySql Deploy App....HELP!!
Forum Updated to NodeBB v4.3 + New Features

MySql Deploy App....HELP!!

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
28 Posts 3 Posters 8.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.
  • S Offline
    S Offline
    shathcock
    wrote on last edited by
    #12

    When I run it from creator it returns the release directory of the release folder that it creates and puts everything into. In other words the directory it puts the .exe file into sorry it's bee a long few days.

    1 Reply Last reply
    0
    • hskoglundH Offline
      hskoglundH Offline
      hskoglund
      wrote on last edited by
      #13

      Hi, one more thing you could try (since your app runs fine when launched from Qt Creator):
      define the environment variable (SET QT_DEBUG_PLUGINS=1) also in Qt Creator (in the Projects Tab, you can set it in Build Environment) then start your app and compare the trace output to the one you got with errors before.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        shathcock
        wrote on last edited by
        #14

        Any other Ideas this just really doesn't make any sense. It runs perfectly from the directory that it is compiled to but I can't move it anywhere else and have the MySql drivers working.

        1 Reply Last reply
        0
        • hskoglundH Offline
          hskoglundH Offline
          hskoglund
          wrote on last edited by
          #15

          Here's another: try skipping using windeployqt; instead switch to using manual deployment, use this nice guide

          S 1 Reply Last reply
          0
          • hskoglundH hskoglund

            Here's another: try skipping using windeployqt; instead switch to using manual deployment, use this nice guide

            S Offline
            S Offline
            shathcock
            wrote on last edited by
            #16

            @hskoglund Ok tried it Same Thing!!

            1 Reply Last reply
            0
            • hskoglundH Offline
              hskoglundH Offline
              hskoglund
              wrote on last edited by
              #17

              Hmmm... The deployment directory/the installation folder your app refuses to run from, is that inside C:\Program Files (x86) or a more normal folder like C:\Qt?

              1 Reply Last reply
              0
              • S Offline
                S Offline
                shathcock
                wrote on last edited by
                #18

                No I have it on the Desktop I'll try though!!

                S 1 Reply Last reply
                0
                • S shathcock

                  No I have it on the Desktop I'll try though!!

                  S Offline
                  S Offline
                  shathcock
                  wrote on last edited by
                  #19

                  @shathcock Nope same thing!!!

                  1 Reply Last reply
                  0
                  • hskoglundH Offline
                    hskoglundH Offline
                    hskoglund
                    wrote on last edited by
                    #20

                    Hmmmm, if I understand correctly: you have 2 directories/folders with identical contents but in different places on your C: drive. When you doubleciick to launch your app in one of them everything is fine and dandy, but when you try doubleclicking your app in the other directory you get that mysql plugin loading error?

                    S 1 Reply Last reply
                    0
                    • hskoglundH hskoglund

                      Hmmmm, if I understand correctly: you have 2 directories/folders with identical contents but in different places on your C: drive. When you doubleciick to launch your app in one of them everything is fine and dandy, but when you try doubleclicking your app in the other directory you get that mysql plugin loading error?

                      S Offline
                      S Offline
                      shathcock
                      wrote on last edited by
                      #21

                      @hskoglund Basically yes. The one directory that is does run out of is the one that it is placed into when it is compiled, in other words the build..........\release folder. When I move the app.exe file and try to build a distribution folder it just all falls apart. The app actually runs but no database connection. I will say this also I spent 3 days with it not running until I set the environment variable QT_QPA_PLATFORM_PLUGIN_PATH. Could that be the problem. Sorry my brain is fried from trying to figure this stuff out.

                      1 Reply Last reply
                      0
                      • hskoglundH Offline
                        hskoglundH Offline
                        hskoglund
                        wrote on last edited by
                        #22

                        Aha, I see :-)
                        The QT_QPA_PLATFORM_PLUGIN_PATH fiddling explains why in that debug trace above there are no database dlls listed, because Qt is barking up the wrong tree I mean directory. (Because while settingQT_QPA_PLATFORM_PLUGIN_PATH takes care of custom loading qwindows.dll from a directory of your choosing, it leaves other plugins like database guys stranded.)

                        QSalDatabase: QMYSQL driver not loaded
                        QSqlDatabase: available drivers; <-- no DLLs listed here
                        QSqlDatabase: an instance of QCoreApplication is required for loading driver plugins

                        So try placing the directory sqldrivers next to your .exe file, that should do it (just copy it from C:\5.5\msvc2013\plugins)

                        1 Reply Last reply
                        0
                        • S Offline
                          S Offline
                          shathcock
                          wrote on last edited by
                          #23

                          Ok so I already ad a sqldrivers folder in the same directory with the .exe file but I re-copied it anyway and changed the QT_QPA_PLATFORM_PLUGIN_PATH to point to the directory in that folder since I actually had pointed it to the directory in the qt installation and same thing still runs no database. I think I am loosing my mind over this.....

                          1 Reply Last reply
                          0
                          • hskoglundH Offline
                            hskoglundH Offline
                            hskoglund
                            wrote on last edited by
                            #24

                            Yeah i know, thinking too much about Qt's plugins can be traumatic, I've been there too..
                            Anyway, simplify always helps, I suggest tossing that QT_QPA_PLATFORM_PLUGIN_PATH setting.
                            Then try to get your app running without any "This application failed to start because ... Qt platform plugin "windows"." dialog boxes. Once you done that, mysql functionality should be much easier to accomplish.

                            1 Reply Last reply
                            0
                            • S Offline
                              S Offline
                              shathcock
                              wrote on last edited by
                              #25

                              Ok any Idea how to do that....lol I worked on that one for 2 days.

                              1 Reply Last reply
                              0
                              • hskoglundH Offline
                                hskoglundH Offline
                                hskoglund
                                wrote on last edited by
                                #26

                                Well if you cannot get the qwindows.dll plugin to load the vanilla/default way, you could try setting another environment variable: set QT_PLUGIN_PATH=pluginsdirectory
                                This one is better (causes less brain damage) because if you can get the qwindow.dll plugin loaded successfully that way, then qsqlmysql.dll should load as well. (The pluginsdirectory above should contain a platforms directory and a sqldrivers directory.) Also I've written about the different settings here.

                                1 Reply Last reply
                                0
                                • S Offline
                                  S Offline
                                  shathcock
                                  wrote on last edited by
                                  #27

                                  Wonderful I'll read it but here is something really strange. So I turned on debug and ran the program from the folder that it won't run from and I'm getting the windows plugin problem again however before I get that warning I get the QMYSQL driver not loaded error does that make any sense to you?

                                  1 Reply Last reply
                                  0
                                  • hskoglundH Offline
                                    hskoglundH Offline
                                    hskoglund
                                    wrote on last edited by
                                    #28

                                    Yeah I've seen that, usually occurs because you have global/static variables with QDatabase contents or similar. If you have, move them to your MainWindow class. Qt and global variables do not mix well :-)

                                    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