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 of the GNU General Public License Version 2 or later (the "GPL"),
00028  * or 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 #define WIZ_TEMP_DIR                    "ns_temp"
00071 
00072 #define MAX_KILL_PROCESS_RETRIES        10
00073 
00074 /* WTD: What To Do */
00075 #define WTD_ASK                         0
00076 #define WTD_CANCEL                      1
00077 #define WTD_NO                          2
00078 #define WTD_NO_TO_ALL                   3
00079 #define WTD_YES                         4
00080 #define WTD_YES_TO_ALL                  5
00081 
00082 /* WS: WinSpawn wait values */
00083 #define WS_DO_NOT_WAIT                  FALSE
00084 #define WS_WAIT                         TRUE
00085 
00086 /* CI: Check Instance */
00087 #define CI_FORCE_QUIT_PROCESS           TRUE
00088 #define CI_CLOSE_PROCESS                FALSE
00089 
00090 /* PP: Parse Path */
00091 #define PP_FILENAME_ONLY                1
00092 #define PP_PATH_ONLY                    2
00093 #define PP_ROOT_ONLY                    3
00094 
00095 #define MAX_BUF                         4096
00096 #define MAX_BUF_TINY                    256
00097 #define ERROR_CODE_HIDE                 0
00098 #define ERROR_CODE_SHOW                 1
00099 #define CX_CHECKBOX                     13
00100 #define CY_CHECKBOX                     13
00101 
00102 /* WIZ: WIZARD defines */
00103 #define WIZ_OK                          0
00104 #define WIZ_ERROR_UNDEFINED             1024
00105 #define WIZ_MEMORY_ALLOC_FAILED         1025
00106 #define WIZ_OUT_OF_MEMORY               WIZ_MEMORY_ALLOC_FAILED
00107 #define WIZ_ARCHIVES_MISSING            1026
00108 #define WIZ_CRC_PASS                    WIZ_OK
00109 #define WIZ_CRC_FAIL                    1028
00110 #define WIZ_SETUP_ALREADY_RUNNING       1029
00111 #define WIZ_TOO_MANY_NETWORK_ERRORS     1030
00112 #define WIZ_ERROR_PARSING_INTERNAL_STR  1031
00113 #define WIZ_ERROR_REGKEY                1032
00114 #define WIZ_ERROR_INIT                  1033
00115 #define WIZ_ERROR_LOADING_RESOURCE_LIB  1034
00116 #define WIZ_FILE_NOT_FOUND              1035
00117 #define WIZ_ERROR_PARSING_UNINST_STRS   1036
00118 
00119 /* CMI: Cleanup Mail Integration */
00120 #define CMI_OK                          0
00121 #define CMI_APP_PATHNAME_NOT_FOUND      1
00122 
00123 /* FO: File Operation */
00124 #define FO_OK                           0
00125 #define FO_SUCCESS                      0
00126 #define FO_ERROR_FILE_NOT_FOUND         1
00127 #define FO_ERROR_DESTINATION_CONFLICT   2
00128 #define FO_ERROR_CHANGE_DIR             3
00129 
00130 /* Mode of Setup to run in */
00131 #define NOT_SET                         -1
00132 #define NORMAL                          0
00133 #define SILENT                          1
00134 #define AUTO                            2
00135 #define SHOWICONS                       3
00136 #define HIDEICONS                       4
00137 #define SETDEFAULT                      5
00138 
00139 /* OS: Operating System */
00140 #define OS_WIN9x                        0x00000001
00141 #define OS_WIN95_DEBUTE                 0x00000002
00142 #define OS_WIN95                        0x00000004
00143 #define OS_WIN98                        0x00000008
00144 #define OS_NT                           0x00000010
00145 #define OS_NT3                          0x00000020
00146 #define OS_NT4                          0x00000040
00147 #define OS_NT5                          0x00000080
00148 #define OS_NT50                         0x00000100
00149 #define OS_NT51                         0x00000200
00150 
00151 typedef struct dlgUninstall
00152 {
00153   BOOL  bShowDialog;
00154   LPSTR szTitle;
00155   LPSTR szMessage0;
00156 } diU;
00157 
00158 typedef struct uninstallStruct
00159 {
00160   int       mode;
00161   LPSTR     szAppPath;
00162   LPSTR     szLogPath;
00163   LPSTR     szLogFilename;
00164   LPSTR     szCompanyName;
00165   LPSTR     szProductName;
00166   LPSTR     szDescription;
00167   LPSTR     szUninstallKeyDescription;
00168   LPSTR     szUninstallFilename;
00169   HKEY      hWrMainRoot;
00170   LPSTR     szWrMainKey;
00171   HKEY      hWrRoot;
00172   LPSTR     szWrKey;
00173   LPSTR     szUserAgent;
00174   LPSTR     szDefaultComponent;
00175   LPSTR     szClientAppID;
00176   LPSTR     szClientAppPath;
00177   BOOL      bVerbose;
00178   BOOL      bUninstallFiles;
00179   BOOL      bSharedInst;
00180   HFONT     definedFont;
00181   char      szInstallPath[MAX_BUF];
00182 } uninstallGen;
00183 
00184 typedef struct sInfoLine sil;
00185 struct sInfoLine
00186 {
00187   ULONGLONG       ullLineNumber;
00188   LPSTR           szLine;
00189   sil             *Next;
00190   sil             *Prev;
00191 };
00192 
00193 #endif
00194