Abraham Schneider wrote:
> how/where do I tell the rush
> daemon/submit script on my windows machine to also change the file
> path, so it can save the log files etc. at the right location? At the
> moment, the windows machine tries to save the logs to /mnt/server1/
> project/etc. instead of using X\:\... What's the correct way of doing
> that?
I would instead strongly suggest standardizing on UNC paths
so that you can get single pathnames that work on both platforms.
For instance, instead of /mnt/server1/foo and X:/foo,
use instead //server1/project/foo which would work on both.
OK, here we go:
UNC PATHS
---------
To implement UNC paths: let's assume on windows you have X: mapped
to //server1/project. This means that to access X:/foo you could
just as easily access it with the UNC path //server1/project/foo.
In fact, that's better (see links below)
So to make that work on unix, you'd setup your mounts as /server1/project,
so that the following would work:
ls -la //server1/project
..unix will ignore the extra leading slash, and treat it as one.
Have a look at these two links for details:
Under Windows, why are UNC paths better than drive letters?
http://www.seriss.com/rush-current/rush/rush-td-faq.html#TDFAQ-UNC
How do I make UNC paths work the same on Windows and Unix?
http://www.seriss.com/rush-current/rush/rush-td-faq.html#TDFAQ-UNC2
Also: the .common.pl script (that is in the same directory
as all your submit scripts) has a useful function called FixPath()
that can help enforce proper filename conventions across the platforms.
So if a user happens to use X:/foo/bar.nk for a nuke pathname, when they
submit their job, the FixPath() function can be used to convert that path
into the UNC equivalent //server1/project/foo/bar.nk.
Have a look at the function, and if you have questions, let me know.
In general, you can use perl regex to make the conversions, eg:
$path =~ s%^x:%//server1/project%i; # x:/foo -> //server1/project/foo
Similarly, paths like "/mnt/server1" could be converted into "//server1/project", eg:
$path =~ s%^/mnt/server1%//server1/project%i; # /mnt/server1/foo -> //server1/project/foo
WINDOWS SYMBOLIC LINKS
With the advent of Windows Vista and Windows 7, there's a new option
where you can make windows machines match unix using windows symbolic links.
So let's say you want to keep your unix pathnames /mnt/server1, and want
windows to be able to resolve that as //server1/project. To do this, you
can use the DOS "mklink" command (Vista and Win7 *only*!)
C:\> mkdir \mnt
C:\> mklink /d \mnt\project1 \\server1\project
With that, you should be able to do:
C:\> dir \mnt\project1
..and be able to see the contents of \\server1\project..!
For more info on windows symbolic links, see 'mklink /?', and
these Rush newsgroup articles where I explored the command:
http://seriss.com/cgi-bin/rush/newsgroup-threaded.cgi?-viewthread+1553+1554+1555+1556+1557+1566
IMBALANCED PATHNAMES ACROSS PLATFORMS
If you /really/ need to have pathnames different across platforms,
you can do it (but I think you'll run into all kinds of trouble
with your other software I think).
If you are running Rush 102.42a9 (and up), then in the rush.conf file
you can use the currently undocumented command 'logdir_convert' to
tell rush to convert log directory pathnames. So for instance if
you want windows machines to convert logdir pathnames from "/mnt/server1"
to "x:/", you can use:
os=windows logdir_convert "/mnt/server1" "x:/"
os=linux logdir_convert "x:/" "/mnt/server1"
With a combo of this, and in the FixPath() function doing a similar
platform-specific reflexive conversion, you can get rush to flip the
pathnames back and forth. eg:
if ( -d "x:/" ) { $path =~ s%^/mnt/server1/%x:/%i; } # WINDOWS? /mnt/server1 -> x:/
if ( -d "/mnt" ) { $path =~ s%^x/:/%/mnt/server1/%i; } # UNIX? x:/ -> /mnt/server1
Thing is, any scene files you have with hardcoded pathnames in
them rush won't see or be able to fix.. so you'll have to look
to similar functions in your software for this kind of conversion.
Maya has the 'dirmap' mel command which is the equivalent of the
above conversions.. more on that here:
Using 'dirmap' in Maya:
http://seriss.com/cgi-bin/rush/newsgroup-threaded.cgi?-view+1312+1312
Also, I believe nuke has something for this as well.. see this thread:
http://seriss.com/cgi-bin/rush/newsgroup-threaded.cgi?-viewthread+1943+1946+1947+1948
IN CLOSING..
I /really/ think you'll have better overall luck by standardizing
on one pathname style that works across all platforms; either making
everything look like windows UNC paths, or if you have Visa or Win7,
then you have the option of making everything look like unix paths
by using windows symbolic links.
Then you don't have to go around hacking maya and nuke, and all your
other software to try to do pathname conversions.
|