Author Topic: How to distribute a final product  (Read 6045 times)

Offline zarnick

  • Single posting newcomer
  • *
  • Posts: 6
How to distribute a final product
« on: July 07, 2009, 09:01:36 pm »
Hello, I would like to know how you guys set up Code::Blocks for distributing a finished product. What I'm interested is giving people a binary with all libs it depends in it (or maybe even just select a few libs), how you guys make this?
The project itself is an Ogre project, and I really don't think the user would like to have to install Ogre just to see this project...

Thank you.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6024
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: How to distribute a final product
« Reply #1 on: July 08, 2009, 04:16:58 am »
what does "an Ogre project" means?
Do you want to distribute Code::Blocks? or the build project from C::B?
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline dje

  • Lives here!
  • ****
  • Posts: 683
Re: How to distribute a final product
« Reply #2 on: July 08, 2009, 11:01:43 am »
I think the purpose of this thread is "how to make a setup".
If I'm right, Just look on generic download sites but this is completely out of C::B forums scope.

Dje

Offline zarnick

  • Single posting newcomer
  • *
  • Posts: 6
Re: How to distribute a final product
« Reply #3 on: July 08, 2009, 12:59:30 pm »
Actually is not the setup for Ogre I wanna now, is the lib linking, for instance, if I build a project that relies on libX, and want to distribute that project, I would have to distribute libX as well, I want however to put this in the binary file, so I have only one file to distribute, and not a file and all its libs ;)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6024
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: How to distribute a final product
« Reply #4 on: July 08, 2009, 01:19:12 pm »
Actually this is not a C::B relate question. :(
One way, use a static linkage.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline zarnick

  • Single posting newcomer
  • *
  • Posts: 6
Re: How to distribute a final product
« Reply #5 on: July 08, 2009, 02:23:32 pm »
Ok, but how do I use static linkage on C:B?

Offline Sunsawe

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: How to distribute a final product
« Reply #6 on: July 17, 2009, 10:14:28 pm »
I guess you just have to use static librairies.
So you link your project to lib*.a files and not to lib*.so

Offline zarnick

  • Single posting newcomer
  • *
  • Posts: 6
Re: How to distribute a final product
« Reply #7 on: July 21, 2009, 12:47:35 am »
Hum, I'll try this as soon as possible, and what about on Windows?