Commit 84098e54 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Added support for installing Gecko from build dir.

parent 52b78f05
...@@ -251,22 +251,25 @@ static BOOL install_from_registered_dir(void) ...@@ -251,22 +251,25 @@ static BOOL install_from_registered_dir(void)
static BOOL install_from_default_dir(void) static BOOL install_from_default_dir(void)
{ {
const char *data_dir; const char *data_dir, *subdir;
char *file_name; char *file_name;
int len; int len, len2;
BOOL ret; BOOL ret;
static const char gecko_dir[] = "/gecko/"; if((data_dir = wine_get_data_dir()))
subdir = "/gecko/";
data_dir = wine_get_data_dir(); else if((data_dir = wine_get_build_dir()))
if(!data_dir) return FALSE; subdir = "/../gecko/";
else
return FALSE;
len = strlen(data_dir); len = strlen(data_dir);
len2 = strlen(subdir);
file_name = mshtml_alloc(len+sizeof(gecko_dir)+sizeof(GECKO_FILE_NAME)); file_name = mshtml_alloc(len+len2+sizeof(GECKO_FILE_NAME));
memcpy(file_name, data_dir, len); memcpy(file_name, data_dir, len);
memcpy(file_name+len, gecko_dir, sizeof(gecko_dir)); memcpy(file_name+len, subdir, len2);
memcpy(file_name+len+sizeof(gecko_dir)-1, GECKO_FILE_NAME, sizeof(GECKO_FILE_NAME)); memcpy(file_name+len+len2, GECKO_FILE_NAME, sizeof(GECKO_FILE_NAME));
ret = install_from_unix_file(file_name); ret = install_from_unix_file(file_name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment