I’m about to finish my first big project with openframeworks. I’m going to release it soon with some documentation, video tutorials and with the source code of course. I’ve developed the app with XCode 3, using of 0.05
The way I see it is that OF projects are shared by packaging and distributing only the added source files in the src tree of the project. Someone who downloads the code should also download the OF library, modify an empty project, include all files etc. etc. (and I had to do some monkeying to actually include the OSC addons to work, so it won’t work right away I think)
My question is: Is there a better way to do that?
My project only uses the ofOSC addon. If I want to distribute a readily compilable project with XCode3, without including any sort of binaries, what should I do? This is my first Os X development project and I don’t know the internals of XCode very well.
Is there a mode in XCode where I can tell it to “save the project in a new folder by just copying the necessary files for compilation” or something like that? Will I have to include any sorts of binary files(maybe there are some within library folders) if I need to go in this route? Or is that at all a stupid idea?
I know, I can just share the project folder, but then I will have to demand people to download the xcode_fat package which is around 100mb in size to compile.
Of course this is acceptable but I was wondering if there is any better way of doing this.
I also needed to change one of the source files included in the framework to get mouse wheel working in my application. So with this way I can easily distribute with the hacked file, it will be easier.
Ok since there are no answers, I tried to make my own environment for the particular project by copying stuff around. My project does not use any type of sound/video/serial connection stuff etc so I stripped them all. I’ve also got rid of fmodex by removing it from the linker and removing the post installation script. So far the project builds and runs fine. Since I’m only using basic opengl drawing stuff and text(with freetype I guess) I also want to get rid of the freeimage library(I’m not dealing with images) so I remove it from the linking step but I get this linker error:
"_inflateEnd", referenced from:
_ft_gzip_stream_close in freetype.a(ftgzip.o)
"_inflate", referenced from:
_ft_gzip_file_fill_output in freetype.a(ftgzip.o)
"_inflateReset", referenced from:
_ft_gzip_stream_io in freetype.a(ftgzip.o)
"_inflateInit2_", referenced from:
_FT_Stream_OpenGzip in freetype.a(ftgzip.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
Build failed (4 errors, 1 warning)
It looks like they are gzip compression stuff which I definitely don’t need, but looks like freetype is looking for them. Does freetype really depend on freeimage? Is there any way for me to get rid of freeimage?
I’m a bit anal-retentive on this “clean project” thing so, wanted to ask. Any help will be greatly appreciated.
I’m sorry but why are you trying to get rid of those libraries, and how would that help you distribute your code better?
the goal of OF is that the installation of OF (0.05 linux, mac and pc) should run and operate the same, so that you really do need only to take the src folder and data folder and compile it on another machine.
If you’ve altered the OF code or an addon, include your mods and let people figure out what they want to do. modding your OF / and or altering the addons can have bad consequence for your other apps, so it’s better to extend a library, etc.
I don’t think it’s a good idea to modify OF in such a large manner as you are doing – (a) it will be hard for others on other platforms to recreate, and (b) it breaks the general idea of the library. the core of OF is really not that big - what is it that you are trying to achieve by cutting it up?
no - there isn’t. what’s the problem with having one release? if you want to alter a processing app, you’d download processing. if you wanted to alter a vvvv app, you’d need to insall vvvv, etc…
Yes I kind of understand that what I’m trying to do is basically against the motive of the OF library. But one of the reasons for me to switch to C++(after seeing the amazing work you guys have done with making OF!) was, well making things to work without depending on other development environments, other than a standard C++ compiler. So I think I prefer to use OF as a “library” included “in” my project instead of my projects working “in” the “OF environment”. It may be more or less a personal relationship with coding as the tools themselves influence me a lot too. p5, vvvv etc. are development environments and I was happy to get away from an “environment” and switch to a purer style of programming, I really don’t know if that makes any sense to others.
Anyways, also I’m not a very experienced C++ programmer and I thought maybe keeping everything with defaults was not a good thing to do. The binary file for my app is 5.3mb(UB) and the bundled libfmodex library itself is 2mb, it has nothing to do with my project, but its there in the binary program bundle. Yeah, storage is cheap, connections are fast but it didn’t feel right so I tried to change it. I tend to like keeping things “very” minimal, organised and under my control so thats the reason why I asked.
The core of OF is not that big but since I’m using an addon, I should demand people to download the fat bundle which is around 100mb and since I have an altered file(maybe that was not really necessary but I just couldn’t get it working without changing the code a bit, you can see my previous post on getting mouse wheel to work) I should also demand them to change the file in their OF folder and all this didn’t feel right.
Other than all these concerns, yes you are very right on your points. And since I’ve also asked the question to see if what I’m doing is right, I got an answer to it so I’ll try see if I can ease up about the whole thing.
The way I see it most people that would be interested in the source code already have the Fat OF release. If they are interested in coding in C++ and dont have OF they should get OF and not some incomplete version. And if they are not interested in coding in C++ then just the app should be released as a standalone along with the code in a separate download.
[edit] not trying to tell you what to do just how I see it
i think what you are trying to do is make it easy to share your application, not your code.
the people that will look at your source and try to compile it will most certainly be OF users already, even if they’re not, if they’re looking at your source and want to learn how to code they will need to download OF anyway. so all you need to share is the few source files.
if you want to put your application online for others to download then it can make sense not to include the libraries that are not being used as to keep your file as small as possible but i think you should do that separate from the sources that you will distribute.
Thanks for all the suggestions. Pelintra, yes you are probably right. I’ve also decided to build and distribute the binary in a more separate and stripped form, and share the code in the usual form. It’s not really likely that people will die to compile my app from source, as I said, sometimes I just feel anal about organising things.
And I couldn’t get rid of freeimage anyways. Can’t figure why but oh well…