DATA_DIR that use DllMain to find toplevel path only defined in ImageGTK.cpp, other two files affected still return invalid path ($PREFIX): FrameLoaderClientGtk.cpp and InspectorClientGtk.cpp while there should only one DllMain exists.
I found this trick http://stackoverflow.com/questions/2396328/get-hmodule-from-inside-a-dll and I use it like this (in FrameLoaderClientGtk.cpp): .... #ifdef _WIN32 # include <shlobj.h> # include <assert.h> static HMODULE GetThisDllHandle() { MEMORY_BASIC_INFORMATION info; size_t len = VirtualQueryEx(GetCurrentProcess(), (void*)GetThisDllHandle, &info, sizeof(info)); assert(len == sizeof(info)); return len ? (HMODULE)info.AllocationBase : NULL; } const gchar * get_webkit_datadir(void) { gchar *retval; retval = g_build_filename (g_win32_get_package_installation_directory_of_module (GetThisDllHandle()), "/share", NULL); return retval; } #undef DATA_DIR #define DATA_DIR get_webkit_datadir () #endif .... So far in Win32 it return the correct path, and it doesn't have "initialize once" limitation as DllMain()
Created attachment 79594 [details] fix DATADIR path Umm is this patch legal then?
Created attachment 127735 [details] Patch
Created attachment 127744 [details] Patch updated with Changelog entry
Comment on attachment 127744 [details] Patch updated with Changelog entry Great work.
Thanks pawel
Comment on attachment 127744 [details] Patch updated with Changelog entry Clearing flags on attachment: 127744 Committed r108206: <http://trac.webkit.org/changeset/108206>
All reviewed patches have been landed. Closing bug.