Thanks for the hint but I still can't get it working. As far as I can tell you're supposed to create an install set as follows in your project file:
frameworks.path = myApp.app/Contents/Frameworks
frameworks.files = path/to/framework/*
INSTALLS += frameworks
I've tried this and nothing happens when I build my project in Xcode. Is there something else you need to do to get Xcode to "install" the files?
I've even created a minimal project file if anyone else wants to try it out and confirm that it doesn't work, or point out what I'm doing wrong.
qmakeTest.pro
######################################################################
# Automatically generated by qmake (2.01a) Fri Sep 21 15:16:49 2007
######################################################################
TEMPLATE = app
TARGET = qmakeTest
DEPENDPATH += .
INCLUDEPATH += .
# Input
SOURCES += main.cpp
images.path = qmakeTest.app/Contents/Images
images.files = car.jpg
INSTALLS += images
######################################################################
# Automatically generated by qmake (2.01a) Fri Sep 21 15:16:49 2007
######################################################################
TEMPLATE = app
TARGET = qmakeTest
DEPENDPATH += .
INCLUDEPATH += .
# Input
SOURCES += main.cpp
images.path = qmakeTest.app/Contents/Images
images.files = car.jpg
INSTALLS += images
To copy to clipboard, switch view to plain text mode
main.cpp
#include <QApplication>
#include <QWidget>
int main(int argc, char *argv[])
{
w.setGeometry(100, 100, 500, 355);
w.show();
return app.exec();
}
#include <QApplication>
#include <QWidget>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QWidget w;
w.setGeometry(100, 100, 500, 355);
w.show();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
car.jpg is just a jpeg file that I want to be installed inside the app bundle in Contents/Images.
Steps to follow:
- Put qmakeTest.pro, main.cpp & car.jpg (or your own file) in a folder.
- Run "qmake qmakeTest.pro"
- Open the generated Xcode project and build it.
- Look inside the application package and notice that there is no Images folder anywhere to be found.
As far as I can tell this is how it should be done but nothing happens when I build the Xcode project. Any suggestions?
Thanks
Dave Thorup
Bibble Labs
Bookmarks