kernel32/tests: Ensure that pipe tests read the full pipe content.
[wine/wine-gecko.git] / dlls / appwiz.cpl / addons.c
blob1f219d52e9e9b3cd4341d7d8f785fc80d0653754
1 /*
2 * Copyright 2006-2010 Jacek Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #include "config.h"
20 #include "wine/port.h"
22 #include <stdarg.h>
23 #include <fcntl.h>
24 #include <stdio.h>
25 #include <errno.h>
26 #ifdef HAVE_UNISTD_H
27 # include <unistd.h>
28 #endif
30 #define COBJMACROS
31 #define NONAMELESSUNION
32 #define NONAMELESSSTRUCT
34 #include "windef.h"
35 #include "winbase.h"
36 #include "winuser.h"
37 #include "cpl.h"
38 #include "winreg.h"
39 #include "ole2.h"
40 #include "commctrl.h"
41 #include "advpub.h"
42 #include "wininet.h"
43 #include "shellapi.h"
44 #include "urlmon.h"
45 #include "msi.h"
47 #include "appwiz.h"
48 #include "res.h"
50 #include "wine/debug.h"
51 #include "wine/library.h"
53 WINE_DEFAULT_DEBUG_CHANNEL(appwizcpl);
55 #define GECKO_VERSION "2.24"
57 #ifdef __i386__
58 #define ARCH_STRING "x86"
59 #define GECKO_SHA "b4923c0565e6cbd20075a0d4119ce3b48424f962"
60 #elif defined(__x86_64__)
61 #define ARCH_STRING "x86_64"
62 #define GECKO_SHA "da65fb99a53d87c831030ec8787e31d797f60e60"
63 #else
64 #define ARCH_STRING ""
65 #define GECKO_SHA "???"
66 #endif
68 #define MONO_VERSION "4.5.2"
69 #define MONO_SHA "73d6b8aa7a8921f43b22c6d930e8d7e421058187"
71 typedef struct {
72 const char *version;
73 const char *file_name;
74 const char *subdir_name;
75 const char *sha;
76 const char *url_default;
77 const char *config_key;
78 const char *url_config_key;
79 const char *dir_config_key;
80 LPCWSTR dialog_template;
81 } addon_info_t;
83 static const addon_info_t addons_info[] = {
85 GECKO_VERSION,
86 "wine_gecko-" GECKO_VERSION "-" ARCH_STRING ".msi",
87 "gecko",
88 GECKO_SHA,
89 "http://source.winehq.org/winegecko.php",
90 "MSHTML", "GeckoUrl", "GeckoCabDir",
91 MAKEINTRESOURCEW(ID_DWL_GECKO_DIALOG)
94 MONO_VERSION,
95 "wine-mono-" MONO_VERSION ".msi",
96 "mono",
97 MONO_SHA,
98 "http://source.winehq.org/winemono.php",
99 "Dotnet", "MonoUrl", "MonoCabDir",
100 MAKEINTRESOURCEW(ID_DWL_MONO_DIALOG)
104 static const addon_info_t *addon;
106 static HWND install_dialog = NULL;
107 static LPWSTR url = NULL;
108 static IBinding *dwl_binding;
109 static WCHAR *msi_file;
111 static WCHAR * (CDECL *p_wine_get_dos_file_name)(const char*);
112 static const WCHAR kernel32_dllW[] = {'k','e','r','n','e','l','3','2','.','d','l','l',0};
115 /* SHA definitions are copied from advapi32. They aren't available in headers. */
117 typedef struct {
118 ULONG Unknown[6];
119 ULONG State[5];
120 ULONG Count[2];
121 UCHAR Buffer[64];
122 } SHA_CTX, *PSHA_CTX;
124 void WINAPI A_SHAInit(PSHA_CTX);
125 void WINAPI A_SHAUpdate(PSHA_CTX,const unsigned char*,UINT);
126 void WINAPI A_SHAFinal(PSHA_CTX,PULONG);
128 static BOOL sha_check(const WCHAR *file_name)
130 const unsigned char *file_map;
131 HANDLE file, map;
132 ULONG sha[5];
133 char buf[2*sizeof(sha)+1];
134 SHA_CTX ctx;
135 DWORD size, i;
137 file = CreateFileW(file_name, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_READONLY, NULL);
138 if(file == INVALID_HANDLE_VALUE) {
139 WARN("Could not open file: %u\n", GetLastError());
140 return FALSE;
143 size = GetFileSize(file, NULL);
145 map = CreateFileMappingW(file, NULL, PAGE_READONLY, 0, 0, NULL);
146 CloseHandle(file);
147 if(!map)
148 return FALSE;
150 file_map = MapViewOfFile(map, FILE_MAP_READ, 0, 0, 0);
151 CloseHandle(map);
152 if(!file_map)
153 return FALSE;
155 A_SHAInit(&ctx);
156 A_SHAUpdate(&ctx, file_map, size);
157 A_SHAFinal(&ctx, sha);
159 UnmapViewOfFile(file_map);
161 for(i=0; i < sizeof(sha); i++)
162 sprintf(buf + i*2, "%02x", *((unsigned char*)sha+i));
164 if(strcmp(buf, addon->sha)) {
165 WARN("Got %s, expected %s\n", buf, addon->sha);
166 return FALSE;
169 return TRUE;
172 static void set_status(DWORD id)
174 HWND status = GetDlgItem(install_dialog, ID_DWL_STATUS);
175 WCHAR buf[64];
177 LoadStringW(hInst, id, buf, sizeof(buf)/sizeof(WCHAR));
178 SendMessageW(status, WM_SETTEXT, 0, (LPARAM)buf);
181 enum install_res {
182 INSTALL_OK = 0,
183 INSTALL_FAILED,
184 INSTALL_NEXT,
187 static enum install_res install_file(const WCHAR *file_name)
189 ULONG res;
191 res = MsiInstallProductW(file_name, NULL);
192 if(res != ERROR_SUCCESS) {
193 ERR("MsiInstallProduct failed: %u\n", res);
194 return INSTALL_FAILED;
197 return INSTALL_OK;
200 static enum install_res install_from_unix_file(const char *dir, const char *subdir, const char *file_name)
202 LPWSTR dos_file_name;
203 char *file_path;
204 int fd, len;
205 enum install_res ret;
207 len = strlen(dir);
208 file_path = heap_alloc(len+strlen(subdir)+strlen(file_name)+3);
209 if(!file_path)
210 return INSTALL_FAILED;
212 memcpy(file_path, dir, len);
213 if(len && file_path[len-1] != '/' && file_path[len-1] != '\\')
214 file_path[len++] = '/';
215 if(*subdir) {
216 strcpy(file_path+len, subdir);
217 len += strlen(subdir);
218 file_path[len++] = '/';
220 strcpy(file_path+len, file_name);
222 fd = open(file_path, O_RDONLY);
223 if(fd == -1) {
224 TRACE("%s not found\n", debugstr_a(file_path));
225 heap_free(file_path);
226 return INSTALL_NEXT;
229 close(fd);
231 if(p_wine_get_dos_file_name) { /* Wine UNIX mode */
232 dos_file_name = p_wine_get_dos_file_name(file_path);
233 if(!dos_file_name) {
234 ERR("Could not get dos file name of %s\n", debugstr_a(file_path));
235 heap_free(file_path);
236 return INSTALL_FAILED;
238 } else { /* Windows mode */
239 UINT res;
240 WARN("Could not get wine_get_dos_file_name function, calling install_cab directly.\n");
241 res = MultiByteToWideChar( CP_ACP, 0, file_path, -1, 0, 0);
242 dos_file_name = heap_alloc (res*sizeof(WCHAR));
243 MultiByteToWideChar( CP_ACP, 0, file_path, -1, dos_file_name, res);
246 heap_free(file_path);
248 ret = install_file(dos_file_name);
250 heap_free(dos_file_name);
251 return ret;
254 static HKEY open_config_key(void)
256 HKEY hkey, ret;
257 DWORD res;
259 static const WCHAR wine_keyW[] = {'S','o','f','t','w','a','r','e','\\','W','i','n','e',0};
261 /* @@ Wine registry key: HKCU\Software\Wine\$config_key */
262 res = RegOpenKeyW(HKEY_CURRENT_USER, wine_keyW, &hkey);
263 if(res != ERROR_SUCCESS)
264 return NULL;
266 res = RegOpenKeyA(hkey, addon->config_key, &ret);
267 RegCloseKey(hkey);
268 return res == ERROR_SUCCESS ? ret : NULL;
271 static enum install_res install_from_registered_dir(void)
273 char *package_dir;
274 HKEY hkey;
275 DWORD res, type, size = MAX_PATH;
276 enum install_res ret;
278 hkey = open_config_key();
279 if(!hkey)
280 return INSTALL_NEXT;
282 package_dir = heap_alloc(size);
283 res = RegGetValueA(hkey, NULL, addon->dir_config_key, RRF_RT_ANY, &type, (PBYTE)package_dir, &size);
284 if(res == ERROR_MORE_DATA) {
285 package_dir = heap_realloc(package_dir, size);
286 res = RegGetValueA(hkey, NULL, addon->dir_config_key, RRF_RT_ANY, &type, (PBYTE)package_dir, &size);
288 RegCloseKey(hkey);
289 if(res == ERROR_FILE_NOT_FOUND) {
290 heap_free(package_dir);
291 return INSTALL_NEXT;
292 } else if(res != ERROR_SUCCESS || (type != REG_SZ && type != REG_EXPAND_SZ)) {
293 heap_free(package_dir);
294 return INSTALL_FAILED;
297 TRACE("Trying %s/%s\n", debugstr_a(package_dir), debugstr_a(addon->file_name));
299 ret = install_from_unix_file(package_dir, "", addon->file_name);
301 heap_free(package_dir);
302 return ret;
305 static enum install_res install_from_default_dir(void)
307 const char *data_dir, *package_dir;
308 char *dir_buf = NULL;
309 int len;
310 BOOL ret;
312 if((data_dir = wine_get_data_dir())) {
313 package_dir = data_dir;
314 }else if((data_dir = wine_get_build_dir())) {
315 len = strlen(data_dir);
316 dir_buf = heap_alloc(len + sizeof("/../"));
317 memcpy(dir_buf, data_dir, len);
318 strcpy(dir_buf+len, "/../");
319 package_dir = dir_buf;
320 }else {
321 return INSTALL_NEXT;
324 ret = install_from_unix_file(package_dir, addon->subdir_name, addon->file_name);
325 heap_free(dir_buf);
327 if (ret == INSTALL_NEXT)
328 ret = install_from_unix_file(INSTALL_DATADIR "/wine/", addon->subdir_name, addon->file_name);
329 if (ret == INSTALL_NEXT && strcmp(INSTALL_DATADIR, "/usr/share"))
330 ret = install_from_unix_file("/usr/share/wine/", addon->subdir_name, addon->file_name);
331 return ret;
334 static WCHAR *get_cache_file_name(BOOL ensure_exists)
336 const char *home_dir = NULL, *xdg_cache_dir;
337 size_t len, size = strlen(addon->file_name) + 7; /* strlen("/wine/"), '\0' */
338 char *cache_file_name;
339 WCHAR *ret;
341 /* non-Wine (eg. Windows) cache is currently not supported */
342 if(!p_wine_get_dos_file_name)
343 return NULL;
345 xdg_cache_dir = getenv("XDG_CACHE_HOME");
346 if(xdg_cache_dir && *xdg_cache_dir) {
347 size += strlen(xdg_cache_dir);
348 }else {
349 home_dir = getenv("HOME");
350 if(!home_dir)
351 return NULL;
353 size += strlen(home_dir) + 8; /* strlen("/.cache/") */
356 cache_file_name = heap_alloc(size);
357 if(!cache_file_name)
358 return NULL;
360 if(xdg_cache_dir && *xdg_cache_dir) {
361 len = strlen(xdg_cache_dir);
362 if(len > 1 && xdg_cache_dir[len-1] == '/')
363 len--;
364 memcpy(cache_file_name, xdg_cache_dir, len);
365 cache_file_name[len] = 0;
366 }else {
367 len = strlen(home_dir);
368 memcpy(cache_file_name, home_dir, len);
369 strcpy(cache_file_name+len, "/.cache");
370 len += 7;
373 if(ensure_exists && mkdir(cache_file_name, 0777) && errno != EEXIST) {
374 WARN("%s does not exist and could not be created: %s\n", cache_file_name, strerror(errno));
375 heap_free(cache_file_name);
376 return NULL;
379 strcpy(cache_file_name+len, "/wine");
380 len += 5;
382 if(ensure_exists && mkdir(cache_file_name, 0777) && errno != EEXIST) {
383 WARN("%s does not exist and could not be created: %s\n", cache_file_name, strerror(errno));
384 return NULL;
387 cache_file_name[len++] = '/';
388 strcpy(cache_file_name+len, addon->file_name);
389 ret = p_wine_get_dos_file_name(cache_file_name);
391 TRACE("%s -> %s\n", cache_file_name, debugstr_w(ret));
393 heap_free(cache_file_name);
394 return ret;
397 static enum install_res install_from_cache(void)
399 WCHAR *cache_file_name;
400 enum install_res res;
402 cache_file_name = get_cache_file_name(FALSE);
403 if(!cache_file_name)
404 return INSTALL_NEXT;
406 if(!sha_check(cache_file_name)) {
407 WARN("could not validate check sum\n");
408 DeleteFileW(cache_file_name);
409 heap_free(cache_file_name);
410 return INSTALL_NEXT;
413 res = install_file(cache_file_name);
414 heap_free(cache_file_name);
415 return res;
418 static HRESULT WINAPI InstallCallback_QueryInterface(IBindStatusCallback *iface,
419 REFIID riid, void **ppv)
421 if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IBindStatusCallback, riid)) {
422 *ppv = iface;
423 return S_OK;
426 return E_INVALIDARG;
429 static ULONG WINAPI InstallCallback_AddRef(IBindStatusCallback *iface)
431 return 2;
434 static ULONG WINAPI InstallCallback_Release(IBindStatusCallback *iface)
436 return 1;
439 static HRESULT WINAPI InstallCallback_OnStartBinding(IBindStatusCallback *iface,
440 DWORD dwReserved, IBinding *pib)
442 set_status(IDS_DOWNLOADING);
444 IBinding_AddRef(pib);
445 dwl_binding = pib;
447 return S_OK;
450 static HRESULT WINAPI InstallCallback_GetPriority(IBindStatusCallback *iface,
451 LONG *pnPriority)
453 return E_NOTIMPL;
456 static HRESULT WINAPI InstallCallback_OnLowResource(IBindStatusCallback *iface,
457 DWORD dwReserved)
459 return E_NOTIMPL;
462 static HRESULT WINAPI InstallCallback_OnProgress(IBindStatusCallback *iface, ULONG ulProgress,
463 ULONG ulProgressMax, ULONG ulStatusCode, LPCWSTR szStatusText)
465 HWND progress = GetDlgItem(install_dialog, ID_DWL_PROGRESS);
467 if(ulProgressMax)
468 SendMessageW(progress, PBM_SETRANGE32, 0, ulProgressMax);
469 if(ulProgress)
470 SendMessageW(progress, PBM_SETPOS, ulProgress, 0);
472 return S_OK;
475 static HRESULT WINAPI InstallCallback_OnStopBinding(IBindStatusCallback *iface,
476 HRESULT hresult, LPCWSTR szError)
478 if(dwl_binding) {
479 IBinding_Release(dwl_binding);
480 dwl_binding = NULL;
483 if(FAILED(hresult)) {
484 if(hresult == E_ABORT)
485 TRACE("Binding aborted\n");
486 else
487 ERR("Binding failed %08x\n", hresult);
488 return S_OK;
491 if(!msi_file) {
492 ERR("No MSI file\n");
493 return E_FAIL;
496 set_status(IDS_INSTALLING);
497 EnableWindow(GetDlgItem(install_dialog, IDCANCEL), 0);
499 if(sha_check(msi_file)) {
500 WCHAR *cache_file_name;
502 install_file(msi_file);
504 cache_file_name = get_cache_file_name(TRUE);
505 if(cache_file_name) {
506 MoveFileW(msi_file, cache_file_name);
507 heap_free(cache_file_name);
509 }else {
510 WCHAR message[256];
512 if(LoadStringW(hInst, IDS_INVALID_SHA, message, sizeof(message)/sizeof(WCHAR)))
513 MessageBoxW(NULL, message, NULL, MB_ICONERROR);
516 DeleteFileW(msi_file);
517 heap_free(msi_file);
518 msi_file = NULL;
520 EndDialog(install_dialog, 0);
521 return S_OK;
524 static HRESULT WINAPI InstallCallback_GetBindInfo(IBindStatusCallback *iface,
525 DWORD* grfBINDF, BINDINFO* pbindinfo)
527 TRACE("()\n");
529 *grfBINDF = BINDF_ASYNCHRONOUS;
530 return S_OK;
533 static HRESULT WINAPI InstallCallback_OnDataAvailable(IBindStatusCallback *iface, DWORD grfBSCF,
534 DWORD dwSize, FORMATETC* pformatetc, STGMEDIUM* pstgmed)
536 if(!msi_file) {
537 msi_file = heap_strdupW(pstgmed->u.lpszFileName);
538 TRACE("got file name %s\n", debugstr_w(msi_file));
541 return S_OK;
544 static HRESULT WINAPI InstallCallback_OnObjectAvailable(IBindStatusCallback *iface,
545 REFIID riid, IUnknown* punk)
547 ERR("\n");
548 return E_NOTIMPL;
551 static const IBindStatusCallbackVtbl InstallCallbackVtbl = {
552 InstallCallback_QueryInterface,
553 InstallCallback_AddRef,
554 InstallCallback_Release,
555 InstallCallback_OnStartBinding,
556 InstallCallback_GetPriority,
557 InstallCallback_OnLowResource,
558 InstallCallback_OnProgress,
559 InstallCallback_OnStopBinding,
560 InstallCallback_GetBindInfo,
561 InstallCallback_OnDataAvailable,
562 InstallCallback_OnObjectAvailable
565 static IBindStatusCallback InstallCallback = { &InstallCallbackVtbl };
567 static void append_url_params( WCHAR *url )
569 static const WCHAR arch_formatW[] = {'?','a','r','c','h','='};
570 static const WCHAR v_formatW[] = {'&','v','='};
571 DWORD size = INTERNET_MAX_URL_LENGTH * sizeof(WCHAR);
572 DWORD len = strlenW(url);
574 memcpy(url+len, arch_formatW, sizeof(arch_formatW));
575 len += sizeof(arch_formatW)/sizeof(WCHAR);
576 len += MultiByteToWideChar(CP_ACP, 0, ARCH_STRING, sizeof(ARCH_STRING),
577 url+len, size/sizeof(WCHAR)-len)-1;
578 memcpy(url+len, v_formatW, sizeof(v_formatW));
579 len += sizeof(v_formatW)/sizeof(WCHAR);
580 MultiByteToWideChar(CP_ACP, 0, addon->version, -1, url+len, size/sizeof(WCHAR)-len);
583 static LPWSTR get_url(void)
585 DWORD size = INTERNET_MAX_URL_LENGTH*sizeof(WCHAR);
586 WCHAR *url, *config_key;
587 HKEY hkey;
588 DWORD res, type;
589 DWORD returned_size;
591 static const WCHAR httpW[] = {'h','t','t','p'};
593 url = heap_alloc(size);
594 returned_size = size;
596 hkey = open_config_key();
597 if (hkey)
599 config_key = heap_strdupAtoW(addon->url_config_key);
600 res = RegQueryValueExW(hkey, config_key, NULL, &type, (LPBYTE)url, &returned_size);
601 heap_free(config_key);
602 RegCloseKey(hkey);
603 if(res == ERROR_SUCCESS && type == REG_SZ) goto found;
606 MultiByteToWideChar( CP_ACP, 0, addon->url_default, -1, url, size / sizeof(WCHAR) );
608 found:
609 if (returned_size > sizeof(httpW) && !memcmp(url, httpW, sizeof(httpW))) append_url_params( url );
611 TRACE("Got URL %s\n", debugstr_w(url));
612 return url;
615 static BOOL start_download(void)
617 IBindCtx *bind_ctx;
618 IMoniker *mon;
619 IUnknown *tmp;
620 HRESULT hres;
622 hres = CreateURLMoniker(NULL, url, &mon);
623 if(FAILED(hres))
624 return FALSE;
626 hres = CreateAsyncBindCtx(0, &InstallCallback, NULL, &bind_ctx);
627 if(SUCCEEDED(hres)) {
628 hres = IMoniker_BindToStorage(mon, bind_ctx, NULL, &IID_IUnknown, (void**)&tmp);
629 IBindCtx_Release(bind_ctx);
631 IMoniker_Release(mon);
632 if(FAILED(hres))
633 return FALSE;
635 if(tmp)
636 IUnknown_Release(tmp);
637 return TRUE;
640 static void run_winebrowser(const WCHAR *url)
642 PROCESS_INFORMATION pi;
643 STARTUPINFOW si;
644 WCHAR app[MAX_PATH];
645 LONG len, url_len;
646 WCHAR *args;
647 BOOL ret;
649 static const WCHAR winebrowserW[] = {'\\','w','i','n','e','b','r','o','w','s','e','r','.','e','x','e',0};
651 url_len = strlenW(url);
653 len = GetSystemDirectoryW(app, MAX_PATH-sizeof(winebrowserW)/sizeof(WCHAR));
654 memcpy(app+len, winebrowserW, sizeof(winebrowserW));
655 len += sizeof(winebrowserW)/sizeof(WCHAR) -1;
657 args = heap_alloc((len+1+url_len)*sizeof(WCHAR));
658 if(!args)
659 return;
661 memcpy(args, app, len*sizeof(WCHAR));
662 args[len++] = ' ';
663 memcpy(args+len, url, (url_len+1) * sizeof(WCHAR));
665 TRACE("starting %s\n", debugstr_w(args));
667 memset(&si, 0, sizeof(si));
668 si.cb = sizeof(si);
669 ret = CreateProcessW(app, args, NULL, NULL, FALSE, DETACHED_PROCESS, NULL, NULL, &si, &pi);
670 heap_free(args);
671 if (ret) {
672 CloseHandle(pi.hThread);
673 CloseHandle(pi.hProcess);
677 static INT_PTR CALLBACK installer_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
679 switch(msg) {
680 case WM_INITDIALOG:
681 ShowWindow(GetDlgItem(hwnd, ID_DWL_PROGRESS), SW_HIDE);
682 install_dialog = hwnd;
683 return TRUE;
685 case WM_NOTIFY:
686 switch (((NMHDR *)lParam)->code)
688 case NM_CLICK:
689 case NM_RETURN:
690 if (wParam == ID_DWL_STATUS)
691 run_winebrowser(((NMLINK*)lParam)->item.szUrl);
692 break;
694 break;
696 case WM_COMMAND:
697 switch(wParam) {
698 case IDCANCEL:
699 if(dwl_binding)
700 IBinding_Abort(dwl_binding);
701 EndDialog(hwnd, 0);
702 return FALSE;
704 case ID_DWL_INSTALL:
705 ShowWindow(GetDlgItem(hwnd, ID_DWL_PROGRESS), SW_SHOW);
706 EnableWindow(GetDlgItem(hwnd, ID_DWL_INSTALL), 0);
707 if(!start_download())
708 EndDialog(install_dialog, 0);
712 return FALSE;
715 BOOL install_addon(addon_t addon_type)
717 if(!*ARCH_STRING)
718 return FALSE;
720 addon = addons_info+addon_type;
722 p_wine_get_dos_file_name = (void*)GetProcAddress(GetModuleHandleW(kernel32_dllW), "wine_get_dos_file_name");
725 * Try to find addon .msi file in following order:
726 * - directory stored in $dir_config_key value of HKCU/Wine/Software/$config_key key
727 * - $datadir/$addon_subdir/
728 * - $INSTALL_DATADIR/wine/$addon_subdir/
729 * - /usr/share/wine/$addon_subdir/
730 * - download from URL stored in $url_config_key value of HKCU/Wine/Software/$config_key key
732 if (install_from_registered_dir() == INSTALL_NEXT
733 && install_from_default_dir() == INSTALL_NEXT
734 && install_from_cache() == INSTALL_NEXT
735 && (url = get_url()))
736 DialogBoxW(hInst, addon->dialog_template, 0, installer_proc);
738 heap_free(url);
739 url = NULL;
740 return TRUE;