Title: [153544] trunk/Tools
- Revision
- 153544
- Author
- [email protected]
- Date
- 2013-07-31 16:08:00 -0700 (Wed, 31 Jul 2013)
Log Message
[Windows] Winlauncher shouldn't look for Safari Install Directory
https://bugs.webkit.org/show_bug.cgi?id=119351
Reviewed by Darin Adler.
* win/DLLLauncher/DLLLauncherMain.cpp: Don't check registry for
the Safari install location. Instead, use the proper support
library path for the build architecture.
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (153543 => 153544)
--- trunk/Tools/ChangeLog 2013-07-31 21:09:52 UTC (rev 153543)
+++ trunk/Tools/ChangeLog 2013-07-31 23:08:00 UTC (rev 153544)
@@ -1,3 +1,14 @@
+2013-07-31 Brent Fulgham <[email protected]>
+
+ [Windows] Winlauncher shouldn't look for Safari Install Directory
+ https://bugs.webkit.org/show_bug.cgi?id=119351
+
+ Reviewed by Darin Adler.
+
+ * win/DLLLauncher/DLLLauncherMain.cpp: Don't check registry for
+ the Safari install location. Instead, use the proper support
+ library path for the build architecture.
+
2013-07-31 Bem Jones-Bey <[email protected]>
Update scripts to reference contributors.json instead of committers.py in messaging
Modified: trunk/Tools/win/DLLLauncher/DLLLauncherMain.cpp (153543 => 153544)
--- trunk/Tools/win/DLLLauncher/DLLLauncherMain.cpp 2013-07-31 21:09:52 UTC (rev 153543)
+++ trunk/Tools/win/DLLLauncher/DLLLauncherMain.cpp 2013-07-31 23:08:00 UTC (rev 153544)
@@ -95,11 +95,6 @@
return path;
}
-static wstring appleApplicationSupportDirectory()
-{
- return applePathFromRegistry(L"SOFTWARE\\Apple Inc.\\Apple Application Support", L"InstallDir");
-}
-
static wstring copyEnvironmentVariable(const wstring& variable)
{
DWORD length = ::GetEnvironmentVariableW(variable.c_str(), 0, 0);
@@ -126,26 +121,24 @@
return 1;
}
+static bool directoryExists(const wstring& path)
+{
+ DWORD attrib = ::GetFileAttributes(path.c_str());
+
+ return ((attrib != INVALID_FILE_ATTRIBUTES) && (attrib & FILE_ATTRIBUTE_DIRECTORY));
+}
+
static bool modifyPath(const wstring& programName)
{
- struct {
- wstring softwareSubKey;
- wstring productName;
- } products[] = {
- { L"Apple Inc.", L"Apple Application Support" },
- { L"Apple Computer, Inc.", L"Safari" },
- };
+#if defined(_M_X64)
+ static const wstring pathPrefix = L"C:\\Program Files\\Common Files\\Apple\\Apple Application Support";
+#else
+ static const wstring pathPrefix = L"C:\\Program Files (x86)\\Common Files\\Apple\\Apple Application Support";
+#endif
- wstring pathPrefix;
- for (size_t i = 0; i < _countof(products); ++i) {
- wstring directory = applePathFromRegistry(L"SOFTWARE\\" + products[i].softwareSubKey + L"\\" + products[i].productName, L"InstallDir");
- if (directory.empty()) {
- fatalError(programName, L"Failed to determine path to " + products[i].productName + L" directory.");
- return false;
- }
- if (i)
- pathPrefix += L';';
- pathPrefix += directory;
+ if (!directoryExists(pathPrefix)) {
+ fatalError(programName, L"Failed to determine path to AAS directory.");
+ return false;
}
if (prependPath(pathPrefix))
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes