Index: /trunk/include/iprt/param.h
===================================================================
--- /trunk/include/iprt/param.h	(revision 35217)
+++ /trunk/include/iprt/param.h	(revision 35218)
@@ -117,6 +117,9 @@
 /**
  * Host max path (the reasonable value).
+ * @remarks defined both by iprt/param.h and iprt/path.h.
  */
-#define RTPATH_MAX   (4096 + 4)      /* (PATH_MAX + 1) on linux w/ some alignment */
+#if !defined(___iprt_path_h) || defined(DOXYGEN_RUNNING)
+# define RTPATH_MAX         (4096 + 4)    /* (PATH_MAX + 1) on linux w/ some alignment */
+#endif
 
 /** @} */
Index: /trunk/include/iprt/path.h
===================================================================
--- /trunk/include/iprt/path.h	(revision 35217)
+++ /trunk/include/iprt/path.h	(revision 35218)
@@ -42,4 +42,11 @@
  */
 
+/**
+ * Host max path (the reasonable value).
+ * @remarks defined both by iprt/param.h and iprt/path.h.
+ */
+#if !defined(___iprt_param_h) || defined(DOXYGEN_RUNNING)
+# define RTPATH_MAX         (4096 + 4)    /* (PATH_MAX + 1) on linux w/ some alignment */
+#endif
 
 /** @def RTPATH_SLASH
@@ -604,7 +611,8 @@
  *
  * This is not the same as RTPathAppPrivateArch() as Linux depends all shared
- * libraries in a common global directory where ld.so can found them.
+ * libraries in a common global directory where ld.so can find them.
  *
  * Linux:    /usr/lib
+ * Solaris:  /opt/@<application@>/@<arch>@ or something
  * Windows:  @<program files directory@>/@<application@>
  * Old path: same as RTPathExecDir()
@@ -621,4 +629,5 @@
  *
  * Linux:    /usr/shared/@<application@>
+ * Solaris:  /opt/@<application@>
  * Windows:  @<program files directory@>/@<application@>
  * Old path: same as RTPathExecDir()
@@ -635,4 +644,5 @@
  *
  * Linux:    /usr/lib/@<application@>
+ * Solaris:  /opt/@<application@>/@<arch>@ or something
  * Windows:  @<program files directory@>/@<application@>
  * Old path: same as RTPathExecDir()
@@ -645,7 +655,26 @@
 
 /**
+ * Gets the toplevel directory for architecture-dependent application data.
+ *
+ * This differs from RTPathAppPrivateArch on Solaris only where it will work
+ * around the /opt/@<application@>/amd64 and /opt/@<application@>/i386 multi
+ * architecture installation style.
+ *
+ * Linux:    /usr/lib/@<application@>
+ * Solaris:  /opt/@<application@>
+ * Windows:  @<program files directory@>/@<application@>
+ * Old path: same as RTPathExecDir()
+ *
+ * @returns iprt status code.
+ * @param   pszPath     Buffer where to store the path.
+ * @param   cchPath     Buffer size in bytes.
+ */
+RTDECL(int) RTPathAppPrivateArchTop(char *pszPath, size_t cchPath);
+
+/**
  * Gets the directory for documentation.
  *
  * Linux:    /usr/share/doc/@<application@>
+ * Solaris:  /opt/@<application@>
  * Windows:  @<program files directory@>/@<application@>
  * Old path: same as RTPathExecDir()
Index: /trunk/src/VBox/Devices/EFI/DevEFI.cpp
===================================================================
--- /trunk/src/VBox/Devices/EFI/DevEFI.cpp	(revision 35217)
+++ /trunk/src/VBox/Devices/EFI/DevEFI.cpp	(revision 35218)
@@ -1073,5 +1073,5 @@
             return VERR_NO_MEMORY;
 
-        rc = RTPathAppPrivateArch(pThis->pszEfiRomFile, RTPATH_MAX);
+        rc = RTPathAppPrivateArchTop(pThis->pszEfiRomFile, RTPATH_MAX);
         AssertRCReturn(rc, rc);
         rc = RTPathAppend(pThis->pszEfiRomFile, RTPATH_MAX, "VBoxEFI32.fd");
Index: /trunk/src/VBox/Installer/solaris/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Installer/solaris/Makefile.kmk	(revision 35217)
+++ /trunk/src/VBox/Installer/solaris/Makefile.kmk	(revision 35218)
@@ -601,10 +601,4 @@
 	$(QUIET)$(if $(VBOX_WITH_QTGUI),$(LN_SYMLINK) -f ../additions                                                        $(SOLARIS_VBOXINST_DIR_32)/additions,)
 	$(QUIET)$(if $(VBOX_WITH_QTGUI),$(LN_SYMLINK) -f ../additions                                                        $(SOLARIS_VBOXINST_DIR_64)/additions,)
-	$(QUIET)$(if $(VBOX_WITH_QTGUI),$(LN_SYMLINK) -f ../VirtualBox.chm                                                   $(SOLARIS_VBOXINST_DIR_32)/VirtualBox.chm,)
-	$(QUIET)$(if $(VBOX_WITH_QTGUI),$(LN_SYMLINK) -f ../VirtualBox.chm                                                   $(SOLARIS_VBOXINST_DIR_64)/VirtualBox.chm,)
-	$(QUIET)$(if $(VBOX_WITH_EFIFW_PACKING),$(LN_SYMLINK) -f ../VBoxEFI32.fd                                             $(SOLARIS_VBOXINST_DIR_64)/VBoxEFI32.fd,)
-	$(QUIET)$(if $(VBOX_WITH_EFIFW_PACKING),$(LN_SYMLINK) -f ../VBoxEFI32.fd                                             $(SOLARIS_VBOXINST_DIR_32)/VBoxEFI32.fd,)
-	$(QUIET)$(if $(VBOX_WITH_EFIFW_PACKING),$(LN_SYMLINK) -f ../VBoxEFI64.fd                                             $(SOLARIS_VBOXINST_DIR_64)/VBoxEFI64.fd,)
-	$(QUIET)$(if $(VBOX_WITH_EFIFW_PACKING),$(LN_SYMLINK) -f ../VBoxEFI64.fd                                             $(SOLARIS_VBOXINST_DIR_32)/VBoxEFI64.fd,)
 else
  ifndef VBOX_OSE
@@ -620,7 +614,4 @@
 	$(QUIET)$(if $(VBOX_WITH_QTGUI),$(LN_SYMLINK) -f ../rdesktop-vrdp-keymaps                                            $(SOLARIS_VBOXINST_DIR_ISA)/rdesktop-vrdp-keymaps,)
 	$(QUIET)$(if $(VBOX_WITH_QTGUI),$(LN_SYMLINK) -f ../additions                                                        $(SOLARIS_VBOXINST_DIR_ISA)/additions,)
-	$(QUIET)$(if $(VBOX_WITH_QTGUI),$(LN_SYMLINK) -f ../VirtualBox.chm                                                   $(SOLARIS_VBOXINST_DIR_ISA)/VirtualBox.chm,)
-	$(QUIET)$(if $(VBOX_WITH_EFIFW_PACKING),$(LN_SYMLINK) -f ../VBoxEFI32.fd                                             $(SOLARIS_VBOXINST_DIR_ISA)/VBoxEFI32.fd,)
-	$(QUIET)$(if $(VBOX_WITH_EFIFW_PACKING),$(LN_SYMLINK) -f ../VBoxEFI64.fd                                             $(SOLARIS_VBOXINST_DIR_ISA)/VBoxEFI64.fd,)
 endif
 	$(QUIET)$(LN_SYMLINK) -f ./pkginstall.sh                                                                             $(SOLARIS_VBOXINST_DIR)/ipsinstall.sh
Index: /trunk/src/VBox/Main/ExtPackManagerImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/ExtPackManagerImpl.cpp	(revision 35217)
+++ /trunk/src/VBox/Main/ExtPackManagerImpl.cpp	(revision 35218)
@@ -1745,5 +1745,5 @@
      */
     char szBaseDir[RTPATH_MAX];
