From: ara.t.howard@... Date: 2007-03-21T03:59:17+09:00 Subject: Re: Passing data to rant/rake for a customized build? On Wed, 21 Mar 2007, Phrogz wrote: > Summary: How do I use a single rantfile or rakefile to perform some > varying commands based on data that I want to pass to it? > > Background: My company makes a Windows-based middleware product > helping next-gen game developers create UIs. In the process of > creating the UI, our tool gathers information about the raw 3D models > and 2D images and data files and so forth needed to create the end > result. When the artist presses the "Preview" button, the application > needs to essentially perform a 'build' process. Various assets are > conditioned (going from bloated formats to runtime-appropriate > binaries) using various standalone applications. Only those resources > that have changed want to be conditioned, and thus some dependency > management is needed to do as little work as possible as quickly as > possible. Depending on the target platform, some files may need to be > copied over the network to the PS3 or 360 dev kit. The final 'product' > of the build is launching the preview application and passing it some > descriptor to show the end result. > > The process changes slightly based on: > * debug/release mode, > * the target platform to preview on, > * the actual project being worked on and the assets it contains > ...but otherwise is the same for every project file, for a given > customer. Each customer, however, may change the process entirely. > > > Question: I'm looking at Rant (or perhaps Rake) for this right now.[1] > The idea is that the application would run a Rant target (perhaps > based on a combination of debug/release and target platform), which > would kick off all the conditioners as appropriate and finally launch > the viewer application. > > My question is...how do I pass data to a rantfile? The command line > for rant is just: > rant [-f Rantfile] [Options] [targets] > which gives me no way of simply passing along the name of the project > and other assets from our tool. why not via the environment? you may also be able to pass stdin rant rantifle < stdin and then have a 'configuration' task, which all other tasks depend on, which does something like Config = YAML.load STDIN.read this stdin bit is a wild ass guess, however. cheers. -a -- be kind whenever possible... it is always possible. - the dalai lama