November 28, 2010

unni unni
Lab Rat
9 posts

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

November 28, 2010

Tobias Hunger Tobias Hunger
Mad Scientist
3156 posts

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:-)

November 28, 2010

unni unni
Lab Rat
9 posts

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:

  1. symbian {
  2.     # Create a 'make sis' rule which can be run from the top-level
  3.  
  4.     include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
  5.  
  6.     # UID for the SIS file
  7.     TARGET.UID3 = 0xA000E402
  8. }

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!

December 4, 2010

Deleted Member # 14e8 Deleted Member # 14e8
Lab Rat
355 posts

Hi,
I think, all you need is to define the UID3 in the .pro file.

This is a pretty barebone example:

  1. TEMPLATE = app
  2. TARGET = MtQt
  3. QT += core \
  4.     gui
  5. HEADERS += Dialog.h \
  6. ...
  7. SOURCES += Dialog.cpp \
  8. ...
  9. FORMS += Dialog.ui \
  10. ...
  11. RESOURCES +=
  12. symbian:TARGET.UID3 = 0xE7B2655E

December 4, 2010

unni unni
Lab Rat
9 posts

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

  1. include(spectrum.pri)
  2.  
  3. TEMPLATE = subdirs
  4.  
  5. # Ensure that library is built before application
  6. CONFIG  += ordered
  7.  
  8. !contains(DEFINES, DISABLE_FFT) {
  9.     SUBDIRS += 3rdparty/fftreal
  10. }
  11.  
  12. SUBDIRS += app
  13.  
  14. TARGET = spectrum
  15.  
  16. symbian {
  17.     # Create a 'make sis' rule which can be run from the top-level
  18.  
  19.     include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
  20.  
  21.     # UID for the SIS file
  22.     TARGET.UID3 = 0xA000E402
  23. }
  24.  
  25. sources.files = README.txt spectrum.pri spectrum.pro TODO.txt
  26. sources.path = $$[QT_INSTALL_DEMOS]/spectrum
  27. INSTALLS += sources

2. Contents of app.pro

  1. include(../spectrum.pri)
  2.  
  3. static: error(This application cannot be statically linked to the fftreal library)
  4.  
  5. TEMPLATE = app
  6.  
  7. TARGET = spectrum
  8.  
  9. QT       += multimedia
  10.  
  11. SOURCES  += main.cpp \
  12.  
  13. HEADERS  += engine.h \
  14.  
  15. fftreal_dir = ../3rdparty/fftreal
  16.  
  17. INCLUDEPATH += $${fftreal_dir}
  18.  
  19. RESOURCES = spectrum.qrc
  20.  
  21. symbian {
  22.     # Platform security capability required to record audio on Symbian
  23.     TARGET.CAPABILITY = UserEnvironment
  24.  
  25.     # Provide unique ID for the generated binary, required by Symbian OS
  26.     TARGET.UID3 = 0xA000E402
  27. }
  28.  
  29.  
  30. # Dynamic linkage against FFTReal DLL
  31. !contains(DEFINES, DISABLE_FFT) {
  32.     symbian {
  33.         # Must explicitly add the .dll suffix to ensure dynamic linkage
  34.         LIBS += -lfftreal.dll
  35.         QMAKE_LIBDIR += $${fftreal_dir}
  36.     } else {
  37.         macx {
  38.             # Link to fftreal framework
  39.             LIBS += -F$${fftreal_dir}
  40.             LIBS += -framework fftreal
  41.         } else {
  42.             LIBS += -L..
  43.             LIBS += -lfftreal
  44.         }
  45.     }
  46. }
  47.  
  48. # Install
  49.  
  50. sources.files = $$SOURCES $$HEADERS $$RESOURCES app.pro
  51. sources.path = $$[QT_INSTALL_DEMOS]/spectrum/app
  52. images.files += images/record.png images/settings.png
  53. images.path = $$[QT_INSTALL_DEMOS]/spectrum/app/images
  54. INSTALLS += sources images
  55.  
  56. # Deployment
  57.  
  58. symbian {
  59.     include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
  60.  
  61.     !contains(DEFINES, DISABLE_FFT) {
  62.         # Include FFTReal DLL in the SIS file
  63.         fftreal.sources = ../fftreal.dll
  64.         fftreal.path = !:/sys/bin
  65.         DEPLOYMENT += fftreal
  66.     }
  67. } else {
  68.     macx {
  69.         # Specify directory in which to create spectrum.app bundle
  70.         DESTDIR = ..
  71.  
  72.         !contains(DEFINES, DISABLE_FFT) {
  73.             # Relocate fftreal.framework into spectrum.app bundle
  74.             framework_dir = ../spectrum.app/Contents/Frameworks
  75.             framework_name = fftreal.framework/Versions/1/fftreal
  76.             QMAKE_POST_LINK = \
  77.                 mkdir -p $${framework_dir} &&\
  78.                 rm -rf $${framework_dir}/fftreal.framework &&\
  79.                 cp -R $${fftreal_dir}/fftreal.framework $${framework_dir} &&\
  80.                 install_name_tool -id @executable_path/../Frameworks/$${framework_name} \
  81.                                   $${framework_dir}/$${framework_name} &&\
  82.                 install_name_tool -change $${framework_name} \
  83.                                   @executable_path/../Frameworks/$${framework_name} \
  84.                                   ../spectrum.app/Contents/MacOS/spectrum
  85.         }
  86.     } else {
  87.         # Specify directory in which to create spectrum application
  88.         DESTDIR = ..
  89.  
  90.         unix: {
  91.             # Provide relative path from application to fftreal library
  92.             QMAKE_LFLAGS += -Wl,--rpath=\\\$\$ORIGIN
  93.         }
  94.     }
  95. }

