PDA

View Full Version : Post-development steps


Berserk
2010-08-23, 19:59
EDIT:
Hmm.. 56 views and no replies, I think I'm asking too much :D
I've just sent the upload request with the package name 'imagesetmaker', I took a look at other apps and figured that out, sorry for asking..

Maybe I'm just worrying too much, It'll probably be easier than I think.


For reference, the original post is here:
Hi,

I just finished developing a well-featured stable version of my first Qt/C++ app "Image Set Maker" and I'd like to upload it to Extras-Devel, but I have too much questions before I can do that.. :(
Thanks to anyone who can brighten up my knowledge about the following:

- Upload requesting (https://garage.maemo.org/extras-assistant/index.php?target=invitation_request)
I have a Maemo.org account :D
I need to fill in a package name.. is that the full app name ("Image Set Maker"), or something like "imagesetmaker_0.1_armel.deb"?

- Version numbers
When testing with Nokia Qt SDK, it always transfers "imagesetmaker_0.1_armel.deb" to my N900, can I set version numbers with maemo.org?

- Autobuilder instructions (http://extras-cauldron.garage.maemo.org/HOWTO.html)
I have close to zero knowledge about Linux commands.. I really appreciate the help given on the instruction page, but unfortunately, I can't make much sense of it :(

- Which files should I upload?
.pro, .cpp and .h files? And/or .o files, or anythins else?

Maybe a lot of this is made clear and easy with the Extras Assistant mentioned on this page (http://wiki.maemo.org/Uploading_to_Extras)... ?

I suppose that... when I am allowed to upload and and being given a package page, I can setup a bugtacker, track downloads, see test/vote when it's gotten to Extras-Testing etc.?

- Licencing
Basically I'm looking for a licence that says "Use it at no cost, spread it, read (and learn from?) the freely available source code.. but I'm the author and copyright holder. Please give credit, don't say you made the app, because I did."


I'm starting to think I missed something, since there are so many apps in Extras(-Devel, -Testing), and I haven't found a topic that covers these questions..
Please go easy on the "RTFM" remarks :D
Thanks!

kif
2010-08-24, 10:54
Hi Berserk

> - Version numbers

I too have this problem, and have asked in the qt development forum.

I have gotten some answers that may solve the problem, but it requires some testing before I know if it is a solution.

I'll let you know the result.

Kim

DeargDoom
2010-08-24, 11:05
> - Version numbers

I too have this problem, and have asked in the qt development forum.

I have gotten some answers that may solve the problem, but it requires some testing before I know if it is a solution.


I am very far from being an expert but following the wiki instructions (http://wiki.maemo.org/Packaging_a_Qt_application) works for me.

Berserk
2010-08-25, 16:24
Well.. I finally got it to upload, thanks to the wiki's :D

But now the autobuild fails.. I copied the rules contents from the Packaging a Qt application (http://wiki.maemo.org/Packaging_a_Qt_application) page, but I'm not sure how to edit the rules file.
I think I have to replace "(APPNAME)", "(CURDIR)" and "(MAKE)"? I did anyway, except the "(MAKE)", I don't know what that needs to be. Don't know if replacing is good or not either..

At the top of the rules file, it says
#!/usr/bin/make -f
APPNAME := my_app_name
When I put "APPNAME := imagesetmaker" there, will every APPNAME be replaced? I don't get it..
I really feel stupid for not understanding the rules file :D




I just noticed/read that "libqt4-dev" needs to be added, so this line is now in my control file:
(Didn't have "libqt4-dev" before this post)
Build-Depends: debhelper (>= 5), autotools-dev, libhildon1 (>= 2.2), libqt4-dev

Berserk
2010-08-25, 16:40
It seems to me that things like $(CURDIR) are some sort of system variables that don't need to be specified by the developer.. I'm just not sure :D

DeargDoom
2010-08-26, 00:27
Well.. I finally got it to upload, thanks to the wiki's :D

But now the autobuild fails.. I copied the rules contents from the Packaging a Qt application (http://wiki.maemo.org/Packaging_a_Qt_application) page, but I'm not sure how to edit the rules file.

If I were you I would try and package it yourself and test installing it on your own device before uploading it to extras-devel. From your post I dont think you have done this yet.

Speaking for myself I found it quite helpful to use the qt-maemo-example package. Once you have that correctly building a package you can use it as a reference to see where you might be going wrong with your own packaging.

Berserk
2010-08-26, 23:23
Thanks for pointing me in the right direction!
I've tried numerous times now.. and I think it's almost working now.
So far I've had *empty* .deb's showing up, only the bin and doc dir had files in it, no icons, .desktop or .service files..

After I've prepared the folders/sources and ran "mad dh_make", I edited the files inside the debian folder, then I ran "mad qmake", and right after that I ran the "mad dpkg-buildpackage -sa" command.

The problem is.. the files that should go into debian/<appname> show up somewhere else.
(I use WinXP with Nokia Qt SDK, both installed on E: )

My source files are in
E:\QtPrograms\... etc.

While building, the necessary files go into
E:\e\QtPrograms\... etc.


I know Linux doesn't work with drive letters, but how can I fix this? :P
EDIT: I could probably (?) put those folders in the .deb with an archiver, but that's not the way it should go, I think.

fcrochik
2010-08-26, 23:36
Thanks for pointing me in the right direction!
I've tried numerous times now.. and I think it's almost working now.
So far I've had *empty* .deb's showing up, only the bin and doc dir had files in it, no icons, .desktop or .service files..

After I've prepared the folders/sources and ran "mad dh_make", I edited the files inside the debian folder, then I ran "mad qmake", and right after that I ran the "mad dpkg-buildpackage -sa" command.

The problem is.. the files that should go into debian/<appname> show up somewhere else.
(I use WinXP with Nokia Qt SDK, both installed on E: )

My source files are in
E:\QtPrograms\... etc.

While building, the necessary files go into
E:\e\QtPrograms\... etc.


I know Linux doesn't work with drive letters, but how can I fix this? :P
EDIT: I could probably (?) put those folders in the .deb with an archiver, but that's not the way it should go, I think.

I develop on the Nokia SDK but create my packages on scratchbox.

I have never tried to create a package using Mad but a common problem for me on scratchbox is that qmake adds the "absolute paths" to the Makefile. I always have to edit by hand the Makefile before creating the package in order for the autobuilder to work.

Just an idea ... if you think this maybe the case post your Makefile.

Felipe

Berserk
2010-08-26, 23:41
Thanks! I'll try it, and post the Makefile in case it screws up..

In the meantime I've gotten the idea of replacing
INSTALL_ROOT=$(CURDIR)/debian/$(APPNAME) install
with
INSTALL_ROOT=debian/$(APPNAME) install
in debian/rules

Since CURDIR probably starts with /e/

EDIT: hmm.. I'd better not, I don't know where it will end up then :D

EDIT2:
INSTALL_ROOT=E:\QtPrograms\ImageSetMaker\0.1.2\ima gesetmaker-0.1.2/debian/$(APPNAME) install
Gave a build error: "e:e:" not found

INSTALL_ROOT=QtPrograms\ImageSetMaker\0.1.2\images etmaker-0.1.2/debian/$(APPNAME) install
Partially worked, it put that whole path in the .deb package :D but with the needed folders/files! (DEBIAN, qtprograms and usr folders)
Also, "dh_shlibdebs" took quite long in the process.

INSTALL_ROOT=debian/$(APPNAME) install
Made E:\debian (wrong again)

EDIT3:
INSTALL_ROOT=$(APPNAME) install
Made E:\imagesetmaker

I'll post my Makefile then :D

Berserk
2010-08-27, 00:12
Here's my Makefile (first half of it)
It does seem to recognise E:\
Could you help me with this one?

################################################## ###########################
# Makefile for building: imagesetmaker
# Generated by qmake (2.01a) (Qt 4.6.2) on: vr 27. aug 02:08:55 2010
# Project: imagesetmaker.pro
# Template: subdirs
# Command: e:/NokiaQtSDK/Maemo/4.6.2/targets/fremantle-1030/bin/qmake.exe -unix -o Makefile imagesetmaker.pro
################################################## ###########################

first: make_default
MAKEFILE = Makefile
QMAKE = e:/NokiaQtSDK/Maemo/4.6.2/targets/fremantle-1030/bin/qmake.exe
DEL_FILE = rm -f
CHK_DIR_EXISTS= test -d
MKDIR = mkdir -p
COPY = cp -f
COPY_FILE = $(COPY)
COPY_DIR = $(COPY) -r
INSTALL_FILE = install -m 644 -p
INSTALL_PROGRAM = install -m 755 -p
INSTALL_DIR = $(COPY_DIR)
DEL_FILE = rm -f
SYMLINK = ln -f -s
DEL_DIR = rmdir
MOVE = mv -f
CHK_DIR_EXISTS= test -d
MKDIR = mkdir -p
SUBTARGETS = \
sub-src

src/$(MAKEFILE):
@$(CHK_DIR_EXISTS) src/ || $(MKDIR) src/
cd src/ && $(QMAKE) e:/qtprograms/imagesetmaker/0.1.2/imagesetmaker-0.1.2/src/src.pro -unix -o $(MAKEFILE)
sub-src-qmake_all: FORCE
@$(CHK_DIR_EXISTS) src/ || $(MKDIR) src/
cd src/ && $(QMAKE) e:/qtprograms/imagesetmaker/0.1.2/imagesetmaker-0.1.2/src/src.pro -unix -o $(MAKEFILE)
sub-src: src/$(MAKEFILE) FORCE
cd src/ && $(MAKE) -f $(MAKEFILE)
sub-src-make_default: src/$(MAKEFILE) FORCE
cd src/ && $(MAKE) -f $(MAKEFILE)
sub-src-make_first: src/$(MAKEFILE) FORCE
cd src/ && $(MAKE) -f $(MAKEFILE) first
sub-src-all: src/$(MAKEFILE) FORCE
cd src/ && $(MAKE) -f $(MAKEFILE) all
sub-src-clean: src/$(MAKEFILE) FORCE
cd src/ && $(MAKE) -f $(MAKEFILE) clean
sub-src-distclean: src/$(MAKEFILE) FORCE
cd src/ && $(MAKE) -f $(MAKEFILE) distclean
sub-src-install_subtargets: src/$(MAKEFILE) FORCE
cd src/ && $(MAKE) -f $(MAKEFILE) install
sub-src-uninstall_subtargets: src/$(MAKEFILE) FORCE
cd src/ && $(MAKE) -f $(MAKEFILE) uninstall

(There's some more here.. .prf files and stuff
If needed, I'll paste the remaining contents too

fcrochik
2010-08-27, 00:34
Here's my Makefile (first half of it)
It does seem to recognise E:\
Could you help me with this one?

################################################## ###########################
# Makefile for building: imagesetmaker
# Generated by qmake (2.01a) (Qt 4.6.2) on: vr 27. aug 02:08:55 2010
# Project: imagesetmaker.pro
# Template: subdirs
# Command: e:/NokiaQtSDK/Maemo/4.6.2/targets/fremantle-1030/bin/qmake.exe -unix -o Makefile imagesetmaker.pro
################################################## ###########################

first: make_default
MAKEFILE = Makefile
QMAKE = e:/NokiaQtSDK/Maemo/4.6.2/targets/fremantle-1030/bin/qmake.exe
DEL_FILE = rm -f
CHK_DIR_EXISTS= test -d
MKDIR = mkdir -p
COPY = cp -f
COPY_FILE = $(COPY)
COPY_DIR = $(COPY) -r
INSTALL_FILE = install -m 644 -p
INSTALL_PROGRAM = install -m 755 -p
INSTALL_DIR = $(COPY_DIR)
DEL_FILE = rm -f
SYMLINK = ln -f -s
DEL_DIR = rmdir
MOVE = mv -f
CHK_DIR_EXISTS= test -d
MKDIR = mkdir -p
SUBTARGETS = \
sub-src

src/$(MAKEFILE):
@$(CHK_DIR_EXISTS) src/ || $(MKDIR) src/
cd src/ && $(QMAKE) e:/qtprograms/imagesetmaker/0.1.2/imagesetmaker-0.1.2/src/src.pro -unix -o $(MAKEFILE)
sub-src-qmake_all: FORCE
@$(CHK_DIR_EXISTS) src/ || $(MKDIR) src/
cd src/ && $(QMAKE) e:/qtprograms/imagesetmaker/0.1.2/imagesetmaker-0.1.2/src/src.pro -unix -o $(MAKEFILE)
sub-src: src/$(MAKEFILE) FORCE
cd src/ && $(MAKE) -f $(MAKEFILE)
sub-src-make_default: src/$(MAKEFILE) FORCE
cd src/ && $(MAKE) -f $(MAKEFILE)
sub-src-make_first: src/$(MAKEFILE) FORCE
cd src/ && $(MAKE) -f $(MAKEFILE) first
sub-src-all: src/$(MAKEFILE) FORCE
cd src/ && $(MAKE) -f $(MAKEFILE) all
sub-src-clean: src/$(MAKEFILE) FORCE
cd src/ && $(MAKE) -f $(MAKEFILE) clean
sub-src-distclean: src/$(MAKEFILE) FORCE
cd src/ && $(MAKE) -f $(MAKEFILE) distclean
sub-src-install_subtargets: src/$(MAKEFILE) FORCE
cd src/ && $(MAKE) -f $(MAKEFILE) install
sub-src-uninstall_subtargets: src/$(MAKEFILE) FORCE
cd src/ && $(MAKE) -f $(MAKEFILE) uninstall

(There's some more here.. .prf files and stuff
If needed, I'll paste the remaining contents too

Anything on the Makefile that points to an absolute path on "your machine" will not work on the autobuilder. A good hint is any path that starts with the drive letter or with the "absolute path to your source code". You need will to replace all the paths with paths relative to the root folder of the source and "absolute paths" for everything that is not your code (/usr/include/... , /usr/lib, ...).

There must be a way to get it right with MADDE but I just don't know how. I have a linux box with scratchbox and create all my packages there.

Berserk
2010-08-27, 01:00
Thanks, and for this I moved the root folder (appname-version) to E:\NokiaQtSDK\Maemo\home\<user>

Replaced
e:/NokiaQtSDK/Maemo/
with
../../../

And
e:/NokiaQtSDK/Maemo/home/<user>/imagesetmaker-0.1.2/
with
$(CURDIR)

But it still has the E:\e\ problem :P many thanks for your help so far!
I need to get some sleep now..

Tomorrow I'll be gone all day, but maybe I can read replies via Gprs, if there will be any :P
Thanks so far!

fcrochik
2010-08-27, 20:07
Hopefully you figured out by now... but just in case, I found this link:
http://wiki.maemo.org/MADDE/Packaging

I didn't try and didn't see anything that sounds like the solution but maybe they made so simple that you don't need to worry about the Makefile.

Berserk
2010-08-28, 00:04
Thanks again ;)
Sorry for the late response..
I must say that I've read that page quite a lot of times, along with the other packaging pages, but thanks all the same ;)


I started trying again about 2 hours ago, and now I've got it working locally!
Also, there is a fair chance that it will be allright with the autobuilder, since I didn't find a Makefile in the .orig.tar.gz file, autobuilder is going to make it's own Makefile, which applies it's own paths.

The problem was in src/src.pro, first it had
isEmpty(PREFIX) {
PREFIX = /usr
}As specified on the Packaging a Qt application page (http://wiki.maemo.org/Packaging_a_Qt_application)

But after taking a close look in the dpkg-buildpackage output, I saw "PREFIX = E:\NokiaQtSDK\Maemo\4.6.2", which is the dir that holds madde.bat. So logically "isEmpty(PREFIX)" returned false, and the PREFIX was not changed into "/usr".

I changed the entry in src/src.pro into
PREFIX = /usrAfter that, the E:\e\ problem was gone, I'm not exactly sure why, but it was. And because of the right PREFIX, the dir structure in the .deb was right :D

Thanks everybody, I owe you one :D

EDIT: by the way, I didn't use "mad qmake"