Changeset 35218 in vbox
- Timestamp:
- Dec 17, 2010 12:45:16 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 69063
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/param.h
r32036 r35218 117 117 /** 118 118 * Host max path (the reasonable value). 119 * @remarks defined both by iprt/param.h and iprt/path.h. 119 120 */ 120 #define RTPATH_MAX (4096 + 4) /* (PATH_MAX + 1) on linux w/ some alignment */ 121 #if !defined(___iprt_path_h) || defined(DOXYGEN_RUNNING) 122 # define RTPATH_MAX (4096 + 4) /* (PATH_MAX + 1) on linux w/ some alignment */ 123 #endif 121 124 122 125 /** @} */ -
trunk/include/iprt/path.h
r34230 r35218 42 42 */ 43 43 44 /** 45 * Host max path (the reasonable value). 46 * @remarks defined both by iprt/param.h and iprt/path.h. 47 */ 48 #if !defined(___iprt_param_h) || defined(DOXYGEN_RUNNING) 49 # define RTPATH_MAX (4096 + 4) /* (PATH_MAX + 1) on linux w/ some alignment */ 50 #endif 44 51 45 52 /** @def RTPATH_SLASH … … 604 611 * 605 612 * This is not the same as RTPathAppPrivateArch() as Linux depends all shared 606 * libraries in a common global directory where ld.so can f ound them.613 * libraries in a common global directory where ld.so can find them. 607 614 * 608 615 * Linux: /usr/lib 616 * Solaris: /opt/@<application@>/@<arch>@ or something 609 617 * Windows: @<program files directory@>/@<application@> 610 618 * Old path: same as RTPathExecDir() … … 621 629 * 622 630 * Linux: /usr/shared/@<application@> 631 * Solaris: /opt/@<application@> 623 632 * Windows: @<program files directory@>/@<application@> 624 633 * Old path: same as RTPathExecDir() … … 635 644 * 636 645 * Linux: /usr/lib/@<application@> 646 * Solaris: /opt/@<application@>/@<arch>@ or something 637 647 * Windows: @<program files directory@>/@<application@> 638 648 * Old path: same as RTPathExecDir() … … 645 655 646 656 /** 657 * Gets the toplevel directory for architecture-dependent application data. 658 * 659 * This differs from RTPathAppPrivateArch on Solaris only where it will work 660 * around the /opt/@<application@>/amd64 and /opt/@<application@>/i386 multi 661 * architecture installation style. 662 * 663 * Linux: /usr/lib/@<application@> 664 * Solaris: /opt/@<application@> 665 * Windows: @<program files directory@>/@<application@> 666 * Old path: same as RTPathExecDir() 667 * 668 * @returns iprt status code. 669 * @param pszPath Buffer where to store the path. 670 * @param cchPath Buffer size in bytes. 671 */ 672 RTDECL(int) RTPathAppPrivateArchTop(char *pszPath, size_t cchPath); 673 674 /** 647 675 * Gets the directory for documentation. 648 676 * 649 677 * Linux: /usr/share/doc/@<application@> 678 * Solaris: /opt/@<application@> 650 679 * Windows: @<program files directory@>/@<application@> 651 680 * Old path: same as RTPathExecDir() -
trunk/src/VBox/Devices/EFI/DevEFI.cpp
r34163 r35218 1073 1073 return VERR_NO_MEMORY; 1074 1074 1075 rc = RTPathAppPrivateArch (pThis->pszEfiRomFile, RTPATH_MAX);1075 rc = RTPathAppPrivateArchTop(pThis->pszEfiRomFile, RTPATH_MAX); 1076 1076 AssertRCReturn(rc, rc); 1077 1077 rc = RTPathAppend(pThis->pszEfiRomFile, RTPATH_MAX, "VBoxEFI32.fd"); -
trunk/src/VBox/Installer/solaris/Makefile.kmk
r35216 r35218 601 601 $(QUIET)$(if $(VBOX_WITH_QTGUI),$(LN_SYMLINK) -f ../additions $(SOLARIS_VBOXINST_DIR_32)/additions,) 602 602 $(QUIET)$(if $(VBOX_WITH_QTGUI),$(LN_SYMLINK) -f ../additions $(SOLARIS_VBOXINST_DIR_64)/additions,) 603 $(QUIET)$(if $(VBOX_WITH_QTGUI),$(LN_SYMLINK) -f ../VirtualBox.chm $(SOLARIS_VBOXINST_DIR_32)/VirtualBox.chm,)604 $(QUIET)$(if $(VBOX_WITH_QTGUI),$(LN_SYMLINK) -f ../VirtualBox.chm $(SOLARIS_VBOXINST_DIR_64)/VirtualBox.chm,)605 $(QUIET)$(if $(VBOX_WITH_EFIFW_PACKING),$(LN_SYMLINK) -f ../VBoxEFI32.fd $(SOLARIS_VBOXINST_DIR_64)/VBoxEFI32.fd,)606 $(QUIET)$(if $(VBOX_WITH_EFIFW_PACKING),$(LN_SYMLINK) -f ../VBoxEFI32.fd $(SOLARIS_VBOXINST_DIR_32)/VBoxEFI32.fd,)607 $(QUIET)$(if $(VBOX_WITH_EFIFW_PACKING),$(LN_SYMLINK) -f ../VBoxEFI64.fd $(SOLARIS_VBOXINST_DIR_64)/VBoxEFI64.fd,)608 $(QUIET)$(if $(VBOX_WITH_EFIFW_PACKING),$(LN_SYMLINK) -f ../VBoxEFI64.fd $(SOLARIS_VBOXINST_DIR_32)/VBoxEFI64.fd,)609 603 else 610 604 ifndef VBOX_OSE … … 620 614 $(QUIET)$(if $(VBOX_WITH_QTGUI),$(LN_SYMLINK) -f ../rdesktop-vrdp-keymaps $(SOLARIS_VBOXINST_DIR_ISA)/rdesktop-vrdp-keymaps,) 621 615 $(QUIET)$(if $(VBOX_WITH_QTGUI),$(LN_SYMLINK) -f ../additions $(SOLARIS_VBOXINST_DIR_ISA)/additions,) 622 $(QUIET)$(if $(VBOX_WITH_QTGUI),$(LN_SYMLINK) -f ../VirtualBox.chm $(SOLARIS_VBOXINST_DIR_ISA)/VirtualBox.chm,)623 $(QUIET)$(if $(VBOX_WITH_EFIFW_PACKING),$(LN_SYMLINK) -f ../VBoxEFI32.fd $(SOLARIS_VBOXINST_DIR_ISA)/VBoxEFI32.fd,)624 $(QUIET)$(if $(VBOX_WITH_EFIFW_PACKING),$(LN_SYMLINK) -f ../VBoxEFI64.fd $(SOLARIS_VBOXINST_DIR_ISA)/VBoxEFI64.fd,)625 616 endif 626 617 $(QUIET)$(LN_SYMLINK) -f ./pkginstall.sh $(SOLARIS_VBOXINST_DIR)/ipsinstall.sh -
trunk/src/VBox/Main/ExtPackManagerImpl.cpp
r35191 r35218 1745 1745 */ 1746 1746 char szBaseDir[RTPATH_MAX]; 1747 int rc = RTPathAppPrivateArch (szBaseDir, sizeof(szBaseDir));1747 int rc = RTPathAppPrivateArchTop(szBaseDir, sizeof(szBaseDir)); 1748 1748 AssertLogRelRCReturn(rc, E_FAIL); 1749 1749 rc = RTPathAppend(szBaseDir, sizeof(szBaseDir), VBOX_EXTPACK_INSTALL_DIR); -
trunk/src/VBox/Main/VBoxExtPackHelperApp.cpp
r35204 r35218 176 176 */ 177 177 char szCorrect[RTPATH_MAX]; 178 int rc = RTPathAppPrivateArch (szCorrect, sizeof(szCorrect));178 int rc = RTPathAppPrivateArchTop(szCorrect, sizeof(szCorrect)); 179 179 if (RT_FAILURE(rc)) 180 180 return false; -
trunk/src/VBox/Runtime/r3/path.cpp
r33454 r35218 39 39 40 40 41 #ifdef RT_OS_SOLARIS 42 /** 43 * Hack to strip of the architecture subdirectory from the exec dir. 44 * 45 * @returns See RTPathExecDir. 46 * @param pszPath See RTPathExecDir. 47 * @param cchPath See RTPathExecDir. 48 */ 49 static int rtPathSolarisArchHack(char *pszPath, size_t cchPath) 50 { 51 int rc = RTPathExecDir(pszPath, cchPath); 52 if (RT_SUCCESS(rc)) 53 { 54 const char *pszLast = RTPathFilename(pszPath); 55 if ( !strcmp(pszLast, "amd64") 56 || !strcmp(pszLast, "i386")) 57 RTPathStripFilename(pszPath); 58 } 59 return rc; 60 } 61 #endif 62 63 41 64 RTDECL(int) RTPathExecDir(char *pszPath, size_t cchPath) 42 65 { … … 59 82 60 83 61 /**62 * Gets the directory for architecture-independent application data, for63 * example NLS files, module sources, ...64 *65 * Linux: /usr/shared/@<application@>66 * Windows: @<program files directory@>/@<application@>67 * Old path: same as RTPathExecDir()68 *69 */70 84 RTDECL(int) RTPathAppPrivateNoArch(char *pszPath, size_t cchPath) 71 85 { 72 86 #if !defined(RT_OS_WINDOWS) && defined(RTPATH_APP_PRIVATE) 73 87 return RTStrCopy(pszPath, cchPath, RTPATH_APP_PRIVATE); 88 #elif defined(RT_OS_SOLARIS) && 0 /// @todo fix this 89 return rtPathSolarisArchHack(pszPath, cchPath); 74 90 #else 75 91 return RTPathExecDir(pszPath, cchPath); … … 78 94 79 95 80 /**81 * Gets the directory for architecture-dependent application data, for82 * example modules which can be loaded at runtime.83 *84 * Linux: /usr/lib/@<application@>85 * Windows: @<program files directory@>/@<application@>86 * Old path: same as RTPathExecDir()87 *88 * @returns iprt status code.89 * @param pszPath Buffer where to store the path.90 * @param cchPath Buffer size in bytes.91 */92 96 RTDECL(int) RTPathAppPrivateArch(char *pszPath, size_t cchPath) 93 97 { … … 100 104 101 105 102 /** 103 * Gets the directory of shared libraries. This is not the same as 104 * RTPathAppPrivateArch() as Linux depends all shared libraries in 105 * a common global directory where ld.so can found them. 106 * 107 * Linux: /usr/lib 108 * Windows: @<program files directory@>/@<application@> 109 * Old path: same as RTPathExecDir() 110 * 111 * @returns iprt status code. 112 * @param pszPath Buffer where to store the path. 113 * @param cchPath Buffer size in bytes. 114 */ 106 RTDECL(int) RTPathAppPrivateArchTop(char *pszPath, size_t cchPath) 107 { 108 #if !defined(RT_OS_WINDOWS) && defined(RTPATH_APP_PRIVATE_ARCH) 109 return RTStrCopy(pszPath, cchPath, RTPATH_APP_PRIVATE_ARCH); 110 #elif defined(RT_OS_SOLARIS) 111 return rtPathSolarisArchHack(pszPath, cchPath); 112 #else 113 return RTPathExecDir(pszPath, cchPath); 114 #endif 115 } 116 117 115 118 RTDECL(int) RTPathSharedLibs(char *pszPath, size_t cchPath) 116 119 { … … 123 126 124 127 125 /**126 * Gets the directory for documentation.127 *128 * Linux: /usr/share/doc/@<application@>129 * Windows: @<program files directory@>/@<application@>130 * Old path: same as RTPathExecDir()131 *132 * @returns iprt status code.133 * @param pszPath Buffer where to store the path.134 * @param cchPath Buffer size in bytes.135 */136 128 RTDECL(int) RTPathAppDocs(char *pszPath, size_t cchPath) 137 129 { 138 130 #if !defined(RT_OS_WINDOWS) && defined(RTPATH_APP_DOCS) 139 131 return RTStrCopy(pszPath, cchPath, RTPATH_APP_DOCS); 132 #elif defined(RT_OS_SOLARIS) 133 return rtPathSolarisArchHack(pszPath, cchPath); 140 134 #else 141 135 return RTPathExecDir(pszPath, cchPath); … … 144 138 145 139 146 /**147 * Gets the temporary directory path.148 *149 * @returns iprt status code.150 *151 * @param pszPath Buffer where to store the path.152 * @param cchPath Buffer size in bytes.153 */154 140 RTDECL(int) RTPathTemp(char *pszPath, size_t cchPath) 155 141 { -
trunk/src/VBox/VMM/PDMLdr.cpp
r35188 r35218 1112 1112 * Use the default location. 1113 1113 */ 1114 rc = fShared ? RTPathSharedLibs(szPath, sizeof(szPath)) 1115 : RTPathAppPrivateArch(szPath, sizeof(szPath)); 1114 rc = fShared 1115 ? RTPathSharedLibs( szPath, sizeof(szPath)) 1116 : RTPathAppPrivateArch(szPath, sizeof(szPath)); 1116 1117 if (!RT_SUCCESS(rc)) 1117 1118 {
Note:
See TracChangeset
for help on using the changeset viewer.