Author Topic: Creating a Linux Package from a Code::Blocks project  (Read 3434 times)

Offline Halan

  • Multiple posting newcomer
  • *
  • Posts: 43
Creating a Linux Package from a Code::Blocks project
« on: January 28, 2009, 04:15:44 pm »
Hey,

I am developing a shared library using Code::Blocks. It is open-source (zlib) and I would like to pack it in order to get it into distros like Ubuntu. Here is the link to it.

However normally you use makefiles to create those packages. I read somewhere on the forums somebody was about to create a plugin for this but it would be enough to create a makefile with Code::Blocks. Or is there another way?

greetings,
Halan

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Creating a Linux Package from a Code::Blocks project
« Reply #1 on: January 28, 2009, 04:30:38 pm »
Still no plugin, but you can use C::B instead of makefiles, if you want to create .debs.
Here is a link to thread with a tesproject: http://forums.codeblocks.org/index.php/topic,9763.0.html.

You need wxwidgets-dev packages to create the example-package.

Or do a forum search for cbMakefileGen, this might also work for you to create a makefile.

Offline Halan

  • Multiple posting newcomer
  • *
  • Posts: 43
Re: Creating a Linux Package from a Code::Blocks project
« Reply #2 on: January 28, 2009, 05:00:48 pm »
thanks for your quick reply.

I didnt think of putting codelbocks directly into the rules-script. thanks for the hint.
But then again shouldnt it be easy to write a plugin for this?

However when trying to compile my project i got somethig like
Quote
Error: Unable to initialize gtk, is DISPLAY set properly?
make: *** [clean] Error 255

greetings,
Halan

btw: i filed a bug against your repository hope they will include your packages in upstream ubuntu

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Creating a Linux Package from a Code::Blocks project
« Reply #3 on: January 28, 2009, 05:26:38 pm »
But then again shouldnt it be easy to write a plugin for this?
Yes and no, for such a simple testapp it's quite easy, for a more complex app like C::B it's much more work and will most likely need some manual tweaking.
As I wrote in the other thread, I do not have much time at the moment.

However when trying to compile my project i got somethig like
Quote
Error: Unable to initialize gtk, is DISPLAY set properly?
make: *** [clean] Error 255
Do you try to compile it as root or from a virtual terminal (not a console inside X) ?
C::B is a gui-app, even in batch-mode.
And if you want to compile it as root you have to run
Code
xhost  +
before, to make your X-session available for other users (ven root is not allowed to use it otherwise).

Offline Halan

  • Multiple posting newcomer
  • *
  • Posts: 43
Re: Creating a Linux Package from a Code::Blocks project
« Reply #4 on: January 28, 2009, 10:26:50 pm »
i am running it in a console inside gnome/X. But still it doesnt work even with your xhost +...