* is the hardcoded value below. For Windows, it is
* determined dynamically in GuestApp_GetInstallPath(),
* so the empty string here is just for completeness.
- * XXX. Whoever does the Mac port should do something
- * intelligent for that platform as well.
*/
-#if defined(_WIN32)
-#define GUESTAPP_TOOLS_INSTALL_PATH ""
+#if defined _WIN32
+# define GUESTAPP_TOOLS_INSTALL_PATH ""
+#elif defined __APPLE__
+# define GUESTAPP_TOOLS_INSTALL_PATH "/Library/Application Support/VMware Tools"
#else
-#define GUESTAPP_TOOLS_INSTALL_PATH "/etc/vmware-tools"
+# define GUESTAPP_TOOLS_INSTALL_PATH "/etc/vmware-tools"
#endif
/*
# in other words, `basename "$0"` might be poweron-vm-default.
#
# Handy reference/shorthand used in this doc/scripts:
-# toolsConfDir ::= Depends on platform and installation settings. Likely
+# TOOLS_CONFDIR ::= Depends on platform and installation settings. Likely
# "/etc/vmware-tools" or
# "/Library/Application Support/VMware Tools"
# powerOp ::= One of "poweron-vm", "poweroff-vm", "suspend-vm", and
# "resume-vm".
-# vmwScriptDir ::= $toolsConfDir/scripts/vmware
-# userScriptDir ::= $toolsConfDir/scripts/${powerOp}-default.d
+# vmwScriptDir ::= $TOOLS_CONFDIR/scripts/vmware
+# userScriptDir ::= $TOOLS_CONFDIR/scripts/${powerOp}-default.d
#
# End users may install scripts of their own under $userScriptDir. They
# are executed in alphabetical order with "$powerOp" as the only argument.
echo `date` ": Executing '$0'"
# See above.
-toolsConfDir=`dirname "$0"`
+TOOLS_CONFDIR=`dirname "$0"`
+export TOOLS_CONFDIR
# Pull in subroutines like Panic.
-. "$toolsConfDir"/statechange.subr
+. "$TOOLS_CONFDIR"/statechange.subr
#
powerOp=`basename "$0" | sed 's,-default,,'`
exitCode=0
- vmwScriptDir="$toolsConfDir/scripts/vmware"
- userScriptDir="$toolsConfDir/scripts/${powerOp}-default.d"
+ vmwScriptDir="$TOOLS_CONFDIR/scripts/vmware"
+ userScriptDir="$TOOLS_CONFDIR/scripts/${powerOp}-default.d"
case "$powerOp" in
poweron-vm|resume-vm)