mirror of
https://github.com/reactos/reactos.git
synced 2024-10-03 07:53:49 +00:00
allow to use a local copy of wine_gecko.cab instead of having to download it every time
http://www.winehq.org/pipermail/wine-patches/2009-February/068889.html http://www.winehq.org/pipermail/wine-patches/2009-February/068891.html http://www.winehq.org/pipermail/wine-patches/2009-February/068890.html http://www.winehq.org/pipermail/wine-patches/2009-February/068892.html svn path=/trunk/; revision=39393
This commit is contained in:
parent
bafaf162a4
commit
75f1d09ba8
|
@ -279,6 +279,7 @@ HKCU,"Software\Microsoft\Internet Explorer\Main","Start Page",,"http://www.react
|
||||||
HKCU,"Software\Microsoft\Internet Explorer\Main","Search Page",,"http://www.google.com"
|
HKCU,"Software\Microsoft\Internet Explorer\Main","Search Page",,"http://www.google.com"
|
||||||
|
|
||||||
HKCU,Software\Wine\MSHTML,"GeckoUrl",,"http://links.reactos.org/links/winegecko.php"
|
HKCU,Software\Wine\MSHTML,"GeckoUrl",,"http://links.reactos.org/links/winegecko.php"
|
||||||
|
HKCU,Software\Wine\MSHTML,"GeckoCabDir",0x00020000,"%SystemRoot%\"
|
||||||
|
|
||||||
|
|
||||||
; EOF
|
; EOF
|
||||||
|
|
|
@ -705,3 +705,6 @@ modules\windows\vmx_svga.inf 6 o
|
||||||
modules\windows\kvmnet.sys 2 optional
|
modules\windows\kvmnet.sys 2 optional
|
||||||
modules\windows\kvmnet.inf 6 optional
|
modules\windows\kvmnet.inf 6 optional
|
||||||
|
|
||||||
|
; Gecko
|
||||||
|
modules\windows\wine_gecko-0.9.0.cab 4 optional
|
||||||
|
|
||||||
|
|
|
@ -54,6 +54,11 @@ static const WCHAR mshtml_keyW[] =
|
||||||
'\\','W','i','n','e',
|
'\\','W','i','n','e',
|
||||||
'\\','M','S','H','T','M','L',0};
|
'\\','M','S','H','T','M','L',0};
|
||||||
|
|
||||||
|
static const CHAR mshtml_keyA[] =
|
||||||
|
{'S','o','f','t','w','a','r','e',
|
||||||
|
'\\','W','i','n','e',
|
||||||
|
'\\','M','S','H','T','M','L',0};
|
||||||
|
|
||||||
static HWND install_dialog = NULL;
|
static HWND install_dialog = NULL;
|
||||||
static LPWSTR tmp_file_name = NULL;
|
static LPWSTR tmp_file_name = NULL;
|
||||||
static HANDLE tmp_file = INVALID_HANDLE_VALUE;
|
static HANDLE tmp_file = INVALID_HANDLE_VALUE;
|
||||||
|
@ -193,18 +198,21 @@ static BOOL install_from_unix_file(const char *file_name)
|
||||||
|
|
||||||
close(fd);
|
close(fd);
|
||||||
|
|
||||||
if(!wine_get_dos_file_name) {
|
if(!wine_get_dos_file_name)
|
||||||
wine_get_dos_file_name = (void*)GetProcAddress(GetModuleHandleW(kernel32W), "wine_get_dos_file_name");
|
wine_get_dos_file_name = (void*)GetProcAddress(GetModuleHandleW(kernel32W), "wine_get_dos_file_name");
|
||||||
if(!wine_get_dos_file_name) {
|
|
||||||
ERR("Could not get wine_get_dos_file_name function.\n");
|
if(wine_get_dos_file_name) { /* Wine UNIX mode */
|
||||||
|
dos_file_name = wine_get_dos_file_name(file_name);
|
||||||
|
if(!dos_file_name) {
|
||||||
|
ERR("Could not get dos file name of %s\n", debugstr_a(file_name));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
} else { /* ReactOS mode. */
|
||||||
|
UINT res;
|
||||||
dos_file_name = wine_get_dos_file_name(file_name);
|
WARN("Could not get wine_get_dos_file_name function, calling install_cab directly.\n");
|
||||||
if(!dos_file_name) {
|
res = MultiByteToWideChar( CP_ACP, 0, file_name, -1, 0, 0);
|
||||||
ERR("Could not get dos file name of %s\n", debugstr_a(file_name));
|
dos_file_name = heap_alloc (res*sizeof(WCHAR));
|
||||||
return FALSE;
|
MultiByteToWideChar( CP_ACP, 0, file_name, -1, dos_file_name, res);
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = install_cab(dos_file_name);
|
ret = install_cab(dos_file_name);
|
||||||
|
@ -216,23 +224,18 @@ static BOOL install_from_unix_file(const char *file_name)
|
||||||
static BOOL install_from_registered_dir(void)
|
static BOOL install_from_registered_dir(void)
|
||||||
{
|
{
|
||||||
char *file_name;
|
char *file_name;
|
||||||
HKEY hkey;
|
|
||||||
DWORD res, type, size = MAX_PATH;
|
DWORD res, type, size = MAX_PATH;
|
||||||
BOOL ret;
|
BOOL ret;
|
||||||
|
|
||||||
/* @@ Wine registry key: HKCU\Software\Wine\MSHTML */
|
|
||||||
res = RegOpenKeyW(HKEY_CURRENT_USER, mshtml_keyW, &hkey);
|
|
||||||
if(res != ERROR_SUCCESS)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
file_name = heap_alloc(size+sizeof(GECKO_FILE_NAME));
|
file_name = heap_alloc(size+sizeof(GECKO_FILE_NAME));
|
||||||
res = RegQueryValueExA(hkey, "GeckoCabDir", NULL, &type, (PBYTE)file_name, &size);
|
/* @@ Wine registry key: HKCU\Software\Wine\MSHTML */
|
||||||
|
res = RegGetValueA(HKEY_CURRENT_USER, mshtml_keyA, "GeckoCabDir", RRF_RT_ANY, &type, (PBYTE)file_name, &size);
|
||||||
if(res == ERROR_MORE_DATA) {
|
if(res == ERROR_MORE_DATA) {
|
||||||
file_name = heap_realloc(file_name, size+sizeof(GECKO_FILE_NAME));
|
file_name = heap_realloc(file_name, size+sizeof(GECKO_FILE_NAME));
|
||||||
res = RegQueryValueExA(hkey, "GeckoCabDir", NULL, &type, (PBYTE)file_name, &size);
|
res = RegGetValueA(HKEY_CURRENT_USER, mshtml_keyA, "GeckoCabDir", RRF_RT_ANY, &type, (PBYTE)file_name, &size);
|
||||||
}
|
}
|
||||||
RegCloseKey(hkey);
|
|
||||||
if(res != ERROR_SUCCESS || type != REG_SZ) {
|
if(res != ERROR_SUCCESS || (type != REG_SZ && type != REG_EXPAND_SZ)) {
|
||||||
heap_free(file_name);
|
heap_free(file_name);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -443,7 +446,7 @@ static LPWSTR get_url(void)
|
||||||
|
|
||||||
if(size > sizeof(httpW) && !memcmp(url, httpW, sizeof(httpW))) {
|
if(size > sizeof(httpW) && !memcmp(url, httpW, sizeof(httpW))) {
|
||||||
strcatW(url, v_formatW);
|
strcatW(url, v_formatW);
|
||||||
MultiByteToWideChar(CP_ACP, 0, GECKO_VERSION, -1, url+strlenW(url), -1);
|
MultiByteToWideChar(CP_ACP, 0, GECKO_VERSION, -1, url+strlenW(url), (size-strlenW(url)) / sizeof(WCHAR));
|
||||||
}
|
}
|
||||||
|
|
||||||
TRACE("Got URL %s\n", debugstr_w(url));
|
TRACE("Got URL %s\n", debugstr_w(url));
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
<include base="mshtml">.</include>
|
<include base="mshtml">.</include>
|
||||||
<include base="ReactOS">include/reactos/wine</include>
|
<include base="ReactOS">include/reactos/wine</include>
|
||||||
<define name="__WINESRC__" />
|
<define name="__WINESRC__" />
|
||||||
|
<define name="_WIN32_WINNT">0x600</define>
|
||||||
<file>conpoint.c</file>
|
<file>conpoint.c</file>
|
||||||
<file>dispex.c</file>
|
<file>dispex.c</file>
|
||||||
<file>editor.c</file>
|
<file>editor.c</file>
|
||||||
|
|
Loading…
Reference in a new issue