Active Topics

 


Reply
Thread Tools
Marcus's Avatar
Posts: 173 | Thanked: 72 times | Joined on Mar 2010 @ Denmark
#1
Hey.

I am trying to port this little SDL application, but I'm kind of clueless regarding the prog.pro file, when packaging the application.
I have created a "simple" template using MADDE, but how do I tell make that it needs the SDL libraries?

Code:
TARGET      = fixedratepigs
HEADERS     +=  engine.h dirty.h
SOURCES     +=  pig.c engine.c dirty.c
FORMS       += 
LEXSOURCES  += #LEXS#
YACCSOURCES += #YACCS#

INCLUDEPATH +=
LIBS        +=
DEFINES     +=

# All generated files goes same directory
OBJECTS_DIR = build
MOC_DIR     = build
UI_DIR      = build

DESTDIR     = build
TEMPLATE    = app
DEPENDPATH  +=
VPATH       += src uis
CONFIG      -= qt
CONFIG      += debug
#QTMODULES#

INSTALLS    += target
target.path  = /usr/bin/

#
# Targets for debian source and binary package creation
#
debian-src.commands = dpkg-buildpackage -S -r -us -uc -d
debian-bin.commands = dpkg-buildpackage -b -r -uc -d
debian-all.depends = debian-src debian-bin

#
# Clean all but Makefile
#
compiler_clean.commands = -$(DEL_FILE) $(TARGET)

QMAKE_EXTRA_TARGETS += debian-all debian-src debian-bin compiler_clean
 
Marcus's Avatar
Posts: 173 | Thanked: 72 times | Joined on Mar 2010 @ Denmark
#2
Okay, so I fixed this by putting "-lSDL -lSDL_image" in LIBS.
But I got another question: Where should I put the image files, that the binary reads from? It reads some images, and shows them on the SDL screen.
 
Posts: 432 | Thanked: 645 times | Joined on Mar 2009
#3
Hi,

Originally Posted by Marcus View Post
Okay, so I fixed this by putting "-lSDL -lSDL_image" in LIBS.
But I got another question: Where should I put the image files, that the binary reads from? It reads some images, and shows them on the SDL screen.
there is another thread here in the forum and on the mailing list about optification. It might apply to your question as well.

Daniel
 
Marcus's Avatar
Posts: 173 | Thanked: 72 times | Joined on Mar 2010 @ Denmark
#4
But if you have the binary in /opt, X-Term will not recognize it, will it?

EDIT:
I guess I can just create a .sh file in /usr/bin for doing so?

Last edited by Marcus; 2010-06-10 at 14:02.
 
Posts: 432 | Thanked: 645 times | Joined on Mar 2009
#5
You can add a line to create a softlink in the postinst like:

Code:
ln -s /opt/.../<executable-binary> /usr/bin/<executable-binary>
Daniel
 
Marcus's Avatar
Posts: 173 | Thanked: 72 times | Joined on Mar 2010 @ Denmark
#6
I see. I do have a little problem though:
Whenever I manually add my image files (.PNG) to /debian/APPNAME/opt/APPNAME/
they are instantly removed again when packaging using "mad dpkg-buildpackage"
 
Posts: 726 | Thanked: 345 times | Joined on Apr 2010 @ Sweden
#7
Originally Posted by danielwilms View Post
You can add a line to create a softlink in the postinst like:

Code:
ln -s /opt/.../<executable-binary> /usr/bin/<executable-binary>
Daniel
Or include the link in the staging directory and it will be included in the package.

Using the postinst script is, in my view, the less good alternative.
 

The Following User Says Thank You to Joorin For This Useful Post:
Posts: 432 | Thanked: 645 times | Joined on Mar 2009
#8
Originally Posted by Joorin View Post
Or include the link in the staging directory and it will be included in the package.

Using the postinst script is, in my view, the less good alternative.
Agreed. Just thought it would be the quickest way.

Daniel
 
Reply


 
Forum Jump


All times are GMT. The time now is 00:20.