Active Topics

 


Reply
Thread Tools
Posts: 145 | Thanked: 304 times | Joined on Jan 2010 @ Milton Keynes, UK
#1
Hi All,

I've just finished my first game and want to "release" it, but how?

I've read some of the information on debian packages etc but they seem to be overkill for what I need. for example http://wiki.maemo.org/Documentation/...ebian_Packages

The instructions for creating a package are actually twice as long as my source code

I have a simple app written in C, its made up of one binary and one png file for gfx.

Is there no simpler way to do this?

Cheers
Jamie
 
Tomaszd's Avatar
Posts: 284 | Thanked: 498 times | Joined on Jun 2009 @ Poland
#2
Making a simple debian package really isn't that difficult. I can't program for ****, yet I'm able to package things up. How is a reverse situation even possible?
__________________
Do you like Extra Decoders Support? Consider donating to support the project.
 

The Following User Says Thank You to Tomaszd For This Useful Post:
Posts: 540 | Thanked: 288 times | Joined on Sep 2009
#3
Originally Posted by jamiefuller View Post
Is there no simpler way to do this?
Sorry, the only way to get the the application installable via the application manager is to make debian package out of it.

Of course you could just release a tarball hosted "somewhere" and hope people bother with extracting it and running the program via terminal (or copying the .desktop etc files to correct places)

Also as stated the helper scripts make the packaging rather simple, just follow the instructions.
 

The Following User Says Thank You to rambo For This Useful Post:
Posts: 145 | Thanked: 304 times | Joined on Jan 2010 @ Milton Keynes, UK
#4
LOL, may seem strange but I come from a large programming background, but zero linux. and its all very strange

Perhaps you can detail how to do it?, I will be releasing my source code to help any programmers along.

Cheers
 
Tomaszd's Avatar
Posts: 284 | Thanked: 498 times | Joined on Jun 2009 @ Poland
#5
I would suggest getting MADDE and getting to know how it's done there, maybe it's a bit clearer.
__________________
Do you like Extra Decoders Support? Consider donating to support the project.
 

The Following User Says Thank You to Tomaszd For This Useful Post:
Posts: 1,208 | Thanked: 1,028 times | Joined on Oct 2007
#6
Originally Posted by jamiefuller View Post
LOL, may seem strange but I come from a large programming background, but zero linux. and its all very strange

Perhaps you can detail how to do it?, I will be releasing my source code to help any programmers along.

Cheers
You had the link for acceptable documentation with details. Here's another document to look things up http://www.debian.org/doc/maint-guide/

In short run dh_make, edit debian/rules to make your program compile/install, edit debian/control for build dependencies and other details, build with dpkg-buildpackage
 

The Following User Says Thank You to mikkov For This Useful Post:
Posts: 145 | Thanked: 304 times | Joined on Jan 2010 @ Milton Keynes, UK
#7
grrrr...

Well I've spent the best part of my night trying to make sense of this but am failing miserably.

i've ran dh_make, i've changed my debian/control file (added icon etc)

I just cannot get it to compile my app in the debian/rules, my app was quite simple so didn't have a make file, so I created a simple makefile for the packager to use

so now it compiles my app but doesn't install it(add it to the deb file). its trying to run the makefile with the install target but what am I supposed to put in there? I presume some kind of copy command, but to where?

It looks like the rules file passes DESTDIR variable to "make" but how do implement that?

Please, any help?
 
Posts: 62 | Thanked: 97 times | Joined on Dec 2009 @ Finland, Kerava
#8
Originally Posted by jamiefuller View Post
grrrr...

Well I've spent the best part of my night trying to make sense of this but am failing miserably.

i've ran dh_make, i've changed my debian/control file (added icon etc)

I just cannot get it to compile my app in the debian/rules, my app was quite simple so didn't have a make file, so I created a simple makefile for the packager to use

so now it compiles my app but doesn't install it(add it to the deb file). its trying to run the makefile with the install target but what am I supposed to put in there? I presume some kind of copy command, but to where?

It looks like the rules file passes DESTDIR variable to "make" but how do implement that?

Please, any help?
Please send more detailed information that we can help. Output of failed build might be helpful.

About DESTDIR case. You need 'install' target in you Makefile that uses DESTDIR. There is one example.

Code:
install: 
       mkdir -p $(DESTDIR)/usr/bin
       cp you_program $(DESTDIR)/usr/bin
 
Posts: 145 | Thanked: 304 times | Joined on Jan 2010 @ Milton Keynes, UK
#9
Thanks Rontti,