December 4, 2010

Deleted Member # 14e8 Deleted Member # 14e8
Lab Rat
355 posts

OMG. Please post that one to Forum Nokia. Youll be helped better there…

December 4, 2010

unni unni
Lab Rat
9 posts

:) Why OMG? Because I posted the completed file contents here?!

I was actually creating Forum Nokia account and logged in to check the activation mail when I saw your reply. I will post there this question and will update here.

December 4, 2010

Deleted Member # 14e8 Deleted Member # 14e8
Lab Rat
355 posts

Sorry for being a bit short. This forum is a bit of an FFA due to the project elf currently, as the first competition period ends tomorrow.

At Forum Nokia, there currently is no competition…so the users are more calm. I will see you there soon enough as tamhanna ;)

December 4, 2010

xsacha xsacha
Lab Rat
517 posts

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?

 Signature 

- Sacha

December 4, 2010

Deleted Member # 14e8 Deleted Member # 14e8
Lab Rat
355 posts

Hi,
to be honest: this error imho does not refer to a dead path. iMHO, dead path errors are shown as such.

Could you also show us the pri files?

Tam

December 4, 2010

xsacha xsacha
Lab Rat
517 posts

tamhanna wrote:
Could you also show us the pri files?

include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)

Comes with your SDK.

include(../spectrum.pri)

Comes with the app, which is also in your SDK.

tamhanna wrote:
MHO, dead path errors are shown as such.

Not in my experience :(

 Signature 

- Sacha

December 5, 2010

Deleted Member # 14e8 Deleted Member # 14e8
Lab Rat
355 posts

Hello,
I have looked, and not found spectrum.pri on my machine.

Might be an example exclusive to the Nokia Qt SDK

December 5, 2010

unni unni
Lab Rat
9 posts

These are the contents of the .pri files:

1. spectrum.pri

  1. # The following macros allow certain features and debugging output
  2. # to be disabled / enabled at compile time.
  3.  
  4. # Debug output from spectrum calculation
  5. DEFINES += LOG_SPECTRUMANALYSER
  6.  
  7. # Debug output from waveform generation
  8. #DEFINES += LOG_WAVEFORM
  9.  
  10. # Debug output from engine
  11. DEFINES += LOG_ENGINE
  12.  
  13. # Dump input data to spectrum analyer, plus artefact data files
  14. #DEFINES += DUMP_SPECTRUMANALYSER
  15.  
  16. # Dump captured audio data
  17. #DEFINES += DUMP_CAPTURED_AUDIO
  18.  
  19. # Disable calculation of level
  20. #DEFINES += DISABLE_LEVEL
  21.  
  22. # Disable calculation of frequency spectrum
  23. # If this macro is defined, the FFTReal DLL will not be built
  24. #DEFINES += DISABLE_FFT
  25.  
  26. # Disables rendering of the waveform
  27. #DEFINES += DISABLE_WAVEFORM
  28.  
  29. # If defined, superimpose the progress bar on the waveform
  30. DEFINES += SUPERIMPOSE_PROGRESS_ON_WAVEFORM
  31.  
  32. # Perform spectrum analysis calculation in a separate thread
  33. DEFINES += SPECTRUM_ANALYSER_SEPARATE_THREAD
  34.  
  35. # Suppress warnings about strncpy potentially being unsafe, emitted by MSVC
  36. win32: DEFINES += _CRT_SECURE_NO_WARNINGS

2. symbianpkgrules.pri

  1. !symbian: error(Only include this file for Symbian platforms)
  2.  
  3. RSS_RULES ="group_name=\"QtDemos\";"
  4.  
  5. vendorinfo = \
  6.     "; Localised Vendor name" \
  7.     "%{\"Nokia, Qt\"}" \
  8.     " " \
  9.     "; Unique Vendor name" \
  10.     ":\"Nokia, Qt\"" \
  11.     " "
  12.  
  13. demos_deployment.pkg_prerules += vendorinfo
  14. DEPLOYMENT += demos_deployment
  15.  
  16. isEmpty(ICON):ICON = $$QT_SOURCE_TREE/src/s60installs/qt.svg

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.

December 19, 2010

unni unni
Lab Rat
9 posts

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
 
  ‹‹ QLabel showFullScreen not working correctly      Phonon or QMediaplayer: Set access point to be used ››

You must log in to post a reply. Not a member yet? Register here!