Error: PKG file does not exist, ‘sis’ and ‘installer_sis’ target are only supported for executables or projects with DEPLOYMENT statement
Hi, I was trying to run the ‘spectrum’ demo available under ‘C:\NokiaQtSDK\Demos\4.6\spectrum’. However, I get this error when I try to build:
Makefile:138: error: PKG file does not exist, ‘sis’ and ‘installer_sis’ target are only supported for executables or projects with DEPLOYMENT statement. Stop.
What could I be doing wrong? Please note that instead of building the demo from the above path, I copied the complete ‘spectrum’ folder to C:\NokiaQtSDKProjects\spectrum path.
13 replies
Looks like the demo you are trying to build does not support symbian.
You will need to add that support. The most straight forward way is probably to set up a symbian project using Qt Creator’s mobile application wizard and then copying all the symbian specific lines from the generated .pro-file over into the demo’s .pro-file.
This will most likely need some additional tweaking (filenames, etc. are bound to be different), but it should at least provide you with a guideline to follow.
PS: Patches are welcome:-)
There are multiple .pro files in this folder. In all of them, I was able to see the word ‘symbian’. For example, in the main .pro file, the following lines were present:
- symbian {
- # Create a 'make sis' rule which can be run from the top-level
- include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
- # UID for the SIS file
- TARGET.UID3 = 0xA000E402
- }
I am not sure what this means since I am totally new to Qt itself. I haven’t tried editing the files as you suggested because of this.
Also, a Google search took me to this blog [labs.qt.nokia.com] where somebody reported the same error. However, it seem to have got resolved automatically for him!
Hi,
I think, all you need is to define the UID3 in the .pro file.
This is a pretty barebone example:
- TEMPLATE = app
- TARGET = MtQt
- QT += core \
- gui
- HEADERS += Dialog.h \
- ...
- SOURCES += Dialog.cpp \
- ...
- FORMS += Dialog.ui \
- ...
- RESOURCES +=
- symbian:TARGET.UID3 = 0xE7B2655E
I think it already has the UID entry. I am posting the contents of the .pro files (there are 2 .pro files in this) below:
1. Contents of spectrum. pro
- include(spectrum.pri)
- TEMPLATE = subdirs
- # Ensure that library is built before application
- CONFIG += ordered
- !contains(DEFINES, DISABLE_FFT) {
- SUBDIRS += 3rdparty/fftreal
- }
- SUBDIRS += app
- TARGET = spectrum
- symbian {
- # Create a 'make sis' rule which can be run from the top-level
- include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
- # UID for the SIS file
- TARGET.UID3 = 0xA000E402
- }
- sources.files = README.txt spectrum.pri spectrum.pro TODO.txt
- sources.path = $$[QT_INSTALL_DEMOS]/spectrum
- INSTALLS += sources
2. Contents of app.pro
- include(../spectrum.pri)
- static: error(This application cannot be statically linked to the fftreal library)
- TEMPLATE = app
- TARGET = spectrum
- QT += multimedia
- SOURCES += main.cpp \
- HEADERS += engine.h \
- fftreal_dir = ../3rdparty/fftreal
- INCLUDEPATH += $${fftreal_dir}
- RESOURCES = spectrum.qrc
- symbian {
- # Platform security capability required to record audio on Symbian
- TARGET.CAPABILITY = UserEnvironment
- # Provide unique ID for the generated binary, required by Symbian OS
- TARGET.UID3 = 0xA000E402
- }
- # Dynamic linkage against FFTReal DLL
- !contains(DEFINES, DISABLE_FFT) {
- symbian {
- # Must explicitly add the .dll suffix to ensure dynamic linkage
- LIBS += -lfftreal.dll
- QMAKE_LIBDIR += $${fftreal_dir}
- } else {
- macx {
- # Link to fftreal framework
- LIBS += -F$${fftreal_dir}
- LIBS += -framework fftreal
- } else {
- LIBS += -L..
- LIBS += -lfftreal
- }
- }
- }
- # Install
- sources.files = $$SOURCES $$HEADERS $$RESOURCES app.pro
- sources.path = $$[QT_INSTALL_DEMOS]/spectrum/app
- images.files += images/record.png images/settings.png
- images.path = $$[QT_INSTALL_DEMOS]/spectrum/app/images
- INSTALLS += sources images
- # Deployment
- symbian {
- include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
- !contains(DEFINES, DISABLE_FFT) {
- # Include FFTReal DLL in the SIS file
- fftreal.sources = ../fftreal.dll
- fftreal.path = !:/sys/bin
- DEPLOYMENT += fftreal
- }
- } else {
- macx {
- # Specify directory in which to create spectrum.app bundle
- DESTDIR = ..
- !contains(DEFINES, DISABLE_FFT) {
- # Relocate fftreal.framework into spectrum.app bundle
- framework_dir = ../spectrum.app/Contents/Frameworks
- framework_name = fftreal.framework/Versions/1/fftreal
- QMAKE_POST_LINK = \
- mkdir -p $${framework_dir} &&\
- rm -rf $${framework_dir}/fftreal.framework &&\
- cp -R $${fftreal_dir}/fftreal.framework $${framework_dir} &&\
- install_name_tool -id @executable_path/../Frameworks/$${framework_name} \
- $${framework_dir}/$${framework_name} &&\
- install_name_tool -change $${framework_name} \
- @executable_path/../Frameworks/$${framework_name} \
- ../spectrum.app/Contents/MacOS/spectrum
- }
- } else {
- # Specify directory in which to create spectrum application
- DESTDIR = ..
- unix: {
- # Provide relative path from application to fftreal library
- QMAKE_LFLAGS += -Wl,--rpath=\\\$\$ORIGIN
- }
- }
- }
It’s only a FFA for tamhanna. He’s just spamming. He had to write a short sentence to pretend he shouldn’t be banned.
I think the problem is due to you relocating the source dir. Does it work when you compile it in its original location?
The PRO file refers to a lot of relative dirs that are now dead ends. See the ones with “../” in them?
These are the contents of the .pri files:
1. spectrum.pri
- # The following macros allow certain features and debugging output
- # to be disabled / enabled at compile time.
- # Debug output from spectrum calculation
- DEFINES += LOG_SPECTRUMANALYSER
- # Debug output from waveform generation
- #DEFINES += LOG_WAVEFORM
- # Debug output from engine
- DEFINES += LOG_ENGINE
- # Dump input data to spectrum analyer, plus artefact data files
- #DEFINES += DUMP_SPECTRUMANALYSER
- # Dump captured audio data
- #DEFINES += DUMP_CAPTURED_AUDIO
- # Disable calculation of level
- #DEFINES += DISABLE_LEVEL
- # Disable calculation of frequency spectrum
- # If this macro is defined, the FFTReal DLL will not be built
- #DEFINES += DISABLE_FFT
- # Disables rendering of the waveform
- #DEFINES += DISABLE_WAVEFORM
- # If defined, superimpose the progress bar on the waveform
- DEFINES += SUPERIMPOSE_PROGRESS_ON_WAVEFORM
- # Perform spectrum analysis calculation in a separate thread
- DEFINES += SPECTRUM_ANALYSER_SEPARATE_THREAD
- # Suppress warnings about strncpy potentially being unsafe, emitted by MSVC
- win32: DEFINES += _CRT_SECURE_NO_WARNINGS
2. symbianpkgrules.pri
- !symbian: error(Only include this file for Symbian platforms)
- RSS_RULES ="group_name=\"QtDemos\";"
- vendorinfo = \
- "; Localised Vendor name" \
- "%{\"Nokia, Qt\"}" \
- " " \
- "; Unique Vendor name" \
- ":\"Nokia, Qt\"" \
- " "
- demos_deployment.pkg_prerules += vendorinfo
- DEPLOYMENT += demos_deployment
I tired to run the project directly from its original path. Even then, it gave me the error. Please note that it runs properly with Qt Simulator irrespective of the path.
Problem solved by using Qt 4.7.1 for Symbian.
The following posts helped me in finding the reason and for setting up Qt 4.7.1:
http://bugreports.qt.nokia.com/browse/QTBUG-5312?focusedCommentId=135858#comment-135858
http://labs.qt.nokia.com/2010/12/12/start-with-qt-4-7-for-symbian-today/#more-2740
You must log in to post a reply. Not a member yet? Register here!