sorry my message didn't have more detail, I wrote it at 1am after 5 hours of trying and was too tired to make much sense

anyway, you're example for the makefile is brilliant and makes sense but the created .deb file still doesn't contain the binary.

Thanks again, and thanks in advance if you can help me out a bit more.

here is my makefile

Code:
all:
	gcc -g -Wall `sdl-config --cflags` `sdl-config --libs` -L /usr/include/SDL -lSDL_image delite.c -o de-lite

install:
	mkdir -p $(DESTDIR)/usr/bin
	cp de-lite $(DESTDIR)/usr/bin

and here is the results of the dpkg-package are:
Code:
dpkg-buildpackage: source package is de-lite
dpkg-buildpackage: source version is 1.0.0-1
dpkg-buildpackage: source changed by Jamie Fuller <me@jamiefuller.com>
dpkg-buildpackage: host architecture armel
dpkg-buildpackage: source version without epoch 1.0.0-1
: Using Scratchbox tools to satisfy builddeps
 fakeroot debian/rules clean
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
# Add here commands to clean up after the build process.
/scratchbox/tools/bin/make clean
make[1]: Entering directory `/home/jamie/de-lite-1.0.0'
make[1]: *** No rule to make target `clean'.  Stop.
make[1]: Leaving directory `/home/jamie/de-lite-1.0.0'
make: [clean] Error 2 (ignored)
dh_clean 
 dpkg-source -b de-lite-1.0.0
dpkg-source: building de-lite in de-lite_1.0.0-1.tar.gz
dpkg-source: building de-lite in de-lite_1.0.0-1.dsc
 debian/rules build
dh_testdir
# Add here commands to configure the package.
touch configure-stamp
dh_testdir
# Add here commands to compile the package.
dh_installdirs
##gcc -g -Wall `sdl-config --cflags` `sdl-config --libs` -L /usr/include/SDL -lSDL_image delite.c -o de-lite
/scratchbox/tools/bin/make
make[1]: Entering directory `/home/jamie/de-lite-1.0.0'
gcc -g -Wall `sdl-config --cflags` `sdl-config --libs` -L /usr/include/SDL -lSDL_image delite.c -o de-lite
delite.c: In function 'main':
delite.c:135: warning: implicit declaration of function 'IMG_Load'
delite.c:135: warning: assignment makes pointer from integer without a cast
make[1]: Leaving directory `/home/jamie/de-lite-1.0.0'
#docbook-to-man debian/de-lite.sgml > de-lite.1
touch build-stamp
 fakeroot debian/rules binary
dh_testdir
dh_testroot
dh_clean -k 
dh_installdirs
# Add here commands to install the package into debian/de-lite.
/scratchbox/tools/bin/make DESTDIR=/home/jamie/de-lite-1.0.0/debian/de-lite install
make[1]: Entering directory `/home/jamie/de-lite-1.0.0'
mkdir -p /home/jamie/de-lite-1.0.0/debian/de-lite/usr/bin
cp de-lite /home/jamie/de-lite-1.0.0/debian/de-lite/usr/bin
make[1]: Leaving directory `/home/jamie/de-lite-1.0.0'
dh_testdir
dh_testroot
dh_installchangelogs 
dh_installdocs
dh_installexamples
dh_installman
dh_link
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dpkg-gencontrol: warning: unknown substitution variable ${misc:Depends}
dh_md5sums
dh_builddeb
warning, `debian/de-lite/DEBIAN/control' contains user-defined field `Maemo-Icon-26'
dpkg-deb: building package `de-lite' in `../de-lite_1.0.0-1_armel.deb'.
dpkg-deb: ignoring 1 warnings about the control file(s)
 dpkg-genchanges
dpkg-genchanges: warning: unknown information field `Xb-Maemo-Icon-26' in input data in package's section of control info file
dpkg-genchanges: including full source code in upload
dpkg-buildpackage: full upload; Debian-native package (full source is included)
 
Posts: 62 | Thanked: 97 times | Joined on Dec 2009 @ Finland, Kerava
#10
You also need clean target.

Code:
all:
	gcc -g -Wall `sdl-config --cflags` `sdl-config --libs` -L /usr/include/SDL -lSDL_image delite.c -o de-lite

install:
	mkdir -p $(DESTDIR)/usr/bin
	cp de-lite $(DESTDIR)/usr/bin

clean:
       -rm de-lite
Note the '-' prefix for rm. Otherwise failure is returned when you have nothing to remove.
 

The Following User Says Thank You to rontti For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 06:21.