There are two things I’d like to start doing with my work in the new version and from now on
seperate my work folders from the ofw example apps
keep addons in a better location
Within *\v0.03\app* I will have all the sample projects and my own work. This starts to get messy after a while (especially if I just want to backup my own projects)
What do you think to putting everything into an additional folder, such as
*\v0.03\app\examples\
\v0.03\app\work*
And then changing the relative path of links to go up an extra folder? …\
What does everyone think?
At the moment my addons go within *\v0.02\libs\openFrameworks* but it feels like this folder should be kept only for the ofw core release, making it easier to port projects to newer versions in the future and easier to upgrade addons.
For example, I have the opencv addons source files in
*\v0.02\libs\openFrameworks\computerVision*
and I have ofXML in
*\v0.02\libs\openFrameworks\utils*
How about we make the instruction for installing into these folders?
about the first, I agree – the number of folder can become unwieldy, but at the same time the deeper the structure, that harder it is to get it right. I wonder what other people think ?
one thing I’ve been thinking would be useful is a tool that could generate the .vcproj, .dev, .cbp, makefile for you (since for the most part if one is made, the difference is some minor find and replace, and to do nested folders, just getting the amount of …/…/s right. In this latest release we’ve started to use python scripts to automate the process (mirroring code, updating project files, etc) so it wouldn’t be so hard to make a small app that could help generate new OF projects.
about the addons, this is also a good sugestion. we are just about to make a major posting of addons, instructions and so on, so I am going to play around w/ it. I was actually thinking this morning, better might be:
apps/
libs/
addons/
then in addons, you could have:
addons/ofCv
addons/ofXML
or even more organized
addons/utils/ofXML
then, you would still have to get these new paths into the project (The way you normally do) but it would make it alot cleaner, so that the core libs of OF never change. what do you think?
(getting those paths in could be another part of the tool I mention above, point it to an “addon” and then to the “project” you want to make sure the addon is included in… I’m not sure how feasible it is, but if someone want to hack around in python, I’d be happy to kick around some ideas. we definitely want to make it easy to make new projects and to install / use addons)
I am trying to do step 1. I have added an extra …\ to all property paths in c++ and linker for debug and release, but when I go to build the empty app I get this error
1>------ Build started: Project: openFrameworksApp, Configuration: Release Win32 ------
1>Compiling…
1>ofSerial.cpp
1>c1xx : fatal error C1083: Cannot open source file: ‘…\libs\openframeworks\communication\ofSerial.cpp’: No such file or directory
1>ofVideoPlayer.cpp
1>c1xx : fatal error C1083: Cannot open source file: ‘…\libs\openframeworks\video\ofVideoPlayer.cpp’: No such file or directory
1>ofVideoGrabber.cpp
1>c1xx : fatal error C1083: Cannot open source file: ‘…\libs\openframeworks\video\ofVideoGrabber.cpp’: No such file or directory
1>ofQtUtils.cpp
1>c1xx : fatal error C1083: Cannot open source file: ‘…\libs\openframeworks\video\ofQtUtils.cpp’: No such file or directory
1>ofUtils.cpp
1>c1xx : fatal error C1083: Cannot open source file: ‘…\libs\openframeworks\utils\ofUtils.cpp’: No such file or directory
1>ofMath.cpp
1>c1xx : fatal error C1083: Cannot open source file: ‘…\libs\openframeworks\utils\ofMath.cpp’: No such file or directory
1>ofSoundStream.cpp
1>c1xx : fatal error C1083: Cannot open source file: ‘…\libs\openframeworks\sound\ofSoundStream.cpp’: No such file or directory
1>ofSoundPlayer.cpp
1>c1xx : fatal error C1083: Cannot open source file: ‘…\libs\openframeworks\sound\ofSoundPlayer.cpp’: No such file or directory
1>ofTrueTypeFont.cpp
1>c1xx : fatal error C1083: Cannot open source file: ‘…\libs\openframeworks\graphics\ofTrueTypeFont.cpp’: No such file or directory
1>ofTexture.cpp
1>c1xx : fatal error C1083: Cannot open source file: ‘…\libs\openframeworks\graphics\ofTexture.cpp’: No such file or directory
1>ofImage.cpp
1>c1xx : fatal error C1083: Cannot open source file: ‘…\libs\openframeworks\graphics\ofImage.cpp’: No such file or directory
1>ofGraphics.cpp
1>c1xx : fatal error C1083: Cannot open source file: ‘…\libs\openframeworks\graphics\ofGraphics.cpp’: No such file or directory
1>ofAppRunner.cpp
1>c1xx : fatal error C1083: Cannot open source file: ‘…\libs\openframeworks\app\ofAppRunner.cpp’: No such file or directory
1>Build log was saved at “file://c:\OpenFrameWorks\v0.03\app\work\emptyExample\obj\Release\BuildLog.htm”
1>openFrameworksApp - 13 error(s), 0 warning(s)
There seems to be a memory leak in emptyExample. It starts using 10,132k of ram and climbs up. Actually as I type this, it holds at 11,068k so it seems to be fine.
I’ve noticed the same behavior with empty opengl projects, and nearly spent half an afternoon pulling my hair out. I think it’s nothing, just take a while for the memory usage to move up to normal so it appears to be leaking. it may have to do with glut or gl, or somthing else. anyway, don’t worry - the empty project is definitely stable
Realized the change with the data folder. I’m normally using the same data folder for both debug and release, since i dont need to change settings in xml-files twice. so i keep my data in v0.04/app/data. By adding these two lines to the vcproj file i can keep doing that since the data in that folder is copied at compile time to the corresponding release/data or debug/data folder
<Tool
Name="VCPostBuildEventTool"
Description="adding DLLs and creating data folder"
CommandLine="xcopy /e /i /y "$(ProjectDir)\..\..\other\dlls\*.dll" $(ConfigurationName)
if not exist "$(ConfigurationName)\data" mkdir "$(ConfigurationName)\data"
if not exist "$(ProjectDir)\data" mkdir "$(ProjectDir)\data"
xcopy /e /i /y "$(ProjectDir)\data\*.*" $(ConfigurationName)\data
"
/>
If i leave the app/data folder empty nothing changes, but if i have something in there it is copied. Do you see any drawbacks to this? I guess it can still be used the way it is now, but you can also share files between debug and release.