Back to index

lightning-sunbird  0.9+nobinonly
uninstall.h
Go to the documentation of this file.
00001 /* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is Mozilla Communicator client code, released
00016  * March 31, 1998.
00017  *
00018  * The Initial Developer of the Original Code is
00019  * Netscape Communications Corporation.
00020  * Portions created by the Initial Developer are Copyright (C) 1998
00021  * the Initial Developer. All Rights Reserved.
00022  *
00023  * Contributor(s):
00024  *   Sean Su <ssu@netscape.com>
00025  *
00026  * Alternatively, the contents of this file may be used under the terms of
00027  * either the GNU General Public License Version 2 or later (the "GPL"), or
00028  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00029  * in which case the provisions of the GPL or the LGPL are applicable instead
00030  * of those above. If you wish to allow use of your version of this file only
00031  * under the terms of either the GPL or the LGPL, and not to allow others to
00032  * use your version of this file under the terms of the MPL, indicate your
00033  * decision by deleting the provisions above and replace them with the notice
00034  * and other provisions required by the GPL or the LGPL. If you do not delete
00035  * the provisions above, a recipient may use your version of this file under
00036  * the terms of any one of the MPL, the GPL or the LGPL.
00037  *
00038  * ***** END LICENSE BLOCK ***** */
00039 
00040 #ifndef _SETUP_H_
00041 #define _SETUP_H_
00042 
00043 #ifdef __cplusplus
00044 #define PR_BEGIN_EXTERN_C       extern "C" {
00045 #define PR_END_EXTERN_C         }
00046 #else
00047 #define PR_BEGIN_EXTERN_C
00048 #define PR_END_EXTERN_C
00049 #endif
00050 
00051 #define PR_EXTERN(type) type
00052 
00053 typedef unsigned int PRUint32;
00054 typedef int PRInt32;
00055 
00056 #include <windows.h>
00057 #include <string.h>
00058 #include <stdlib.h>
00059 #include <stdio.h>
00060 #include <assert.h>
00061 #include <direct.h>
00062 #include <tchar.h>
00063 #include <commctrl.h>
00064 #include "resource.h"
00065 
00066 #define CLASS_NAME                      "Uninstall"
00067 #define CLASS_NAME_UNINSTALL_DLG        "MozillaSetupDlg"
00068 #define FILE_INI_UNINSTALL              "uninstall.ini"
00069 #define FILE_LOG_INSTALL                "install_wizard.log"
00070 
00071 #ifdef MOZ_PHOENIX
00072 #define WIZ_TEMP_DIR                    "ff_temp"
00073 #elif defined(MOZ_THUNDERBIRD)
00074 #define WIZ_TEMP_DIR                    "tb_temp"
00075 #else
00076 #define WIZ_TEMP_DIR                    "ns_temp"
00077 #endif
00078 
00079 #define MAX_KILL_PROCESS_RETRIES        10
00080 
00081 /* WTD: What To Do */
00082 #define WTD_ASK                         0
00083 #define WTD_CANCEL                      1
00084 #define WTD_NO                          2
00085 #define WTD_NO_TO_ALL                   3
00086 #define WTD_YES                         4
00087 #define WTD_YES_TO_ALL                  5
00088 
00089 /* WS: WinSpawn wait values */
00090 #define WS_DO_NOT_WAIT                  FALSE
00091 #define WS_WAIT                         TRUE
00092 
00093 /* CI: Check Instance */
00094 #define CI_FORCE_QUIT_PROCESS           TRUE
00095 #define CI_CLOSE_PROCESS                FALSE
00096 
00097 /* PP: Parse Path */
00098 #define PP_FILENAME_ONLY                1
00099 #define PP_PATH_ONLY                    2
00100 #define PP_ROOT_ONLY                    3
00101 
00102 #define MAX_BUF                         4096
00103 #define MAX_BUF_TINY                    256
00104 #define ERROR_CODE_HIDE                 0
00105 #define ERROR_CODE_SHOW                 1
00106 #define CX_CHECKBOX                     13
00107 #define CY_CHECKBOX                     13
00108 
00109 /* WIZ: WIZARD defines */
00110 #define WIZ_OK                          0
00111 #define WIZ_ERROR_UNDEFINED             1024
00112 #define WIZ_MEMORY_ALLOC_FAILED         1025
00113 #define WIZ_OUT_OF_MEMORY               WIZ_MEMORY_ALLOC_FAILED
00114 #define WIZ_ARCHIVES_MISSING            1026
00115 #define WIZ_CRC_PASS                    WIZ_OK
00116 #define WIZ_CRC_FAIL                    1028
00117 #define WIZ_SETUP_ALREADY_RUNNING       1029
00118 #define WIZ_TOO_MANY_NETWORK_ERRORS     1030
00119 #define WIZ_ERROR_PARSING_INTERNAL_STR  1031
00120 #define WIZ_ERROR_REGKEY                1032
00121 #define WIZ_ERROR_INIT                  1033
00122 #define WIZ_ERROR_LOADING_RESOURCE_LIB  1034
00123 #define WIZ_FILE_NOT_FOUND              1035
00124 #define WIZ_ERROR_PARSING_UNINST_STRS   1036
00125 
00126 /* CMI: Cleanup Mail Integration */
00127 #define CMI_OK                          0
00128 #define CMI_APP_PATHNAME_NOT_FOUND      1
00129 
00130 /* FO: File Operation */
00131 #define FO_OK                           0
00132 #define FO_SUCCESS                      0
00133 #define FO_ERROR_FILE_NOT_FOUND         1
00134 #define FO_ERROR_DESTINATION_CONFLICT   2
00135 #define FO_ERROR_CHANGE_DIR             3
00136 
00137 /* Mode of Setup to run in */
00138 #define NOT_SET                         -1
00139 #define NORMAL                          0
00140 #define SILENT                          1
00141 #define AUTO                            2
00142 #define SHOWICONS                       3
00143 #define HIDEICONS                       4
00144 #define SETDEFAULT                      5
00145 
00146 /* OS: Operating System */
00147 #define OS_WIN9x                        0x00000001
00148 #define OS_WIN95_DEBUTE                 0x00000002
00149 #define OS_WIN95                        0x00000004
00150 #define OS_WIN98                        0x00000008
00151 #define OS_NT                           0x00000010
00152 #define OS_NT3                          0x00000020
00153 #define OS_NT4                          0x00000040
00154 #define OS_NT5                          0x00000080
00155 #define OS_NT50                         0x00000100
00156 #define OS_NT51                         0x00000200
00157 
00158 typedef struct dlgUninstall
00159 {
00160   BOOL  bShowDialog;
00161   LPSTR szTitle;
00162   LPSTR szMessage0;
00163 } diU;
00164 
00165 typedef struct uninstallStruct
00166 {
00167   int       mode;
00168   LPSTR     szAppPath;
00169   LPSTR     szLogPath;
00170   LPSTR     szLogFilename;
00171   LPSTR     szCompanyName;
00172   LPSTR     szProductName;
00173   LPSTR     szDescription;
00174   LPSTR     szUninstallKeyDescription;
00175   HKEY      hWrMainRoot;
00176   LPSTR     szWrMainKey;
00177   HKEY      hWrRoot;
00178   LPSTR     szWrKey;
00179   LPSTR     szUserAgent;
00180   LPSTR     szDefaultComponent;
00181   LPSTR     szClientAppID;
00182   LPSTR     szClientAppPath;
00183   BOOL      bVerbose;
00184   BOOL      bUninstallFiles;
00185   BOOL      bSharedInst;
00186   HFONT     definedFont;
00187   char      szInstallPath[MAX_BUF];
00188 } uninstallGen;
00189 
00190 typedef struct sInfoLine sil;
00191 struct sInfoLine
00192 {
00193   ULONGLONG       ullLineNumber;
00194   LPSTR           szLine;
00195   sil             *Next;
00196   sil             *Prev;
00197 };
00198 
00199 #endif
00200