Discussion:
MeeGo SDK packaging with QML/Qt Quick
Sulamita Garcia
14 years ago
Permalink
Hello

I'm using SDK 1.2 preview (both windows and linux), and trying to change the
installation path for the package, which works fine when I do a Qt GUI
application(Qt C++ Project -> Qt Gui Application), but is failing on Qt
Quick packages. I created a new Qt Quick project -> Qt Quick Application,
edit the .pro and .spec files, and I can see the directory I want
(/opt/qml-ui-app) created and the qml files placed correctly, however the
binary still goes to /usr/local/bin. Shouldn't this be placed in the path
set in target.path?

Did I missed something or is something wrong with the packaging in this
case?

here's my .pro:

# Add more folders to ship with the application, here

folder_01.source = qml/qml-ui-app

folder_01.target = qml

DEPLOYMENTFOLDERS = folder_01

target.path=/opt/qml-ui-app/

qml.files = qml/*.qml

qml.path = /opt/qml-ui-app/qml

icon.files = qml-ui-app.png

icon.path = /usr/share/icons

desktop.files = qml-ui-app.desktop

desktop.path = /usr/share/applications

INSTALLS += target icon desktop qml

# Additional import path used to resolve QML modules in Creator's code model

QML_IMPORT_PATH =

# Avoid auto screen rotation

#DEFINES += ORIENTATIONLOCK

# Needs to be defined for Symbian

#DEFINES += NETWORKACCESS

symbian:TARGET.UID3 = 0xED4BA919

# Define QMLJSDEBUGGER to allow debugging of QML in debug builds

# (This might significantly increase build time)

# DEFINES += QMLJSDEBUGGER

# If your application uses the Qt Mobility libraries, uncomment

# the following lines and add the respective components to the

# MOBILITY variable.

# CONFIG += mobility

# MOBILITY +=

# The .cpp file which was generated for your project. Feel free to hack it.

SOURCES += main.cpp

# Please do not modify the following two lines. Required for deployment.

include(qmlapplicationviewer/qmlapplicationviewer.pri)

qtcAddDeployment()

OTHER_FILES += \

qml-ui-app.spec



And the spec file:

# no post install

#%define __os_install_post %{nil}

# no strip

#%define __strip /bin/true

# no debug package

#%define debug_package %{nil}

# disable automatic dependency processing

#AutoReqProv: no

%define app_name qml-ui-app


Name: qml-ui-app

Version: 0.0.1

Release: 1

License: <insert license tag>

Summary: <insert summary tag>

Url: <insert url tag>

Group: <insert group tag>

Source0: %{name}-%{version}.tar.gz

#BuildRequires: pkgconfig(QtCore)

BuildRequires: libqt-devel


%description

# Add here description of the package.

%prep

%setup -q

%build

# Add here commands to configure the package.

#%qmake

#qmake -makefile -nocache QMAKE_STRIP=: PREFIX=%{_prefix}

# Add here commands to compile the package.

#make %{?jobs:-j%jobs}

#make %{?_smp_mflags}

make


%install

# Add here commands to install the package.

#%qmake_install

make install INSTALL_ROOT=%{buildroot}

%files

%defattr(-,root,root,-)

/opt/%{app_name}

/opt/%{app_name}/qml/*.qml

%{_datadir}/applications/*.desktop

%{_datadir}/icons/*.png

%{_prefix}/*

Here is the file structure created in the instroot (and placed in the
package)


Here is the file structure created in the instroot (and placed in the
package)

[***@atomina instroot]$ ls -R
.:
opt usr

./opt:
qml-gui-app

./opt/qml-gui-app:
main.qml

./usr:
local share

./usr/local:
bin share

./usr/local/bin:
qml-ui-app

./usr/local/share:
qml-ui-app

./usr/local/share/qml-ui-app:
qml

./usr/local/share/qml-ui-app/qml:
qml-ui-app

./usr/local/share/qml-ui-app/qml/qml-ui-app:
main.qml

./usr/share:
applications icons

./usr/share/applications:
qml-ui-app.desktop

./usr/share/icons:
hicolor qml-ui-app.png

./usr/share/icons/hicolor:
64x64

./usr/share/icons/hicolor/64x64:
apps

./usr/share/icons/hicolor/64x64/apps:
qml-ui-app.png
--
Brain: Prepare yourself for your 15 minutes of fame
Pinky: after that, can I have 15 minutes of Macarena?

°v° Sulamita Garcia
/(_)\ http://sulamita.net/
^ ^
Christian Kandeler
14 years ago
Permalink
...
The default deployment settings are in the .pri file included from
the .pro file, overwriting your settings. Adapt the .pri file to change
the defaults (be warned, though: it looks messy). Note that you do not
need the manual INSTALLS stuff; that's exactly what the .pri file is
for.


Christian
Ville M. Vainio
14 years ago
Permalink
This may be of interest to you:

http://vivainio.github.com/vvdocprj/
...
Sulamita Garcia
14 years ago
Permalink
Excellent, thank you all!
...
--
Brain: Prepare yourself for your 15 minutes of fame
Pinky: after that, can I have 15 minutes of Macarena?

°v° Sulamita Garcia
/(_)\ http://sulamita.net/
^ ^
Loading...