On Fri, Feb 6, 2009 at 2:34 PM, amical <[email protected]> wrote:
>
> OK - now on to the next problem: I want my own custom icon for real
> filesystem.
>
> I read the notes on the CUSTOM_VOLUME_ICON page, copied one of the
> MacFUSE "under construction" *.icns files, tried all the options
> permutations to get it working.
> Nothing worked until I deleted the "noapplexattr" option from my
> invocation. Looks great!.
If you use the xcode project templates to create your file system then
it will set up a custom volume icon for you. When using the template,
an under-construction .icns file will be created with the same name as
your project. You can overwrite that file with your preferred icon and
it should just work.
In the case of an Objective-C app-based file system, the template will
put the code to set up the volicon in the _Controller.m file. See code
that looks like:
NSMutableArray* options = [NSMutableArray array];
NSString* volArg =
[NSString stringWithFormat:@"volicon=%@",
[[NSBundle mainBundle] pathForResource:@"YTFS" ofType:@"icns"]];
[options addObject:volArg];
[options addObject:@"volname=YTFS"];
[options addObject:@"rdonly"];
[fs_ mountAtPath:mountPath withOptions:options];
In the case of a Objective-C command line file system, then the code
to set this up is in main.m and a post-build script to stuff the
custom icon into the executable's resource fork. If you are doing a
pure C based file system then you can still use the main.m or wiki
page as an example of what to do.
If you use noapplexattr, then it MacFUSE will deny access to
com.apple.* extended attributes. Since these are used to support
custom icons (among other things) on OS X I can see why using that
option messed up the volicon stuff.
>
> Might I suggest this be added to the CUSTOM_VOLUME_ICON info.
>
> Is there any way to have the custom icon AND prevent the OS from
> cluttering up the filesystem with all the ",_*' files??
>
> Might this be something I have to block/handle in my code??
If your file system supports extended attributes then (on Leopard+) OS
X should use those instead of '._' files.
ted
>
> regards,
> mt
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"MacFUSE" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/macfuse?hl=en
-~----------~----~----~----~------~----~------~--~---