Results 1 to 8 of 8

Thread: Problem when Installing resources with whitespaces or +- symbols

  1. #1
    Join Date
    Jul 2011
    Posts
    42
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Problem when Installing resources with whitespaces or +- symbols

    I need to install a few resources so i used INSTALLS in .pro file.
    The problem is that i have a few resources with whitespaces in their names, and also some symbols. Im working on Windows 7.

    I have tried using quote() but it does work, it doesnt add " " nor ' ' to the string.

    .pro file Code:
    1. Documentation.path = $$DISTDIR/docs/
    2. Documentation.files = $$quote(docs/*)
    3.  
    4. Mingw.path = $$BINDIR
    5. Mingw.files = $$quote($$PWD/$$THIRDPARTY/mingw/lib/libstdc++-6.dll) \
    6. $$quote($$PWD/$$THIRDPARTY/mingw/lib/libgcc_s_dw2-1.dll)
    7.  
    8. INSTALLS += Documentation Mingw
    To copy to clipboard, switch view to plain text mode 

    I've tried adding quotes inside the $$quote(), wrapping it with double and single quotes, still nothing. The result is just the same as without using the $$quote(). I get the : "The system cannot find the file specified."

    Any idea how can i solve this? because i could change a pdf filename, but not the mingw dll.

  2. #2
    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: Problem when Installing resources with whitespaces or +- symbols

    Did you try just using quotes (that is: the " character)? Moreover if you're trying to do what I think you are then you shouldn't do that. Instead use a proper installer for your app.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jul 2011
    Posts
    42
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem when Installing resources with whitespaces or +- symbols

    I've tried all this things:

    Installing Code:
    1. Documentation.files = $$quote(docs/*)
    2. Documentation.files = $$quote("docs/*")
    3. Documentation.files = $$quote(""docs/*"")
    4. Documentation.files = "$$quote(docs/*)"
    5. Documentation.files = ""$$quote(docs/*)""
    To copy to clipboard, switch view to plain text mode 

    Same error all the time, qmake is removing every quote that i add. I have to make this installation since the executable that we are building needs some external dlls, executables and config files to run. So I'm moving the dlls that i need to startup the program and also the exec files that are used later since the run directory used is "."
    Since we are moving those files i decided to move the documentation as well.

    The only think i can think of is to generate a custom make with only the install option. So i'll add it as a second make step in Qt Creator and there i can avoid using qmake.

    any other ideas?

  4. #4
    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: Problem when Installing resources with whitespaces or +- symbols

    Do you have a file called "*"? If not, then what's a quote good for? If you want a wildcard, the writing D.files = docs/* is enough. However all those files need to exist in the moment qmake is ran.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Jul 2011
    Posts
    42
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem when Installing resources with whitespaces or +- symbols

    Ok, so i thougth i could use $$quote(docs/*) and it would process each file. Doesnt matter in this case, i can add "_" instead of whitespace, for each filename
    The big problem is in the libstdc++-6.dll file, here the "+" is messing things up and i cant get qmake to quote (with ") the path of the file. since im using windows, when installing it uses COPY command, and the '+' is not supported unless you wrap the path with quotes.

  6. #6
    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: Problem when Installing resources with whitespaces or +- symbols

    You can override the command used for installing if you really want to. However I suggest you rethink your approach.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. #7
    Join Date
    Jun 2012
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem when Installing resources with whitespaces or +- symbols

    It's confirmed bug https://bugreports.qt-project.org/browse/QTBUG-16372 and I have workaround.
    I have used backslashed quotes in .pro file.
    like \"C:\\MinGW\\bin\\libstdc++-6.dll\"

  8. #8
    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: Problem when Installing resources with whitespaces or +- symbols

    It's not a confirmed bug. Read the comments under the report.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. "Unable to read symbols" Problem
    By weaver4 in forum Newbie
    Replies: 10
    Last Post: 20th December 2012, 22:36
  2. Problem Editing Resources with Qt Designer
    By demonGeek in forum Qt Tools
    Replies: 1
    Last Post: 26th January 2011, 05:04
  3. Problem with embedded resources under windows xp?
    By Kumosan in forum Installation and Deployment
    Replies: 1
    Last Post: 8th October 2008, 08:50
  4. problem with resources
    By SuperSonik in forum Installation and Deployment
    Replies: 2
    Last Post: 15th February 2007, 10:58
  5. Resources Modules DLL Window problem
    By RHBaum in forum Qt Programming
    Replies: 3
    Last Post: 16th October 2006, 15:54

Tags for this Thread

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.