diff options
author | Jacek Antonelli | 2011-05-08 15:13:37 -0500 |
---|---|---|
committer | Jacek Antonelli | 2011-05-08 15:50:49 -0500 |
commit | 7278f0254a3944bd2bcbf1e855fb0d90c3086a27 (patch) | |
tree | 5d7ecb81ebf1a07482f0a7d3d13acd7f18360c0b /linden/indra/llvfs | |
parent | Imprudence 1.3.1 released. (diff) | |
parent | Changed version to Experimental 2011.04.19 (diff) | |
download | meta-impy-7278f0254a3944bd2bcbf1e855fb0d90c3086a27.zip meta-impy-7278f0254a3944bd2bcbf1e855fb0d90c3086a27.tar.gz meta-impy-7278f0254a3944bd2bcbf1e855fb0d90c3086a27.tar.bz2 meta-impy-7278f0254a3944bd2bcbf1e855fb0d90c3086a27.tar.xz |
Merged Experimental branch (exp) back into main line (next).
Git thought many files (almost 100) had merge conflicts. But, after
resolving the conflicts (which were mostly trivial), almost all the
files turned out to be the same as in the exp branch. So, the
conflicts are not listed here. Check the diff between commit 244ffe8
and this commit to see what really changed.
Diffstat (limited to 'linden/indra/llvfs')
-rw-r--r-- | linden/indra/llvfs/CMakeLists.txt | 1 | ||||
-rw-r--r-- | linden/indra/llvfs/lldir.cpp | 12 | ||||
-rw-r--r-- | linden/indra/llvfs/lldir.h | 8 | ||||
-rw-r--r-- | linden/indra/llvfs/lldir_linux.cpp | 45 | ||||
-rw-r--r-- | linden/indra/llvfs/lldir_linux.h | 3 | ||||
-rw-r--r-- | linden/indra/llvfs/lldir_mac.cpp | 17 | ||||
-rw-r--r-- | linden/indra/llvfs/lldir_mac.h | 3 | ||||
-rw-r--r-- | linden/indra/llvfs/lldir_solaris.cpp | 4 | ||||
-rw-r--r-- | linden/indra/llvfs/lldir_win32.cpp | 17 | ||||
-rw-r--r-- | linden/indra/llvfs/lldir_win32.h | 3 | ||||
-rwxr-xr-x | linden/indra/llvfs/llpidlock.cpp | 3 | ||||
-rwxr-xr-x | linden/indra/llvfs/llpidlock.h | 4 | ||||
-rw-r--r-- | linden/indra/llvfs/llvfile.cpp | 1 | ||||
-rw-r--r-- | linden/indra/llvfs/llvfs.cpp | 8 |
14 files changed, 111 insertions, 18 deletions
diff --git a/linden/indra/llvfs/CMakeLists.txt b/linden/indra/llvfs/CMakeLists.txt index cc0297e..25b57e0 100644 --- a/linden/indra/llvfs/CMakeLists.txt +++ b/linden/indra/llvfs/CMakeLists.txt | |||
@@ -4,7 +4,6 @@ project(llvfs) | |||
4 | 4 | ||
5 | include(00-Common) | 5 | include(00-Common) |
6 | include(LLCommon) | 6 | include(LLCommon) |
7 | include(UnixInstall) | ||
8 | 7 | ||
9 | include_directories( | 8 | include_directories( |
10 | ${LLCOMMON_INCLUDE_DIRS} | 9 | ${LLCOMMON_INCLUDE_DIRS} |
diff --git a/linden/indra/llvfs/lldir.cpp b/linden/indra/llvfs/lldir.cpp index af55593..0c93cbb 100644 --- a/linden/indra/llvfs/lldir.cpp +++ b/linden/indra/llvfs/lldir.cpp | |||
@@ -43,6 +43,7 @@ | |||
43 | #include "lldir.h" | 43 | #include "lldir.h" |
44 | #include "llerror.h" | 44 | #include "llerror.h" |
45 | #include "lluuid.h" | 45 | #include "lluuid.h" |
46 | #include "lltimer.h" | ||
46 | 47 | ||
47 | #if LL_WINDOWS | 48 | #if LL_WINDOWS |
48 | #include "lldir_win32.h" | 49 | #include "lldir_win32.h" |
@@ -192,8 +193,9 @@ const std::string &LLDir::getOSUserAppDir() const | |||
192 | return mOSUserAppDir; | 193 | return mOSUserAppDir; |
193 | } | 194 | } |
194 | 195 | ||
195 | const std::string &LLDir::getLindenUserDir() const | 196 | const std::string &LLDir::getLindenUserDir(bool empty_ok) const |
196 | { | 197 | { |
198 | llassert(empty_ok || !mLindenUserDir.empty()); | ||
197 | return mLindenUserDir; | 199 | return mLindenUserDir; |
198 | } | 200 | } |
199 | 201 | ||
@@ -247,7 +249,7 @@ std::string LLDir::buildSLOSCacheDir() const | |||
247 | } | 249 | } |
248 | else | 250 | else |
249 | { | 251 | { |
250 | res = getOSCacheDir() + mDirDelimiter + "Imprudence"; | 252 | res = getOSCacheDir() + mDirDelimiter + "ImprudenceExperimental"; |
251 | } | 253 | } |
252 | return res; | 254 | return res; |
253 | } | 255 | } |
@@ -294,6 +296,10 @@ const std::string LLDir::getSkinBaseDir() const | |||
294 | return dir; | 296 | return dir; |
295 | } | 297 | } |
296 | 298 | ||
299 | const std::string &LLDir::getLLPluginDir() const | ||
300 | { | ||
301 | return mLLPluginDir; | ||
302 | } | ||
297 | 303 | ||
298 | std::string LLDir::getExpandedFilename(ELLPath location, const std::string& filename) const | 304 | std::string LLDir::getExpandedFilename(ELLPath location, const std::string& filename) const |
299 | { | 305 | { |
@@ -465,6 +471,8 @@ std::string LLDir::getDirName(const std::string& filepath) const | |||
465 | 471 | ||
466 | std::string LLDir::getExtension(const std::string& filepath) const | 472 | std::string LLDir::getExtension(const std::string& filepath) const |
467 | { | 473 | { |
474 | if (filepath.empty()) | ||
475 | return std::string(); | ||
468 | std::string basename = getBaseFileName(filepath, false); | 476 | std::string basename = getBaseFileName(filepath, false); |
469 | std::size_t offset = basename.find_last_of('.'); | 477 | std::size_t offset = basename.find_last_of('.'); |
470 | std::string exten = (offset == std::string::npos || offset == 0) ? "" : basename.substr(offset+1); | 478 | std::string exten = (offset == std::string::npos || offset == 0) ? "" : basename.substr(offset+1); |
diff --git a/linden/indra/llvfs/lldir.h b/linden/indra/llvfs/lldir.h index 21dcf5b..766f351 100644 --- a/linden/indra/llvfs/lldir.h +++ b/linden/indra/llvfs/lldir.h | |||
@@ -80,6 +80,10 @@ class LLDir | |||
80 | virtual BOOL fileExists(const std::string &filename) const = 0; | 80 | virtual BOOL fileExists(const std::string &filename) const = 0; |
81 | 81 | ||
82 | const std::string findFile(const std::string &filename, const std::string searchPath1 = "", const std::string searchPath2 = "", const std::string searchPath3 = "") const; | 82 | const std::string findFile(const std::string &filename, const std::string searchPath1 = "", const std::string searchPath2 = "", const std::string searchPath3 = "") const; |
83 | |||
84 | virtual std::string getLLPluginLauncher() = 0; // full path and name for the plugin shell | ||
85 | virtual std::string getLLPluginFilename(std::string base_name) = 0; // full path and name to the plugin DSO for this base_name (i.e. 'FOO' -> '/bar/baz/libFOO.so') | ||
86 | |||
83 | const std::string &getExecutablePathAndName() const; // Full pathname of the executable | 87 | const std::string &getExecutablePathAndName() const; // Full pathname of the executable |
84 | const std::string &getAppName() const; // install directory under progams/ ie "SecondLife" | 88 | const std::string &getAppName() const; // install directory under progams/ ie "SecondLife" |
85 | const std::string &getExecutableDir() const; // Directory where the executable is located | 89 | const std::string &getExecutableDir() const; // Directory where the executable is located |
@@ -88,7 +92,7 @@ class LLDir | |||
88 | const std::string &getAppRODataDir() const; // Location of read-only data files | 92 | const std::string &getAppRODataDir() const; // Location of read-only data files |
89 | const std::string &getOSUserDir() const; // Location of the os-specific user dir | 93 | const std::string &getOSUserDir() const; // Location of the os-specific user dir |
90 | const std::string &getOSUserAppDir() const; // Location of the os-specific user app dir | 94 | const std::string &getOSUserAppDir() const; // Location of the os-specific user app dir |
91 | const std::string &getLindenUserDir() const; // Location of the Linden user dir. | 95 | const std::string &getLindenUserDir(bool empty_ok = false) const; // Location of the Linden user dir. |
92 | const std::string &getChatLogsDir() const; // Location of the chat logs dir. | 96 | const std::string &getChatLogsDir() const; // Location of the chat logs dir. |
93 | const std::string &getPerAccountChatLogsDir() const; // Location of the per account chat logs dir. | 97 | const std::string &getPerAccountChatLogsDir() const; // Location of the per account chat logs dir. |
94 | const std::string &getTempDir() const; // Common temporary directory | 98 | const std::string &getTempDir() const; // Common temporary directory |
@@ -100,6 +104,7 @@ class LLDir | |||
100 | const std::string &getUserSkinDir() const; // User-specified skin folder with user modifications. e.g. c:\documents and settings\username\application data\second life\skins\curskin | 104 | const std::string &getUserSkinDir() const; // User-specified skin folder with user modifications. e.g. c:\documents and settings\username\application data\second life\skins\curskin |
101 | const std::string &getDefaultSkinDir() const; // folder for default skin. e.g. c:\program files\second life\skins\default | 105 | const std::string &getDefaultSkinDir() const; // folder for default skin. e.g. c:\program files\second life\skins\default |
102 | const std::string getSkinBaseDir() const; // folder that contains all installed skins (not user modifications). e.g. c:\program files\second life\skins | 106 | const std::string getSkinBaseDir() const; // folder that contains all installed skins (not user modifications). e.g. c:\program files\second life\skins |
107 | const std::string &getLLPluginDir() const; // Directory containing plugins and plugin shell | ||
103 | 108 | ||
104 | // Expanded filename | 109 | // Expanded filename |
105 | std::string getExpandedFilename(ELLPath location, const std::string &filename) const; | 110 | std::string getExpandedFilename(ELLPath location, const std::string &filename) const; |
@@ -156,6 +161,7 @@ protected: | |||
156 | std::string mSkinDir; // Location for current skin info. | 161 | std::string mSkinDir; // Location for current skin info. |
157 | std::string mDefaultSkinDir; // Location for default skin info. | 162 | std::string mDefaultSkinDir; // Location for default skin info. |
158 | std::string mUserSkinDir; // Location for user-modified skin info. | 163 | std::string mUserSkinDir; // Location for user-modified skin info. |
164 | std::string mLLPluginDir; // Location for plugins and plugin shell | ||
159 | }; | 165 | }; |
160 | 166 | ||
161 | void dir_exists_or_crash(const std::string &dir_name); | 167 | void dir_exists_or_crash(const std::string &dir_name); |
diff --git a/linden/indra/llvfs/lldir_linux.cpp b/linden/indra/llvfs/lldir_linux.cpp index 8ff8c5d..5f1eabb 100644 --- a/linden/indra/llvfs/lldir_linux.cpp +++ b/linden/indra/llvfs/lldir_linux.cpp | |||
@@ -94,14 +94,10 @@ LLDir_Linux::LLDir_Linux() | |||
94 | mExecutablePathAndName = ""; | 94 | mExecutablePathAndName = ""; |
95 | mExecutableDir = tmp_str; | 95 | mExecutableDir = tmp_str; |
96 | mWorkingDir = tmp_str; | 96 | mWorkingDir = tmp_str; |
97 | #ifdef APP_RO_DATA_DIR | ||
98 | mAppRODataDir = APP_RO_DATA_DIR; | ||
99 | #else | ||
100 | mAppRODataDir = tmp_str; | 97 | mAppRODataDir = tmp_str; |
101 | #endif | ||
102 | mOSUserDir = getCurrentUserHome(tmp_str); | 98 | mOSUserDir = getCurrentUserHome(tmp_str); |
103 | mOSUserAppDir = ""; | 99 | mOSUserAppDir = ""; |
104 | mLindenUserDir = tmp_str; | 100 | mLindenUserDir = ""; |
105 | 101 | ||
106 | char path [32]; /* Flawfinder: ignore */ | 102 | char path [32]; /* Flawfinder: ignore */ |
107 | 103 | ||
@@ -128,6 +124,33 @@ LLDir_Linux::LLDir_Linux() | |||
128 | } | 124 | } |
129 | } | 125 | } |
130 | 126 | ||
127 | mLLPluginDir = mExecutableDir + mDirDelimiter + "llplugin"; | ||
128 | |||
129 | #ifdef APP_RO_DATA_DIR | ||
130 | const char* appRODataDir = APP_RO_DATA_DIR; | ||
131 | if(appRODataDir[0] == '/') | ||
132 | { | ||
133 | // We have a full path to the data directory. | ||
134 | mAppRODataDir = appRODataDir; | ||
135 | } | ||
136 | else if(appRODataDir[0] != '\0') | ||
137 | { | ||
138 | // We have a relative path to the data directory. Search | ||
139 | // for it in each potential install prefix containing the | ||
140 | // executable. | ||
141 | for(std::string prefix = getDirName(mExecutableDir); | ||
142 | !prefix.empty(); prefix = getDirName(prefix)) | ||
143 | { | ||
144 | std::string dir = prefix + "/" + appRODataDir; | ||
145 | if(fileExists(dir + "/app_settings")) | ||
146 | { | ||
147 | mAppRODataDir = dir; | ||
148 | break; | ||
149 | } | ||
150 | } | ||
151 | } | ||
152 | #endif | ||
153 | |||
131 | // *TODO: don't use /tmp, use $HOME/.secondlife/tmp or something. | 154 | // *TODO: don't use /tmp, use $HOME/.secondlife/tmp or something. |
132 | mTempDir = "/tmp"; | 155 | mTempDir = "/tmp"; |
133 | } | 156 | } |
@@ -370,3 +393,15 @@ BOOL LLDir_Linux::fileExists(const std::string &filename) const | |||
370 | } | 393 | } |
371 | } | 394 | } |
372 | 395 | ||
396 | |||
397 | /*virtual*/ std::string LLDir_Linux::getLLPluginLauncher() | ||
398 | { | ||
399 | return gDirUtilp->getExecutableDir() + gDirUtilp->getDirDelimiter() + | ||
400 | "SLPlugin"; | ||
401 | } | ||
402 | |||
403 | /*virtual*/ std::string LLDir_Linux::getLLPluginFilename(std::string base_name) | ||
404 | { | ||
405 | return gDirUtilp->getLLPluginDir() + gDirUtilp->getDirDelimiter() + | ||
406 | "lib" + base_name + ".so"; | ||
407 | } | ||
diff --git a/linden/indra/llvfs/lldir_linux.h b/linden/indra/llvfs/lldir_linux.h index 20b408f..8e94fb1 100644 --- a/linden/indra/llvfs/lldir_linux.h +++ b/linden/indra/llvfs/lldir_linux.h | |||
@@ -52,6 +52,9 @@ public: | |||
52 | virtual void getRandomFileInDir(const std::string &dirname, const std::string &mask, std::string &fname); | 52 | virtual void getRandomFileInDir(const std::string &dirname, const std::string &mask, std::string &fname); |
53 | /*virtual*/ BOOL fileExists(const std::string &filename) const; | 53 | /*virtual*/ BOOL fileExists(const std::string &filename) const; |
54 | 54 | ||
55 | /*virtual*/ std::string getLLPluginLauncher(); | ||
56 | /*virtual*/ std::string getLLPluginFilename(std::string base_name); | ||
57 | |||
55 | private: | 58 | private: |
56 | DIR *mDirp; | 59 | DIR *mDirp; |
57 | int mCurrentDirIndex; | 60 | int mCurrentDirIndex; |
diff --git a/linden/indra/llvfs/lldir_mac.cpp b/linden/indra/llvfs/lldir_mac.cpp index 6d5dcf3..6f0b037 100644 --- a/linden/indra/llvfs/lldir_mac.cpp +++ b/linden/indra/llvfs/lldir_mac.cpp | |||
@@ -173,7 +173,7 @@ LLDir_Mac::LLDir_Mac() | |||
173 | if (error == noErr) | 173 | if (error == noErr) |
174 | { | 174 | { |
175 | FSRefToLLString(&cacheDirRef, mOSCacheDir); | 175 | FSRefToLLString(&cacheDirRef, mOSCacheDir); |
176 | (void)CFCreateDirectory(&cacheDirRef, CFSTR("Imprudence"),NULL); | 176 | (void)CFCreateDirectory(&cacheDirRef, CFSTR("ImprudenceExperimental"),NULL); |
177 | } | 177 | } |
178 | 178 | ||
179 | // mOSUserAppDir | 179 | // mOSUserAppDir |
@@ -190,6 +190,8 @@ LLDir_Mac::LLDir_Mac() | |||
190 | } | 190 | } |
191 | 191 | ||
192 | mWorkingDir = getCurPath(); | 192 | mWorkingDir = getCurPath(); |
193 | |||
194 | mLLPluginDir = mAppRODataDir + mDirDelimiter + "llplugin"; | ||
193 | 195 | ||
194 | CFRelease(executableURLRef); | 196 | CFRelease(executableURLRef); |
195 | executableURLRef = NULL; | 197 | executableURLRef = NULL; |
@@ -388,4 +390,17 @@ BOOL LLDir_Mac::fileExists(const std::string &filename) const | |||
388 | } | 390 | } |
389 | 391 | ||
390 | 392 | ||
393 | /*virtual*/ std::string LLDir_Mac::getLLPluginLauncher() | ||
394 | { | ||
395 | return gDirUtilp->getAppRODataDir() + gDirUtilp->getDirDelimiter() + | ||
396 | "SLPlugin.app/Contents/MacOS/SLPlugin"; | ||
397 | } | ||
398 | |||
399 | /*virtual*/ std::string LLDir_Mac::getLLPluginFilename(std::string base_name) | ||
400 | { | ||
401 | return gDirUtilp->getLLPluginDir() + gDirUtilp->getDirDelimiter() + | ||
402 | base_name + ".dylib"; | ||
403 | } | ||
404 | |||
405 | |||
391 | #endif // LL_DARWIN | 406 | #endif // LL_DARWIN |
diff --git a/linden/indra/llvfs/lldir_mac.h b/linden/indra/llvfs/lldir_mac.h index 28d48a0..8be5d03 100644 --- a/linden/indra/llvfs/lldir_mac.h +++ b/linden/indra/llvfs/lldir_mac.h | |||
@@ -52,6 +52,9 @@ public: | |||
52 | virtual void getRandomFileInDir(const std::string &dirname, const std::string &ask, std::string &fname); | 52 | virtual void getRandomFileInDir(const std::string &dirname, const std::string &ask, std::string &fname); |
53 | virtual BOOL fileExists(const std::string &filename) const; | 53 | virtual BOOL fileExists(const std::string &filename) const; |
54 | 54 | ||
55 | /*virtual*/ std::string getLLPluginLauncher(); | ||
56 | /*virtual*/ std::string getLLPluginFilename(std::string base_name); | ||
57 | |||
55 | private: | 58 | private: |
56 | int mCurrentDirIndex; | 59 | int mCurrentDirIndex; |
57 | int mCurrentDirCount; | 60 | int mCurrentDirCount; |
diff --git a/linden/indra/llvfs/lldir_solaris.cpp b/linden/indra/llvfs/lldir_solaris.cpp index 9553d92..5132455 100644 --- a/linden/indra/llvfs/lldir_solaris.cpp +++ b/linden/indra/llvfs/lldir_solaris.cpp | |||
@@ -100,7 +100,7 @@ LLDir_Solaris::LLDir_Solaris() | |||
100 | mAppRODataDir = strdup(tmp_str); | 100 | mAppRODataDir = strdup(tmp_str); |
101 | mOSUserDir = getCurrentUserHome(tmp_str); | 101 | mOSUserDir = getCurrentUserHome(tmp_str); |
102 | mOSUserAppDir = ""; | 102 | mOSUserAppDir = ""; |
103 | mLindenUserDir = tmp_str; | 103 | mLindenUserDir = ""; |
104 | 104 | ||
105 | char path [LL_MAX_PATH]; /* Flawfinder: ignore */ | 105 | char path [LL_MAX_PATH]; /* Flawfinder: ignore */ |
106 | 106 | ||
@@ -161,6 +161,8 @@ LLDir_Solaris::LLDir_Solaris() | |||
161 | } | 161 | } |
162 | } | 162 | } |
163 | 163 | ||
164 | mLLPluginDir = mExecutableDir + mDirDelimiter + "llplugin"; | ||
165 | |||
164 | // *TODO: don't use /tmp, use $HOME/.secondlife/tmp or something. | 166 | // *TODO: don't use /tmp, use $HOME/.secondlife/tmp or something. |
165 | mTempDir = "/tmp"; | 167 | mTempDir = "/tmp"; |
166 | } | 168 | } |
diff --git a/linden/indra/llvfs/lldir_win32.cpp b/linden/indra/llvfs/lldir_win32.cpp index 19b9bcc..e5d6747 100644 --- a/linden/indra/llvfs/lldir_win32.cpp +++ b/linden/indra/llvfs/lldir_win32.cpp | |||
@@ -112,7 +112,7 @@ LLDir_Win32::LLDir_Win32() | |||
112 | } | 112 | } |
113 | else | 113 | else |
114 | { | 114 | { |
115 | fprintf(stderr, "Couldn't get APP path, assuming current directory!"); | 115 | LL_WARNS("AppInit") << "Couldn't get APP path, assuming current directory!\n" << LL_ENDL; |
116 | GetCurrentDirectory(MAX_PATH, w_str); | 116 | GetCurrentDirectory(MAX_PATH, w_str); |
117 | mExecutableDir = utf16str_to_utf8str(llutf16string(w_str)); | 117 | mExecutableDir = utf16str_to_utf8str(llutf16string(w_str)); |
118 | // Assume it's the current directory | 118 | // Assume it's the current directory |
@@ -143,6 +143,8 @@ LLDir_Win32::LLDir_Win32() | |||
143 | llwarns << "Couldn't create LL_PATH_CACHE dir " << mDefaultCacheDir << llendl; | 143 | llwarns << "Couldn't create LL_PATH_CACHE dir " << mDefaultCacheDir << llendl; |
144 | } | 144 | } |
145 | } | 145 | } |
146 | |||
147 | mLLPluginDir = mExecutableDir + mDirDelimiter + "llplugin"; | ||
146 | } | 148 | } |
147 | 149 | ||
148 | LLDir_Win32::~LLDir_Win32() | 150 | LLDir_Win32::~LLDir_Win32() |
@@ -378,6 +380,19 @@ BOOL LLDir_Win32::fileExists(const std::string &filename) const | |||
378 | } | 380 | } |
379 | 381 | ||
380 | 382 | ||
383 | /*virtual*/ std::string LLDir_Win32::getLLPluginLauncher() | ||
384 | { | ||
385 | return gDirUtilp->getExecutableDir() + gDirUtilp->getDirDelimiter() + | ||
386 | "SLPlugin.exe"; | ||
387 | } | ||
388 | |||
389 | /*virtual*/ std::string LLDir_Win32::getLLPluginFilename(std::string base_name) | ||
390 | { | ||
391 | return gDirUtilp->getLLPluginDir() + gDirUtilp->getDirDelimiter() + | ||
392 | base_name + ".dll"; | ||
393 | } | ||
394 | |||
395 | |||
381 | #if 0 | 396 | #if 0 |
382 | // Utility function to get version number of a DLL | 397 | // Utility function to get version number of a DLL |
383 | 398 | ||
diff --git a/linden/indra/llvfs/lldir_win32.h b/linden/indra/llvfs/lldir_win32.h index 8710ca5..9ef4d30 100644 --- a/linden/indra/llvfs/lldir_win32.h +++ b/linden/indra/llvfs/lldir_win32.h | |||
@@ -49,6 +49,9 @@ public: | |||
49 | /*virtual*/ void getRandomFileInDir(const std::string &dirname, const std::string &mask, std::string &fname); | 49 | /*virtual*/ void getRandomFileInDir(const std::string &dirname, const std::string &mask, std::string &fname); |
50 | /*virtual*/ BOOL fileExists(const std::string &filename) const; | 50 | /*virtual*/ BOOL fileExists(const std::string &filename) const; |
51 | 51 | ||
52 | /*virtual*/ std::string getLLPluginLauncher(); | ||
53 | /*virtual*/ std::string getLLPluginFilename(std::string base_name); | ||
54 | |||
52 | private: | 55 | private: |
53 | BOOL LLDir_Win32::getNextFileInDir(const llutf16string &dirname, const std::string &mask, std::string &fname, BOOL wrap); | 56 | BOOL LLDir_Win32::getNextFileInDir(const llutf16string &dirname, const std::string &mask, std::string &fname, BOOL wrap); |
54 | 57 | ||
diff --git a/linden/indra/llvfs/llpidlock.cpp b/linden/indra/llvfs/llpidlock.cpp index 93ac120..cb64428 100755 --- a/linden/indra/llvfs/llpidlock.cpp +++ b/linden/indra/llvfs/llpidlock.cpp | |||
@@ -39,6 +39,7 @@ | |||
39 | #include "llsdserialize.h" | 39 | #include "llsdserialize.h" |
40 | #include "llnametable.h" | 40 | #include "llnametable.h" |
41 | #include "llframetimer.h" | 41 | #include "llframetimer.h" |
42 | #include "llapp.h" | ||
42 | 43 | ||
43 | #if LL_WINDOWS //For windows platform. | 44 | #if LL_WINDOWS //For windows platform. |
44 | bool isProcessAlive(U32 pid) | 45 | bool isProcessAlive(U32 pid) |
@@ -60,7 +61,7 @@ class LLPidLockFile | |||
60 | public: | 61 | public: |
61 | LLPidLockFile( ) : | 62 | LLPidLockFile( ) : |
62 | mSaving(FALSE), mWaiting(FALSE), | 63 | mSaving(FALSE), mWaiting(FALSE), |
63 | mClean(TRUE), mPID(getpid()) | 64 | mClean(TRUE), mPID(LLApp::getPid()) |
64 | { | 65 | { |
65 | mLockName = gDirUtilp->getTempDir() + "/savelock"; | 66 | mLockName = gDirUtilp->getTempDir() + "/savelock"; |
66 | } | 67 | } |
diff --git a/linden/indra/llvfs/llpidlock.h b/linden/indra/llvfs/llpidlock.h index 42aee4d..6103599 100755 --- a/linden/indra/llvfs/llpidlock.h +++ b/linden/indra/llvfs/llpidlock.h | |||
@@ -39,10 +39,10 @@ class LLFrameTimer; | |||
39 | 39 | ||
40 | #if LL_WINDOWS //For windows platform. | 40 | #if LL_WINDOWS //For windows platform. |
41 | 41 | ||
42 | # define WIN32_LEAN_AND_MEAN | ||
43 | # include <winsock2.h> | ||
42 | #include <windows.h> | 44 | #include <windows.h> |
43 | 45 | ||
44 | #define getpid GetCurrentProcessId | ||
45 | |||
46 | #else //Everyone Else | 46 | #else //Everyone Else |
47 | 47 | ||
48 | #include <signal.h> | 48 | #include <signal.h> |
diff --git a/linden/indra/llvfs/llvfile.cpp b/linden/indra/llvfs/llvfile.cpp index 6b1563b..630975a 100644 --- a/linden/indra/llvfs/llvfile.cpp +++ b/linden/indra/llvfs/llvfile.cpp | |||
@@ -38,6 +38,7 @@ | |||
38 | #include "llthread.h" | 38 | #include "llthread.h" |
39 | #include "llstat.h" | 39 | #include "llstat.h" |
40 | #include "llvfs.h" | 40 | #include "llvfs.h" |
41 | #include "llfasttimer.h" | ||
41 | 42 | ||
42 | const S32 LLVFile::READ = 0x00000001; | 43 | const S32 LLVFile::READ = 0x00000001; |
43 | const S32 LLVFile::WRITE = 0x00000002; | 44 | const S32 LLVFile::WRITE = 0x00000002; |
diff --git a/linden/indra/llvfs/llvfs.cpp b/linden/indra/llvfs/llvfs.cpp index 7df2a81..654dfa1 100644 --- a/linden/indra/llvfs/llvfs.cpp +++ b/linden/indra/llvfs/llvfs.cpp | |||
@@ -47,6 +47,7 @@ | |||
47 | 47 | ||
48 | #include "llvfs.h" | 48 | #include "llvfs.h" |
49 | #include "llstl.h" | 49 | #include "llstl.h" |
50 | #include "lltimer.h" | ||
50 | 51 | ||
51 | const S32 FILE_BLOCK_MASK = 0x000003FF; // 1024-byte blocks | 52 | const S32 FILE_BLOCK_MASK = 0x000003FF; // 1024-byte blocks |
52 | const S32 VFS_CLEANUP_SIZE = 5242880; // how much space we free up in a single stroke | 53 | const S32 VFS_CLEANUP_SIZE = 5242880; // how much space we free up in a single stroke |
@@ -236,7 +237,7 @@ const S32 LLVFSFileBlock::SERIAL_SIZE = 34; | |||
236 | LLVFS::LLVFS(const std::string& index_filename, const std::string& data_filename, const BOOL read_only, const U32 presize, const BOOL remove_after_crash) | 237 | LLVFS::LLVFS(const std::string& index_filename, const std::string& data_filename, const BOOL read_only, const U32 presize, const BOOL remove_after_crash) |
237 | : mRemoveAfterCrash(remove_after_crash) | 238 | : mRemoveAfterCrash(remove_after_crash) |
238 | { | 239 | { |
239 | mDataMutex = new LLMutex(0); | 240 | mDataMutex = new LLMutex; |
240 | 241 | ||
241 | S32 i; | 242 | S32 i; |
242 | for (i = 0; i < VFSLOCK_COUNT; i++) | 243 | for (i = 0; i < VFSLOCK_COUNT; i++) |
@@ -583,8 +584,9 @@ LLVFS::LLVFS(const std::string& index_filename, const std::string& data_filename | |||
583 | } | 584 | } |
584 | } | 585 | } |
585 | 586 | ||
586 | LL_WARNS("VFS") << "Using index file " << mIndexFilename << LL_ENDL; | 587 | // Success! |
587 | LL_WARNS("VFS") << "Using data file " << mDataFilename << LL_ENDL; | 588 | LL_INFOS("VFS") << "Using index file " << mIndexFilename << LL_ENDL; |
589 | LL_INFOS("VFS") << "Using data file " << mDataFilename << LL_ENDL; | ||
588 | 590 | ||
589 | mValid = VFSVALID_OK; | 591 | mValid = VFSVALID_OK; |
590 | } | 592 | } |