-    int rc = RTPathAppPrivateArch(szBaseDir, sizeof(szBaseDir));
+    int rc = RTPathAppPrivateArchTop(szBaseDir, sizeof(szBaseDir));
     AssertLogRelRCReturn(rc, E_FAIL);
     rc = RTPathAppend(szBaseDir, sizeof(szBaseDir), VBOX_EXTPACK_INSTALL_DIR);
Index: /trunk/src/VBox/Main/VBoxExtPackHelperApp.cpp
===================================================================
--- /trunk/src/VBox/Main/VBoxExtPackHelperApp.cpp	(revision 35217)
+++ /trunk/src/VBox/Main/VBoxExtPackHelperApp.cpp	(revision 35218)
@@ -176,5 +176,5 @@
      */
     char szCorrect[RTPATH_MAX];
-    int rc = RTPathAppPrivateArch(szCorrect, sizeof(szCorrect));
+    int rc = RTPathAppPrivateArchTop(szCorrect, sizeof(szCorrect));
     if (RT_FAILURE(rc))
         return false;
Index: /trunk/src/VBox/Runtime/r3/path.cpp
===================================================================
--- /trunk/src/VBox/Runtime/r3/path.cpp	(revision 35217)
+++ /trunk/src/VBox/Runtime/r3/path.cpp	(revision 35218)
@@ -39,4 +39,27 @@
 
 
+#ifdef RT_OS_SOLARIS
+/**
+ * Hack to strip of the architecture subdirectory from the exec dir.
+ *
+ * @returns See RTPathExecDir.
+ * @param   pszPath             See RTPathExecDir.
+ * @param   cchPath             See RTPathExecDir.
+ */
+static int rtPathSolarisArchHack(char *pszPath, size_t cchPath)
+{
+    int rc = RTPathExecDir(pszPath, cchPath);
+    if (RT_SUCCESS(rc))
+    {
+        const char *pszLast = RTPathFilename(pszPath);
+        if (   !strcmp(pszLast, "amd64")
+            || !strcmp(pszLast, "i386"))
+            RTPathStripFilename(pszPath);
+    }
+    return rc;
+}
+#endif
+
+
 RTDECL(int) RTPathExecDir(char *pszPath, size_t cchPath)
 {
@@ -59,17 +82,10 @@
 
 
-/**
- * Gets the directory for architecture-independent application data, for
- * example NLS files, module sources, ...
- *
- * Linux:    /usr/shared/@<application@>
- * Windows:  @<program files directory@>/@<application@>
- * Old path: same as RTPathExecDir()
- *
- */
 RTDECL(int) RTPathAppPrivateNoArch(char *pszPath, size_t cchPath)
 {
 #if !defined(RT_OS_WINDOWS) && defined(RTPATH_APP_PRIVATE)
     return RTStrCopy(pszPath, cchPath, RTPATH_APP_PRIVATE);
+#elif defined(RT_OS_SOLARIS) && 0 /// @todo fix this
+    return rtPathSolarisArchHack(pszPath, cchPath);
 #else
     return RTPathExecDir(pszPath, cchPath);
@@ -78,16 +94,4 @@
 
 
-/**
- * Gets the directory for architecture-dependent application data, for
- * example modules which can be loaded at runtime.
- *
- * Linux:    /usr/lib/@<application@>
- * Windows:  @<program files directory@>/@<application@>
- * Old path: same as RTPathExecDir()
- *
- * @returns iprt status code.
- * @param   pszPath     Buffer where to store the path.
- * @param   cchPath     Buffer size in bytes.
- */
 RTDECL(int) RTPathAppPrivateArch(char *pszPath, size_t cchPath)
 {
@@ -100,17 +104,16 @@
 
 
-/**
- * Gets the directory of shared libraries. This is not the same as
- * RTPathAppPrivateArch() as Linux depends all shared libraries in
- * a common global directory where ld.so can found them.
- *
- * Linux:    /usr/lib
- * Windows:  @<program files directory@>/@<application@>
- * Old path: same as RTPathExecDir()
- *
- * @returns iprt status code.
- * @param   pszPath     Buffer where to store the path.
- * @param   cchPath     Buffer size in bytes.
- */
+RTDECL(int) RTPathAppPrivateArchTop(char *pszPath, size_t cchPath)
+{
+#if !defined(RT_OS_WINDOWS) && defined(RTPATH_APP_PRIVATE_ARCH)
+    return RTStrCopy(pszPath, cchPath, RTPATH_APP_PRIVATE_ARCH);
+#elif defined(RT_OS_SOLARIS)
+    return rtPathSolarisArchHack(pszPath, cchPath);
+#else
+    return RTPathExecDir(pszPath, cchPath);
+#endif
+}
+
+
 RTDECL(int) RTPathSharedLibs(char *pszPath, size_t cchPath)
 {
@@ -123,19 +126,10 @@
 
 
-/**
- * Gets the directory for documentation.
- *
- * Linux:    /usr/share/doc/@<application@>
- * Windows:  @<program files directory@>/@<application@>
- * Old path: same as RTPathExecDir()
- *
- * @returns iprt status code.
- * @param   pszPath     Buffer where to store the path.
- * @param   cchPath     Buffer size in bytes.
- */
 RTDECL(int) RTPathAppDocs(char *pszPath, size_t cchPath)
 {
 #if !defined(RT_OS_WINDOWS) && defined(RTPATH_APP_DOCS)
     return RTStrCopy(pszPath, cchPath, RTPATH_APP_DOCS);
+#elif defined(RT_OS_SOLARIS)
+    return rtPathSolarisArchHack(pszPath, cchPath);
 #else
     return RTPathExecDir(pszPath, cchPath);
@@ -144,12 +138,4 @@
 
 
-/**
- * Gets the temporary directory path.
- *
- * @returns iprt status code.
- *
- * @param   pszPath     Buffer where to store the path.
- * @param   cchPath     Buffer size in bytes.
- */
 RTDECL(int) RTPathTemp(char *pszPath, size_t cchPath)
 {
Index: /trunk/src/VBox/VMM/PDMLdr.cpp
===================================================================
--- /trunk/src/VBox/VMM/PDMLdr.cpp	(revision 35217)
+++ /trunk/src/VBox/VMM/PDMLdr.cpp	(revision 35218)
@@ -1112,6 +1112,7 @@
      * Use the default location.
      */
-    rc = fShared ? RTPathSharedLibs(szPath, sizeof(szPath))
-                 : RTPathAppPrivateArch(szPath, sizeof(szPath));
+    rc = fShared
+       ? RTPathSharedLibs(    szPath, sizeof(szPath))
+       : RTPathAppPrivateArch(szPath, sizeof(szPath));
     if (!RT_SUCCESS(rc))
     {
