[APPWIZ]
[reactos.git] / reactos / dll / cpl / appwiz / addons.c
index 02b8514..fa728cd 100644 (file)
@@ -16,8 +16,7 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <config.h>
-#include <wine/port.h>
+#include "appwiz.h"
 
 #include <stdio.h>
 
 # include <unistd.h>
 #endif
 
-#define COBJMACROS
-#define NONAMELESSUNION
-#define NONAMELESSSTRUCT
-
-#include <windef.h>
-#include <winbase.h>
 #include <msi.h>
 
-#include "appwiz.h"
-
-#include <wine/debug.h>
-
-WINE_DEFAULT_DEBUG_CHANNEL(appwiz);
-
-#define GECKO_VERSION "1.9"
+#define GECKO_VERSION "2.24"
 
 #ifdef __i386__
 #define ARCH_STRING "x86"
-#define GECKO_SHA "cadf123dd7c4cedf2b22c066b6259e8649ac2b40"
+#define GECKO_SHA "f6984567b24fef7b0be79837e04d3a913af1a88c"
 #else
 #define ARCH_STRING ""
 #define GECKO_SHA "???"
@@ -73,7 +60,7 @@ static const addon_info_t *addon;
 
 static HWND install_dialog = NULL;
 
-static WCHAR GeckoUrl[] = L"http://www.reactos.org/wine-gecko.php";
+static WCHAR GeckoUrl[] = L"http://dl.dropboxusercontent.com/u/743491/ReactOS/wine_gecko-2.24-x86.msi";
 
 /* SHA definitions are copied from advapi32. They aren't available in headers. */
 
@@ -227,6 +214,18 @@ static enum install_res install_from_registered_dir(void)
         return INSTALL_FAILED;
     }
 
+    if (type == REG_EXPAND_SZ)
+    {
+        size = ExpandEnvironmentStringsA(package_dir, NULL, 0);
+        if (size)
+        {
+            char* buf = heap_alloc(size + sizeof(addon->file_name));
+            ExpandEnvironmentStringsA(package_dir, buf, size);
+            heap_free(package_dir);
+            package_dir = buf;
+        }
+    }
+
     TRACE("Trying %s/%s\n", debugstr_a(package_dir), debugstr_a(addon->file_name));
 
     ret = install_from_unix_file(package_dir, "", addon->file_name);