View Single Post
ZogG's Avatar
Posts: 1,389 | Thanked: 1,857 times | Joined on Feb 2010 @ Israel
#75
As i promised.

Qt Creator and OBS:

In order to build project for COBSQt Creator and OBSfor example to push it to apps4meego) and still to be able to continue to work with QtCreator you need to make few simple steps i would show in this post. I don't update wiki, as i think i might have problems with grammar and self explanation, so i hope it would be used to update current wiki. As well current wiki is still useful and I just add few aspects and update some info from there, so i suggest to use it along with this howto.

The files to change below are from "/qtc_packaging/debian_harmattan" inside project dir

1) Go to your rule file and change those lines:
#qmake -> ##OBS qmake \\ In my example i use ##OBS qmake -recursive, i think it's related to that i use subdirs as project.
#$(MAKE) -> ##OBS $(MAKE)
#dh_shlibdeps -> ##OBS dh_shlibdeps

as well if there is any comment followed in any of those lines, delete it. and it's important to keep all line starts with "tab" and not with "8 spaces"(in our example those we changed start with ##OBS), otherwise you'll get error.

for aegis matter you need to add those lines after dh_builddeb (change <package> to your app name)
##OBS aegis-deb-add -control debian/<package>/DEBIAN/control .. debian/manifest.aegis=_aegis (as well with "tab" at the beginning)

Here is an example of mine rule file — https://github.com/funkycode/imgrup/...armattan/rules


2)Now go to your main .pro file and add .desktop file to be installed: in my example it looks like:

desktop.files = imgrup_harmattan.desktop
desktop.path = /usr/share/applications
INSTALLS += desktop


(the path is shown for harmattan, for maemo the path would be different)

3)The last thing before packaging and submitting is to fix the deps, for that we go to the control file and add deps we need, i'm not good at this, but i think rzr and few members can help you on that, those are packages installed on OBS when building the app, and AFAIK you still need deps in .pro file. i'll provide example as part of mine:

.....
Build-Depends: debhelper (>= 8.0.0), libqt4-dev, pkg-config,
libshare-ui-dev,libqt4-declarative-dev,
libqtm-multimedia-dev, libqt4-multimedia, libaccounts-qt-dev, libsignon-qt-dev,
libsignon-glib-dev, signon-plugins-dev, signond-dev, libaccountplugin-dev, libaccountsetup-dev,
libnaccounts-ui-dev, libmeegotouch-dev, applauncherd-dev, maemo-meegotouch-interfaces-dev,
libmdatauri-dev, aegis-builder
Standards-Version: 3.9.2

....


(you need to keep format of file right, i'm talking about new lines, spaces and blank lines. So read the output if you have an error)

3.1)Before building you as well can use postinst file to make post install script file =)

4)After that is ready, we would use phako''s (thanks man) script to package:
https://github.com/funkycode/imgrup/...ate-obs-source

which actually use our(QtCreator's) qtc_packaging/debian_harmattan directory with files we just modified and copy it to debian dir, it uncoomments in rule all lines with "##OBS ", build and than delete the dir. The files would be in the parent dir out of project (.tar.gz and .dsc), while script should be run in project dir. Btw you may need to change "SDK_DIR=" as mine set to where it's on my comp, it the directory to QtSDK.

5)
After that we go to obs and we create new repo:
a)Repositories
b)Add repo
c)use the link " pick one via advanced interface." in the top
d)In the "Project" field paste "MeeGo:1.2:Harmattan"


Than build your project there (webupload is not nice as it's trying to build even if one file changed(and your upload change the file), and you can upload only one by one, though with ocs you can update and upload few, the basics covered on wiki and it's similar to git in some way). Add both files made by script icon.png and few screen-shots as well.


After you successfully built the project, you should go to your repo an check the file from there and only if it works (i suggest deleting app from phone and re-installing from there, as i submitted first time broken app, coz of not checking it).

After it's all working — you have green light to submit to testing as described at wiki and than it would take some time, as it takes time till bot decides to build and he rebuilds few times, till it get to apps4meego and database of client is re download. So if you built in your repo and submited after, don't worry it should be okay, just give so time(btw you may get email from bot, that it's built and everything ok)


Any feedback and edits are welcome.

Last edited by ZogG; 2012-06-25 at 14:54.
 

The Following 6 Users Say Thank You to ZogG For This Useful Post: