Results 1 to 5 of 5

Thread: Info.plist is not copied

  1. #1

    Question Info.plist is not copied

    Hello,

    I searched the whole internet and tried every hack that I could find but I simply cannot get qmake to copy the Info.plist file.

    I tried disabling shadow copy and adding the plist file as an install.

    Nothing really helps.

    -------------
    macx {
    QMAKE_INFO_PLIST = ../../Source/Info.plist
    QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6

    # try to copy the file manually
    plist.path = "$$DESTDIR/$$join(TARGET,,,.app)/Contents"
    plist.files = ../../Source/Info.plist
    INSTALLS += plist
    }
    -------------

    I am using Qt 5.4 and the Qt Creator.

    Is it correct that the option "Build -> Deploy project" is not available?

    Thanks
    Dan

  2. #2
    Join Date
    Dec 2009
    Location
    New Orleans, Louisiana
    Posts
    791
    Qt products
    Qt5
    Platforms
    MacOS X
    Thanks
    13
    Thanked 153 Times in 150 Posts

    Default Re: Info.plist is not copied

    Quote Originally Posted by DanKolle View Post
    I searched the whole internet and tried every hack that I could find but I simply cannot get qmake to copy the Info.plist file.
    The following works for me:
    Qt Code:
    1. QMAKE_INFO_PLIST = recode.plist
    2. plist.target = Info.plist
    3. plist.depends = recode.plist "$${DESTDIR}/$${TARGET}.app/Contents/Info.plist"
    4. plist.commands = $(DEL_FILE) \"$${DESTDIR}/$${TARGET}.app/Contents/Info.plist\" $$escape_expand(\n\t) \
    5. $(COPY_FILE) recode.plist \"$${DESTDIR}/$${TARGET}.app/Contents/Info.plist\"
    6. QMAKE_EXTRA_TARGETS = plist
    7. PRE_TARGETDEPS += $$plist.target
    To copy to clipboard, switch view to plain text mode 
    recode.plist is the name of my custom app plist file. If I recall correctly, qmake will not replace Info.plist if it exists, which is why the plist.commands deletes Info.plist from the app bundle, etc.

    Hope that helps,

    Jeff

  3. #3

    Default Re: Info.plist is not copied

    Hello Jeff,

    thank you for your reply.

    When I use the suggested code I get the following error:

    error: No rule to make target `/MyApp.app/Contents/Info.plist', needed by `Info.plist'. Stop.

    My plist file is in another folder, could this cause problems?

    Qt Code:
    1. QMAKE_INFO_PLIST = ../../Source/Info.plist
    2. plist.target = Info.plist
    3. plist.depends = ../../Source/Info.plist "$${DESTDIR}/$${TARGET}.app/Contents/Info.plist"
    4. plist.commands = $(DEL_FILE) \"$${DESTDIR}/$${TARGET}.app/Contents/Info.plist\" $$escape_expand(\n\t) \
    5. $(COPY_FILE) ../../Source/Info.plist \"$${DESTDIR}/$${TARGET}.app/Contents/Info.plist\"
    6. QMAKE_EXTRA_TARGETS = plist
    7. PRE_TARGETDEPS += $$plist.target
    To copy to clipboard, switch view to plain text mode 

  4. #4
    Join Date
    Dec 2009
    Location
    New Orleans, Louisiana
    Posts
    791
    Qt products
    Qt5
    Platforms
    MacOS X
    Thanks
    13
    Thanked 153 Times in 150 Posts

    Default Re: Info.plist is not copied

    Quote Originally Posted by DanKolle View Post
    My plist file is in another folder, could this cause problems?
    Hi, my first guess would be that plist.target needs to also point to the actual Info.plist file, so:
    Qt Code:
    1. plist.target = ../../Source/Info.plist
    To copy to clipboard, switch view to plain text mode 
    I would try that and if that doesn't work, please show the build/compile output here.

    Thanks,

    jthomps

  5. #5

    Default Re: Info.plist is not copied

    I got it working with the following code:

    Qt Code:
    1. QMAKE_INFO_PLIST = ../../Source/CustomInfo.plist
    2. plist.target = ".$${DESTDIR}/$${TARGET}.app/Contents/Info.plist"
    3. plist.depends = ../../Source/CustomInfo.plist
    4. plist.commands = $(DEL_FILE) \".$${DESTDIR}/$${TARGET}.app/Contents/Info.plist\" $$escape_expand(\n\t) \
    5. $(COPY_FILE) ../../Source/CustomInfo.plist \".$${DESTDIR}/$${TARGET}.app/Contents/Info.plist\"
    6. QMAKE_EXTRA_TARGETS = plist
    7. PRE_TARGETDEPS += $$plist.target
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. Replies: 1
    Last Post: 17th July 2013, 21:51
  2. Replies: 0
    Last Post: 7th May 2011, 19:43
  3. info.plist QtCore question
    By sepp in forum Installation and Deployment
    Replies: 0
    Last Post: 3rd January 2011, 20:43
  4. QList<int> ** Plist
    By tanuja in forum Qt Programming
    Replies: 3
    Last Post: 18th November 2010, 04:22
  5. How to block the textedit'd text to be copied
    By santosh.kumar in forum Qt Programming
    Replies: 2
    Last Post: 2nd November 2007, 10:54

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
  •  
Qt is a trademark of The Qt Company.