Discussion:
[bakefile-devel] Bakefile Working Directory
Douglas Hodson
2008-11-23 18:42:00 UTC
Permalink
Hello... first time in this group. Bakefile is great, I'm trying to use
it for many things.

I setup a set of bakefiles to generate my Visual C++ 2005/2008 project
and solution files for several executables. It works.

As configured, the Release and Debug directories are created and
physically kept separate from the source / include files. And I've
specified that the target exe file be placed with the source code so
that, when executed, it has access to a number of input files it needs.

Directory structure looks like this:

root -> build -> bakefiles -> *.bkl
root -> build -> msvs2005 -> where 2005 project and solution files are
stored. Also where Release/Debug directories get created
root -> build -> msvc2008 -> same as above execept for 2008
root -> mainTest1 -> example1 that contains source, include and input
files + final target .exe once produced
root -> mainTest2 -> example2, etc
root -> mainTest3 -> example3, etc

This arrangement works great for both compilation and execution as long
as I don't use Visual C++ to execute it. Why? Because Visual C++'s
working directory is associated with "./" or the place where Release and
Debug information is kept, NOT the target path.

I can manually change it, but it seems that option is out of my control
as far as using bakefile. If I go this route, the user of my software
will have to change it... I don't like that.

Does this make sense? Any advice would be appreciated.

Doug
Vaclav Slavik
2008-11-27 00:09:13 UTC
Permalink
Post by Douglas Hodson
I can manually change it, but it seems that option is out of my
control as far as using bakefile. If I go this route, the user of my
software will have to change it... I don't like that.
Does this make sense?
Not much, I'm afraid. I still don't understand what the problem _is_
after reading it for the third time. If you need to change where the
objects are placed, set the BUILDDIR variable. If the problem is
something else, please explain in more detail (it would help to define
what you mean by "working directory", I'm pretty sure you don't use the
term in its usual meaning of CWD).

Vaclav
Scott Bailey
2008-11-27 04:57:12 UTC
Permalink
Doug,

Sorry it took so long to get around to reading your post. Busy week.

Anyway. Let me take a stab at what you want..

Do you want to execute the file from the IDE in a target directory different
from the executables location?

Is that it?

I gather your current process is this:
- get source
- bake
- open project
- change target directory

Yes?

FYI the 2005 project files are text. Thus you can diff a before and after
to see what variables need to be set/changed...

SB
Post by Douglas Hodson
Hello... first time in this group. Bakefile is great, I'm trying to use
it for many things.
I setup a set of bakefiles to generate my Visual C++ 2005/2008 project
and solution files for several executables. It works.
As configured, the Release and Debug directories are created and
physically kept separate from the source / include files. And I've
specified that the target exe file be placed with the source code so
that, when executed, it has access to a number of input files it needs.
root -> build -> bakefiles -> *.bkl
root -> build -> msvs2005 -> where 2005 project and solution files are
stored. Also where Release/Debug directories get created
root -> build -> msvc2008 -> same as above execept for 2008
root -> mainTest1 -> example1 that contains source, include and input
files + final target .exe once produced
root -> mainTest2 -> example2, etc
root -> mainTest3 -> example3, etc
This arrangement works great for both compilation and execution as long
as I don't use Visual C++ to execute it. Why? Because Visual C++'s
working directory is associated with "./" or the place where Release and
Debug information is kept, NOT the target path.
I can manually change it, but it seems that option is out of my control
as far as using bakefile. If I go this route, the user of my software
will have to change it... I don't like that.
Does this make sense? Any advice would be appreciated.
Doug
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bakefile-devel mailing list
https://lists.sourceforge.net/lists/listinfo/bakefile-devel
--
Scott Bailey
Loading...