From f4e6489edbcbab768277f4fea7f2b639f053783c Mon Sep 17 00:00:00 2001 From: Owen Rudge Date: Thu, 24 Jul 2008 21:57:28 +0100 Subject: [PATCH] appwiz.cpl: Add skeleton Add/Remove Programs control panel. --- Makefile.in | 2 + configure | 3 + configure.ac | 1 + dlls/Makefile.in | 1 + dlls/appwiz.cpl/En.rc | 29 +++++++++ dlls/appwiz.cpl/Makefile.in | 15 +++++ dlls/appwiz.cpl/appwiz.c | 100 ++++++++++++++++++++++++++++++++ dlls/appwiz.cpl/appwiz.cpl.spec | 1 + dlls/appwiz.cpl/appwiz.ico | Bin 0 -> 766 bytes dlls/appwiz.cpl/appwiz.rc | 32 ++++++++++ dlls/appwiz.cpl/res.h | 29 +++++++++ tools/wine.inf.in | 1 + 12 files changed, 214 insertions(+) create mode 100644 dlls/appwiz.cpl/En.rc create mode 100644 dlls/appwiz.cpl/Makefile.in create mode 100644 dlls/appwiz.cpl/appwiz.c create mode 100644 dlls/appwiz.cpl/appwiz.cpl.spec create mode 100644 dlls/appwiz.cpl/appwiz.ico create mode 100644 dlls/appwiz.cpl/appwiz.rc create mode 100644 dlls/appwiz.cpl/res.h diff --git a/Makefile.in b/Makefile.in index 6af86c4975e..bb1ec014d2d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -174,6 +174,7 @@ ALL_MAKEFILES = \ dlls/advpack/Makefile \ dlls/advpack/tests/Makefile \ dlls/amstream/Makefile \ + dlls/appwiz.cpl/Makefile \ dlls/atl/Makefile \ dlls/avicap32/Makefile \ dlls/avifil32/Makefile \ @@ -606,6 +607,7 @@ dlls/advapi32/tests/Makefile: dlls/advapi32/tests/Makefile.in dlls/Maketest.rule dlls/advpack/Makefile: dlls/advpack/Makefile.in dlls/Makedll.rules dlls/advpack/tests/Makefile: dlls/advpack/tests/Makefile.in dlls/Maketest.rules dlls/amstream/Makefile: dlls/amstream/Makefile.in dlls/Makedll.rules +dlls/appwiz.cpl/Makefile: dlls/appwiz.cpl/Makefile.in dlls/Makedll.rules dlls/atl/Makefile: dlls/atl/Makefile.in dlls/Makedll.rules dlls/avicap32/Makefile: dlls/avicap32/Makefile.in dlls/Makedll.rules dlls/avifil32/Makefile: dlls/avifil32/Makefile.in dlls/Makedll.rules diff --git a/configure b/configure index 7bb03855e37..ec49149e51d 100755 --- a/configure +++ b/configure @@ -21927,6 +21927,8 @@ ac_config_files="$ac_config_files dlls/advpack/tests/Makefile" ac_config_files="$ac_config_files dlls/amstream/Makefile" +ac_config_files="$ac_config_files dlls/appwiz.cpl/Makefile" + ac_config_files="$ac_config_files dlls/atl/Makefile" ac_config_files="$ac_config_files dlls/avicap32/Makefile" @@ -23319,6 +23321,7 @@ do "dlls/advpack/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/advpack/Makefile" ;; "dlls/advpack/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/advpack/tests/Makefile" ;; "dlls/amstream/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/amstream/Makefile" ;; + "dlls/appwiz.cpl/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/appwiz.cpl/Makefile" ;; "dlls/atl/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/atl/Makefile" ;; "dlls/avicap32/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/avicap32/Makefile" ;; "dlls/avifil32/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/avifil32/Makefile" ;; diff --git a/configure.ac b/configure.ac index 9aaacab8a77..9b29e57dfb5 100644 --- a/configure.ac +++ b/configure.ac @@ -1726,6 +1726,7 @@ AC_CONFIG_FILES([dlls/advapi32/tests/Makefile]) AC_CONFIG_FILES([dlls/advpack/Makefile]) AC_CONFIG_FILES([dlls/advpack/tests/Makefile]) AC_CONFIG_FILES([dlls/amstream/Makefile]) +AC_CONFIG_FILES([dlls/appwiz.cpl/Makefile]) AC_CONFIG_FILES([dlls/atl/Makefile]) AC_CONFIG_FILES([dlls/avicap32/Makefile]) AC_CONFIG_FILES([dlls/avifil32/Makefile]) diff --git a/dlls/Makefile.in b/dlls/Makefile.in index e597876db64..681b5c6136a 100644 --- a/dlls/Makefile.in +++ b/dlls/Makefile.in @@ -24,6 +24,7 @@ BASEDIRS = \ advapi32 \ advpack \ amstream \ + appwiz.cpl \ atl \ avicap32 \ avifil32 \ diff --git a/dlls/appwiz.cpl/En.rc b/dlls/appwiz.cpl/En.rc new file mode 100644 index 00000000000..240793bb646 --- /dev/null +++ b/dlls/appwiz.cpl/En.rc @@ -0,0 +1,29 @@ +/* +* Add/Remove Programs English resources +* +* Copyright 2001-2002, 2008 Owen Rudge +* +* 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 +* +*/ + +LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT + +STRINGTABLE +{ + IDS_CPL_TITLE, "Add/Remove Programs" + IDS_CPL_DESC, "Allows you to install new software, or remove existing software from your computer." + IDS_TAB1_TITLE, "Applications" +} diff --git a/dlls/appwiz.cpl/Makefile.in b/dlls/appwiz.cpl/Makefile.in new file mode 100644 index 00000000000..141715d7447 --- /dev/null +++ b/dlls/appwiz.cpl/Makefile.in @@ -0,0 +1,15 @@ +TOPSRCDIR = @top_srcdir@ +TOPOBJDIR = ../.. +SRCDIR = @srcdir@ +VPATH = @srcdir@ +MODULE = appwiz.cpl +IMPORTS = kernel32 comctl32 advapi32 shell32 user32 + +C_SRCS = \ + appwiz.c + +RC_SRCS = appwiz.rc + +@MAKE_DLL_RULES@ + +@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/appwiz.cpl/appwiz.c b/dlls/appwiz.cpl/appwiz.c new file mode 100644 index 00000000000..76658de5a74 --- /dev/null +++ b/dlls/appwiz.cpl/appwiz.c @@ -0,0 +1,100 @@ +/* + * Add/Remove Programs applet + * Partially based on Wine Uninstaller + * + * Copyright 2000 Andreas Mohr + * Copyright 2004 Hannu Valtonen + * Copyright 2005 Jonathan Ernst + * Copyright 2001-2002, 2008 Owen Rudge + * + * 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 + * + */ + +#include "config.h" +#include "wine/port.h" +#include "wine/unicode.h" +#include "wine/debug.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "res.h" + +WINE_DEFAULT_DEBUG_CHANNEL(appwizcpl); + +static HINSTANCE hInst; + +/****************************************************************************** + * Name : DllMain + * Description: Entry point for DLL file + */ +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, + LPVOID lpvReserved) +{ + TRACE("(%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved); + + switch (fdwReason) + { + case DLL_PROCESS_ATTACH: + hInst = hinstDLL; + break; + } + return TRUE; +} + +/****************************************************************************** + * Name : CPlApplet + * Description: Entry point for Control Panel applets + * Parameters : hwndCPL - hWnd of the Control Panel + * message - reason for calling function + * lParam1 - additional parameter + * lParam2 - additional parameter + * Returns : Dependant on message + */ +LONG CALLBACK CPlApplet(HWND hwndCPL, UINT message, LPARAM lParam1, LPARAM lParam2) +{ + switch (message) + { + case CPL_INIT: + return TRUE; + + case CPL_GETCOUNT: + return 1; + + case CPL_INQUIRE: + { + CPLINFO *appletInfo = (CPLINFO *) lParam2; + + appletInfo->idIcon = ICO_MAIN; + appletInfo->idName = IDS_CPL_TITLE; + appletInfo->idInfo = IDS_CPL_DESC; + appletInfo->lData = 0; + + break; + } + } + + return FALSE; +} diff --git a/dlls/appwiz.cpl/appwiz.cpl.spec b/dlls/appwiz.cpl/appwiz.cpl.spec new file mode 100644 index 00000000000..7ae3a0104c6 --- /dev/null +++ b/dlls/appwiz.cpl/appwiz.cpl.spec @@ -0,0 +1 @@ +1 stdcall CPlApplet() diff --git a/dlls/appwiz.cpl/appwiz.ico b/dlls/appwiz.cpl/appwiz.ico new file mode 100644 index 0000000000000000000000000000000000000000..fcc5894c69cb0de40227d44089dedfd8b8cc579d GIT binary patch literal 766 zcmcJMJx;_h5QQh;h>{>hNK{1L6tpDU<+1$-MCo$yQWMG)X?c z=kd>oRD8Ow5sl9qkw<=Cm>ttGD=~aCsFg@=k?@p8=6RM70wKtY=YAD;sDQnQM hg8tzxgl}!=g`4{jx&6nyXYD(!e-U|o4&h7J{sGSoYDxeA literal 0 HcmV?d00001 diff --git a/dlls/appwiz.cpl/appwiz.rc b/dlls/appwiz.cpl/appwiz.rc new file mode 100644 index 00000000000..8b839be3af2 --- /dev/null +++ b/dlls/appwiz.cpl/appwiz.rc @@ -0,0 +1,32 @@ +/* +* Add/Remove Programs resources +* +* Copyright 2001-2002, 2008 Owen Rudge +* +* 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 +* +*/ +#include +#include +#include +#include + +#include "res.h" + +#include "En.rc" + +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL + +ICO_MAIN ICON "appwiz.ico" diff --git a/dlls/appwiz.cpl/res.h b/dlls/appwiz.cpl/res.h new file mode 100644 index 00000000000..513c322e209 --- /dev/null +++ b/dlls/appwiz.cpl/res.h @@ -0,0 +1,29 @@ +/* +* Add/Remove Programs resources +* +* Copyright 2001-2002, 2008 Owen Rudge +* +* 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 +* +*/ + +/* Icons */ + +#define ICO_MAIN 1 + +/* Strings */ +#define IDS_CPL_TITLE 1 +#define IDS_CPL_DESC 2 +#define IDS_TAB1_TITLE 3 diff --git a/tools/wine.inf.in b/tools/wine.inf.in index 3e3a62528ab..da5020d96be 100644 --- a/tools/wine.inf.in +++ b/tools/wine.inf.in @@ -2243,6 +2243,7 @@ HKLM,%CurrentVersion%\Telephony\Country List\998,"SameAreaRule",,"G" 11,,actxprxy.dll 11,,advapi32.dll 11,,advpack.dll +11,,appwiz.cpl 11,,cabinet.dll 11,,cmd.exe 11,,comctl32.dll