Open GoogleCodeExporter opened 9 years ago
I don't have a Macintosh but I looked at a few Web pages:
http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/
man8/mount_cd9660.8.html
http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/
man8/mount_udf.8.html
http://macosx.com/forums/unix-x11/29334-what-cdrom-called-dev-directory.html
http://support.apple.com/kb/TA21940?viewlocale=en_US
Take-aways:
- ISO 9660 and UDF filesystems are mounted with types cd9660 and udf
- device names for CD-ROM drives can be things like /dev/sd2 and /dev/disk1
- removable media are normally auto-mounted under /Volumes/[disk title]
I see a comment above the winetricks_detect_optical_drive routine that says:
# Really, should take a volume name as argument, and use 'mount' to get
# mount point if system automounted it.
In this case, it would be under /Volumes/DragonAge or the like (I don't have
the game).
Macintoshes ordinarily do auto-mount removable media. If we were to wait until
that's happened, then do something like:
mount | egrep "(udf|cd9660|iso9660|hsfs)" | cut -f3 -d\ | head -1
(there's a space character in the options to "cut") it ought to tell us the
device name of the first optical drive that contains a medium. If there are
multiple drives, the user would have to take out any other discs. We could
check for this by using "wc -l" instead of "head -1" and prompt the user if it
gives anything besides 1 as the answer. The "iso9660" and "hsfs" are for Linux
and Solaris (on Solaris, UDF file-systems are called "udfs"). None of this will
work on Cygwin.
Original comment by t...@hush.ai
on 14 May 2011 at 12:07
About my suggestion of "head -1", it should say instead "head -n 1" for
portability.
Original comment by t...@hush.ai
on 14 May 2011 at 4:06
My incomplete list of functions which do not operate properly on MacOSX:
winetricks_list_mounts() - OSX uses BSD syntax for volume formats (cd9660, etc)
winetricks_is_mounted() - code expects linux formatting of mount output
winetricks_mount_cached_iso() - both directory structure and mount syntax are
linux-specific
winetricks_mount_real_volume() - assumes system has /proc filesystem
w_umount() - umount assumes linux syntax - mac uses BSD mount/umount syntax
The code can be made general using BSD syntax, or Mac-specific leveraging
/Volumes/* for "real" mounts. For temporary mounts via sudo you might want to
create a temporary mountpoint under the W_CACHE path.
Original comment by shon...@gmail.com
on 25 Jun 2011 at 10:48
Portal 2 will have a native Linux release very soon.
Original comment by YokoZar
on 23 Mar 2014 at 2:40
Original issue reported on code.google.com by
daniel.r...@gmail.com
on 2 May 2011 at 2:34