Results 1 to 3 of 3

Thread: Including required file when building/deploy (not as resource)

  1. #1
    Join Date
    Nov 2015
    Location
    Vermont
    Posts
    52
    Thanks
    15
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    MacOS X Windows

    Default Including required file when building/deploy (not as resource)

    I'm using a .ini file as a config file to load into QSettings for initializing some things in my program, and I'm wondering how to make sure the file is included and in the right place when building/deploying (i.e., a specific place that the program knows to look for it). I don't want to add it to a resource file because those get compiled and the point of this is to allow the file to be edited without re-compiling the program. I've found information about including libraries in the .pro file, but this is just a single .ini file so I'm not sure that would work the same. Is there anything I can do besides copy and paste the file into the folder with the executable after building/deploying? It seems like there should be a better way, I'm just having a hard time finding it. Any pointers would be helpful!

  2. #2
    Join Date
    Jan 2017
    Posts
    58
    Thanks
    2
    Thanked 2 Times in 2 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Including required file when building/deploy (not as resource)

    I don't know how do you build your app, but e.g. in InnoSetup you can add a file to your executable file. So the .ini file can be in the same directory as .exe file.

  3. #3
    Join Date
    Nov 2015
    Location
    Vermont
    Posts
    52
    Thanks
    15
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    MacOS X Windows

    Default Re: Including required file when building/deploy (not as resource)

    I use Qt's deploy tools (windeployqt and macdeployqt), so unfortunately that won't work. But good to know if I do start using that at some point.

Similar Threads

  1. Replies: 2
    Last Post: 18th March 2016, 11:51
  2. Replies: 4
    Last Post: 2nd October 2013, 13:57
  3. Replies: 8
    Last Post: 23rd March 2011, 10:13
  4. Read from File :: Help required
    By abghosh in forum Qt Programming
    Replies: 6
    Last Post: 1st March 2010, 07: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.