Commit 280ec399 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

appwiz.cpl: Added Gecko installer based on mshtml code.

parent 79bab499
......@@ -2,6 +2,7 @@
* Add/Remove Programs English resources
*
* Copyright 2001-2002, 2008 Owen Rudge
* Copyright 2005-2006 Jacek Caban
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -41,6 +42,12 @@ STRINGTABLE
IDS_MODIFY_REMOVE, "&Modify/Remove..."
}
STRINGTABLE
{
IDS_DOWNLOADING "Downloading..."
IDS_INSTALLING "Installing..."
}
IDD_MAIN DIALOG 0, 0, 320, 220
STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Install/Uninstall"
......@@ -82,3 +89,18 @@ FONT 8, "MS Shell Dlg"
CONTROL "", IDC_INFO_UPDATES, "static", SS_LEFT | WS_CHILD | WS_VISIBLE, 104, 90, 136, 8
CONTROL "", IDC_INFO_COMMENTS, "static", SS_LEFT | WS_CHILD | WS_VISIBLE, 104, 100, 136, 8
}
ID_DWL_DIALOG DIALOG 0, 0, 260, 95
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Wine Gecko Installer"
FONT 8, "MS Shell Dlg"
{
LTEXT "Wine could not find a Gecko package which is needed for applications embedding HTML " \
"to work correctly. Wine can automatically download and install it for you.\n\n" \
"Note: it is recommended to use your distribution's packages instead. " \
"See http://wiki.winehq.org/Gecko for details.",
ID_DWL_STATUS, 10, 10, 240, 50, SS_LEFT
CONTROL "Progress", ID_DWL_PROGRESS, PROGRESS_CLASSA, WS_BORDER|PBS_SMOOTH, 10, 40, 240, 12
DEFPUSHBUTTON "&Install", ID_DWL_INSTALL, 200, 70, 50, 15, WS_GROUP | WS_TABSTOP
PUSHBUTTON "&Cancel", IDCANCEL, 140, 70, 50, 15, WS_GROUP | WS_TABSTOP
}
MODULE = appwiz.cpl
IMPORTS = comctl32 advapi32 shell32 user32 comdlg32
IMPORTS = uuid urlmon advpack comctl32 advapi32 shell32 user32 comdlg32
EXTRADEFS = -DINSTALL_DATADIR="\"$(datadir)\""
C_SRCS = \
addons.c \
appwiz.c
RC_SRCS = \
......
......@@ -44,6 +44,7 @@
#include <commdlg.h>
#include <cpl.h>
#include "appwiz.h"
#include "res.h"
WINE_DEFAULT_DEBUG_CHANNEL(appwizcpl);
......@@ -71,7 +72,7 @@ typedef struct APPINFO {
} APPINFO;
static struct APPINFO *AppInfo = NULL;
static HINSTANCE hInst;
HINSTANCE hInst;
static WCHAR btnRemove[MAX_STRING_LEN];
static WCHAR btnModifyRemove[MAX_STRING_LEN];
......@@ -953,6 +954,19 @@ static void StartApplet(HWND hWnd)
PropertySheetW (&psh);
}
static LONG start_params(const WCHAR *params)
{
static const WCHAR install_geckoW[] = {'i','n','s','t','a','l','l','_','g','e','c','k','o',0};
if(!strcmpW(params, install_geckoW)) {
install_wine_gecko();
return TRUE;
}
WARN("unknown param %s\n", debugstr_w(params));
return FALSE;
}
/******************************************************************************
* Name : CPlApplet
* Description: Entry point for Control Panel applets
......@@ -979,6 +993,9 @@ LONG CALLBACK CPlApplet(HWND hwndCPL, UINT message, LPARAM lParam1, LPARAM lPara
case CPL_GETCOUNT:
return 1;
case CPL_STARTWPARMSW:
return start_params((const WCHAR *)lParam2);
case CPL_INQUIRE:
{
CPLINFO *appletInfo = (CPLINFO *) lParam2;
......
/*
* Copyright 2010 Jacek Caban for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
BOOL install_wine_gecko(void);
extern HINSTANCE hInst;
static inline void *heap_alloc(size_t len)
{
return HeapAlloc(GetProcessHeap(), 0, len);
}
static inline void *heap_realloc(void *mem, size_t len)
{
return HeapReAlloc(GetProcessHeap(), 0, mem, len);
}
static inline BOOL heap_free(void *mem)
{
return HeapFree(GetProcessHeap(), 0, mem);
}
......@@ -45,6 +45,11 @@
#define IDC_INFO_COMMENTS 1107
#define IDC_INFO_LABEL 1108
#define ID_DWL_DIALOG 1200
#define ID_DWL_PROGRESS 1201
#define ID_DWL_INSTALL 1202
#define ID_DWL_STATUS 1203
/* Icons */
#define ICO_MAIN 1
......@@ -61,3 +66,5 @@
#define IDS_INSTALL_FILTER 9
#define IDS_REMOVE 10
#define IDS_MODIFY_REMOVE 11
#define IDS_DOWNLOADING 12
#define IDS_INSTALLING 13
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