Results 1 to 10 of 10

Thread: Distribute a executable

  1. #1
    Join Date
    Jul 2006
    Posts
    126
    Thanks
    17
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Distribute a executable

    I have done a program with Qt4 and I want to redistribute it without compiling, but when I try to use the Mysql driver, it always give me the error DRIVER NOT LOADED. How can I pack the Mysql driver to another computer?

    Thanks

  2. #2
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Distribute a executable

    Sql related dll's should be put in sqldrivers folder on the system where you are installing the application.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Distribute a executable

    Or compiled into the executable.

  4. #4
    Join Date
    Jul 2006
    Posts
    126
    Thanks
    17
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Distribute a executable

    Quote Originally Posted by wysota View Post
    Or compiled into the executable.
    How can it be done? I have read something about UPX, but I dont know how to do the package

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Distribute a executable

    I don't know what UPX is. All you need to do is to compile the driver into the library instead of a separate plugin. See configure -help to see what switch is required when compiling Qt.

  6. #6
    Join Date
    Jul 2006
    Posts
    126
    Thanks
    17
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Distribute a executable

    Ok "./configure -static" in linux but in Windows (with MinGW) what can I do?

  7. #7
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Thanks
    3
    Thanked 74 Times in 54 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Distribute a executable

    There is a page in Assistant entitled "Deploying an Application on Qt/Windows". It includes information on packaging plugins.

  8. The following user says thank you to Brandybuck for this useful post:

    xgoan (6th October 2006)

  9. #8
    Join Date
    Jul 2006
    Posts
    126
    Thanks
    17
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Distribute a executable

    Don't work, here is my list of files:

    Informes.exe
    mingwm10.dll
    QtCore4.dll
    QtGui4.dll
    QtSql4.dll
    plugins\sqldrivers\LIBMYSQL.DLL
    plugins\sqldrivers\qsqlmysql.dll
    plugins\sqldrivers\qsqlmysqld.dll


  10. #9
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Distribute a executable

    Quote Originally Posted by xgoan View Post
    plugins\sqldrivers\LIBMYSQL.DLL
    Move this DLL to the same directory where Informes.exe is.

    Edit: and it should be "sqldrivers" not "plugins\sqldrivers".

  11. #10
    Join Date
    Jul 2006
    Posts
    126
    Thanks
    17
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Distribute a executable

    Problem found, when I put a libmysql.dll in the program dir it fails, and when loading the library from \Windows\System32 it works. Copying this library to program directory and it works on all computers...

Similar Threads

  1. Replies: 10
    Last Post: 7th April 2006, 18:23
  2. Sames executable, different behaviours...
    By high_flyer in forum Qt Programming
    Replies: 7
    Last Post: 21st March 2006, 19:33
  3. Replies: 7
    Last Post: 11th March 2006, 15:51
  4. statically linked executable
    By smalls in forum Qt Programming
    Replies: 8
    Last Post: 11th February 2006, 02:09

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.