1
/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
3
* The contents of this file are subject to the Netscape Public
4
* License Version 1.1 (the "License"); you may not use this file
5
* except in compliance with the License. You may obtain a copy of
6
* the License at http://www.mozilla.org/NPL/
8
* Software distributed under the License is distributed on an "AS
9
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
10
* implied. See the License for the specific language governing
11
* rights and limitations under the License.
13
* The Original Code is Mozilla Communicator client code,
14
* released March 31, 1998.
16
* The Initial Developer of the Original Code is Netscape Communications
17
* Corporation. Portions created by Netscape are
18
* Copyright (C) 1998 Netscape Communications Corporation. All
22
* Sean Su <ssu@netscape.com>
29
#define PR_BEGIN_EXTERN_C extern "C" {
30
#define PR_END_EXTERN_C }
31
#else /* __cplusplus */
32
#define PR_BEGIN_EXTERN_C
33
#define PR_END_EXTERN_C
34
#endif /* __cplusplus */
36
#define PR_EXTERN(type) type
38
typedef unsigned int PRUint32;
53
#define DEFAULT_SETUP_WINDOW_NAME "Setup"
54
/* Class name for the invisible window to be created */
55
#define CLASS_NAME_SETUP "MozillaSetup"
56
#define CLASS_NAME_SETUP_DLG "MozillaSetupDlg"
57
#define FILE_INI_SETUP "setup.ini"
58
#define FILE_INI_CONFIG "config.ini"
59
#define FILE_INI_INSTALL "install.ini"
60
#define FILE_IDI_GETCONFIGINI "getconfigini.idi"
61
#define FILE_IDI_GETARCHIVES "getarchives.idi"
62
#define FILE_IDI_GETREDIRECT "getredirect.idi"
63
#define FILE_INI_REDIRECT "redirect.ini"
64
#define FILE_WGET_LOG "wget.log"
65
#define WIZ_TEMP_DIR "ns_temp"
66
#define FILE_INSTALL_LOG "install_wizard.log"
67
#define FILE_INSTALL_STATUS_LOG "install_status.log"
68
#define FILE_ALL_JS "all-proxy.js"
69
#define VR_DEFAULT_PRODUCT_NAME "Mozilla"
71
#define FORCE_ADD_TO_UNINSTALL_LOG TRUE
72
#define DO_NOT_FORCE_ADD_TO_UNINSTALL_LOG FALSE
74
/* defines that indicate whether something should
75
* be logged to the install_wizardX.log or not
76
* for uninstallation purposes.
78
#define ADD_TO_UNINSTALL_LOG TRUE
79
#define DO_NOT_ADD_TO_UNINSTALL_LOG FALSE
81
/* defines that indeicate whether an install command
82
* should have '*dnu*' prepended. '*dnu*' is parsed
83
* by the uninstaller and signals that the specific
84
* install command should _not_ be undone.
86
#define DNU_UNINSTALL FALSE
87
#define DNU_DO_NOT_UNINSTALL TRUE
89
#define WINREG_OVERWRITE_KEY TRUE
90
#define WINREG_DO_NOT_OVERWRITE_KEY FALSE
91
#define WINREG_OVERWRITE_NAME TRUE
92
#define WINREG_DO_NOT_OVERWRITE_NAME FALSE
94
#define INCLUDE_INVISIBLE_OBJS TRUE
95
#define SKIP_INVISIBLE_OBJS FALSE
97
#define NO_BANNER_IMAGE 0x00000000
98
#define BANNER_IMAGE_DOWNLOAD 0x00000001
99
#define BANNER_IMAGE_INSTALLING 0x00000002
101
#define APPPATH_GRE_PATH_SET 0x00000000
102
#define APPPATH_GRE_PATH_NOT_SET 0x00000001
103
#define APPPATH_GRE_PATH_ALREADY_SET 0x00000002
107
#define OTHER_DLG_1 3
109
#define MAX_CRC_FAILED_DOWNLOAD_RETRIES 5
110
#define MAX_FILE_DOWNLOAD_RETRIES 10
112
#define STATUS_DISABLED 0
113
#define STATUS_ENABLED 1
115
#define GRE_SETUP_DIR_NAME "Setup GRE"
117
/* filename which contains this product setup's exit status */
118
#define SETUP_EXIT_STATUS_LOG "%s Setup Exit Status.log"
120
/* LOCAL GRE defines */
121
#define GRE_TYPE_NOT_SET -1
125
/* WS: WinSpawn wait values */
126
#define WS_DO_NOT_WAIT FALSE
129
#define MAX_KILL_PROCESS_RETRIES 10
131
/* CI: Check Instance */
132
#define CI_FORCE_QUIT_PROCESS TRUE
133
#define CI_CLOSE_PROCESS FALSE
136
#define BAR_SPACING 0
138
#define BAR_LIBXPNET_MARGIN 1
139
#define BAR_LIBXPNET_SPACING 0
140
#define BAR_LIBXPNET_WIDTH 1
142
/* W: When for install status logging */
146
/* W: When for crc check failed logging */
150
/* UP: Use Protocol */
154
/* RA: Restricted Access */
156
#define RA_ONLY_RESTRICTED 1
157
#define RA_ONLY_NONRESTRICTED 2
159
/* LIS: Log Install Status */
160
#define LIS_SUCCESS 0
161
#define LIS_FAILURE 1
169
/* AP: Archive Path */
170
#define AP_NOT_FOUND 0
171
#define AP_TEMP_PATH 1
172
#define AP_SETUP_PATH 2
173
#define AP_ALTERNATE_PATH 3
176
#define PP_FILENAME_ONLY 1
177
#define PP_PATH_ONLY 2
178
#define PP_ROOT_ONLY 3
179
#define PP_EXTENSION_ONLY 4
181
/* DA: Delete Archive */
182
#define DA_ONLY_IF_IN_ARCHIVES_LST 1
183
#define DA_ONLY_IF_NOT_IN_ARCHIVES_LST 2
184
#define DA_IGNORE_ARCHIVES_LST 3
187
#define T_PRE_DOWNLOAD 1
188
#define T_POST_DOWNLOAD 2
189
#define T_PRE_XPCOM 3
190
#define T_POST_XPCOM 4
191
#define T_PRE_SMARTUPDATE 5
192
#define T_POST_SMARTUPDATE 6
193
#define T_PRE_LAUNCHAPP 7
194
#define T_POST_LAUNCHAPP 8
195
#define T_DEPEND_REBOOT 9
196
#define T_PRE_ARCHIVE 10
197
#define T_POST_ARCHIVE 11
200
#define MAX_BUF_TINY 256
201
#define MAX_BUF_SMALL 512
202
#define MAX_BUF_MEDIUM 1024
203
#define MAX_BUF_LARGE MAX_BUF
204
#define MAX_BUF_XLARGE 4096
206
#define MAX_INI_SK 128
208
#define ERROR_CODE_HIDE 0
209
#define ERROR_CODE_SHOW 1
211
#define DLG_COMMIT_INSTALL 1
212
#define CX_CHECKBOX 13
213
#define CY_CHECKBOX 13
215
/* WIZ: WIZARD defines */
217
#define WIZ_ERROR_UNDEFINED 1024
218
#define WIZ_MEMORY_ALLOC_FAILED 1025
219
#define WIZ_OUT_OF_MEMORY WIZ_MEMORY_ALLOC_FAILED
220
#define WIZ_ARCHIVES_MISSING 1026
221
#define WIZ_CRC_PASS WIZ_OK
222
#define WIZ_CRC_FAIL 1028
223
#define WIZ_SETUP_ALREADY_RUNNING 1029
224
#define WIZ_TOO_MANY_NETWORK_ERRORS 1030
225
#define WIZ_ERROR_PARSING_INTERNAL_STR 1031
226
#define WIZ_ERROR_REGKEY 1032
227
#define WIZ_ERROR_INIT 1033
228
#define WIZ_ERROR_LOADING_RESOURCE_LIB 1034
229
#define WIZ_ERROR_CREATE_DIRECTORY 1035
234
/* FO: File Operation */
237
#define FO_ERROR_FILE_NOT_FOUND 1
238
#define FO_ERROR_DESTINATION_CONFLICT 2
239
#define FO_ERROR_CHANGE_DIR 3
240
#define FO_ERROR_WRITE 4
241
#define FO_ERROR_INCR_EXCEEDS_LIMIT 5
243
/* Mode of Setup to run in */
255
/* SM: Setup Type Mode */
259
/* SIC: Setup Info Component*/
260
#define SIC_SELECTED 0x00000001
261
#define SIC_INVISIBLE 0x00000002
262
#define SIC_LAUNCHAPP 0x00000004
263
#define SIC_DOWNLOAD_REQUIRED 0x00000008
264
#define SIC_DOWNLOAD_ONLY 0x00000010
265
#define SIC_ADDITIONAL 0x00000020
266
#define SIC_DISABLED 0x00000040
267
#define SIC_FORCE_UPGRADE 0x00000080
268
#define SIC_IGNORE_DOWNLOAD_ERROR 0x00000100
269
#define SIC_IGNORE_XPINSTALL_ERROR 0x00000200
270
#define SIC_UNCOMPRESS 0x00000400
271
#define SIC_SUPERSEDE 0x00000800
272
#define SIC_MAIN_COMPONENT 0x00001000
274
/* AC: Additional Components */
276
#define AC_COMPONENTS 1
277
#define AC_ADDITIONAL_COMPONENTS 2
280
/* OS: Operating System */
281
#define OS_WIN9x 0x00000001
282
#define OS_WIN95_DEBUTE 0x00000002
283
#define OS_WIN95 0x00000004
284
#define OS_WIN98 0x00000008
285
#define OS_NT 0x00000010
286
#define OS_NT3 0x00000020
287
#define OS_NT4 0x00000040
288
#define OS_NT5 0x00000080
289
#define OS_NT50 0x00000100
290
#define OS_NT51 0x00000200
292
/* DSR: Disk Space Required */
293
#define DSR_DESTINATION 0
296
#define DSR_DOWNLOAD_SIZE 3
298
/* SS: Site Selector */
302
/* PUS: Previous Unfinished State */
304
#define PUS_DOWNLOAD 1
305
#define PUS_UNPACK_XPCOM 2
306
#define PUS_INSTALL_XPI 3
307
#define SETUP_STATE_DOWNLOAD "downloading"
308
#define SETUP_STATE_UNPACK_XPCOM "unpacking xpcom"
309
#define SETUP_STATE_INSTALL_XPI "installing xpi"
310
#define SETUP_STATE_REMOVING_PREV_INST "removing previous installation"
313
typedef struct dlgSetup
320
typedef struct dlgWelcome
324
LPSTR szMessageWelcome;
331
typedef struct dlgLicense
336
LPSTR szLicenseFilename;
339
LPSTR szRadioDecline;
342
typedef struct dlgQuickLaunch
350
BOOL bTurboModeEnabled;
354
typedef struct stStruct
358
DWORD dwCItemsSelected[MAX_BUF]; /* components */
359
LPSTR szDescriptionShort;
360
LPSTR szDescriptionLong;
363
typedef struct dlgSetupType
373
typedef struct dlgSelectComponents
382
typedef struct dlgSelectInstallPath
390
typedef struct dlgUpgrade
393
BOOL bShowInEasyInstall;
396
LPSTR szMessageCleanup;
397
LPSTR szCheckboxSafeInstall;
398
LPSTR szSafeInstallInfo;
399
LPSTR szUnsafeInstallInfo;
400
LPSTR szNoSafeUpgradeWindir;
403
typedef struct wiCBstruct
411
typedef struct dlgWindowsIntegration
423
typedef struct dlgProgramFolder
430
typedef struct dlgAdditionalOptions
437
BOOL bRecaptureHomepage;
438
BOOL bShowHomepageOption;
440
BOOL bUseProtocolSettings;
444
typedef struct dlgAdvancedSettings
455
typedef struct dlgStartInstall
460
LPSTR szMessageInstall;
461
LPSTR szMessageDownload;
465
typedef struct dlgDownloading
472
LPSTR szTimeRemainingKey;
475
typedef struct dlgInstalling
482
LPSTR szStatusComponent;
485
typedef struct dlgInstallSuccessful
489
LPSTR szMessageHeader;
492
LPSTR szResetHomepage;
495
BOOL bResetHomepageChecked;
496
BOOL bLaunchAppChecked;
499
typedef struct dlgDownload
503
LPSTR szMessageDownload0;
504
LPSTR szMessageRetry0;
507
typedef struct dlgReboot
513
typedef struct setupStruct
518
DWORD dwNumberOfComponents;
524
LPSTR szProductNameInternal;
525
LPSTR szProductNamePrevious;
526
LPSTR szUninstallFilename;
528
LPSTR szProgramFolderName;
529
LPSTR szProgramFolderPath;
530
LPSTR szAlternateArchiveSearchPath;
531
LPSTR szParentProcessFilename;
535
BOOL checkCleanupOnUpgrade;
536
BOOL doCleanupOnUpgrade;
540
BOOL greCleanupOrphans;
541
char greCleanupOrphansMessage[MAX_BUF];
543
char grePrivateKey[MAX_BUF];
546
typedef struct sinfoSmartDownload
553
LPSTR szConfirmInstall;
557
LPSTR szXpcomFilePath;
560
typedef struct sinfoXpcomFile
567
ULONGLONG ullInstallSize;
570
typedef struct sinfoComponentDep siCD;
571
struct sinfoComponentDep
573
LPSTR szDescriptionShort;
574
LPSTR szReferenceName;
579
typedef struct sinfoComponent siC;
580
struct sinfoComponent
582
ULONGLONG ullInstallSize;
583
ULONGLONG ullInstallSizeSystem;
584
ULONGLONG ullInstallSizeArchive;
585
long lRandomInstallPercentage;
586
long lRandomInstallValue;
589
LPSTR szArchiveNameUncompressed;
591
LPSTR szDestinationPath;
592
LPSTR szDescriptionShort;
593
LPSTR szDescriptionLong;
595
LPSTR szReferenceName;
602
siCD *siCDDependencies;
608
typedef struct ssInfo ssi;
618
typedef struct dlgInstall
622
HFONT welcomeTitleFont;
623
char szFontName[MAX_BUF];
624
char szFontSize[MAX_BUF];
625
char szCharSet[MAX_BUF];
628
char szCancel_[MAX_BUF];
629
char szCancel[MAX_BUF];
630
char szNext_[MAX_BUF];
631
char szBack_[MAX_BUF];
632
char szIgnore_[MAX_BUF];
633
char szProxyMessage[MAX_BUF];
634
char szProxyButton[MAX_BUF];
635
char szProxySettings_[MAX_BUF];
636
char szProxySettings[MAX_BUF];
637
char szServer[MAX_BUF];
638
char szPort[MAX_BUF];
639
char szUserId[MAX_BUF];
640
char szPassword[MAX_BUF];
641
char szSelectDirectory[MAX_BUF];
642
char szDirectories_[MAX_BUF];
643
char szDrives_[MAX_BUF];
644
char szStatus[MAX_BUF];
645
char szFile[MAX_BUF];
648
char szAccept_[MAX_BUF];
649
char szDecline_[MAX_BUF];
650
char szProgramFolder_[MAX_BUF];
651
char szExistingFolder_[MAX_BUF];
652
char szSetupMessage[MAX_BUF];
653
char szRestart[MAX_BUF];
654
char szYesRestart[MAX_BUF];
655
char szNoRestart[MAX_BUF];
656
char szAdditionalComponents_[MAX_BUF];
657
char szDescription[MAX_BUF];
658
char szTotalDownloadSize[MAX_BUF];
659
char szSpaceAvailable[MAX_BUF];
660
char szComponents_[MAX_BUF];
661
char szBrowseInfo[MAX_BUF];
662
char szDestinationDirectory[MAX_BUF];
663
char szBrowse_[MAX_BUF];
664
char szDownloadSize[MAX_BUF];
665
char szCurrentSettings[MAX_BUF];
666
char szInstallFolder[MAX_BUF];
667
char szPrimCompNoOthers[MAX_BUF];
668
char szPrimCompOthers[MAX_BUF];
669
char szAddtlCompWrapper[MAX_BUF];
670
char szInstall_[MAX_BUF];
671
char szDelete_[MAX_BUF];
672
char szContinue_[MAX_BUF];
673
char szSkip_[MAX_BUF];
674
char szExtracting[MAX_BUF];
675
char szReadme_[MAX_BUF];
676
char szPause_[MAX_BUF];
677
char szResume_[MAX_BUF];
678
char szChecked[MAX_BUF];
679
char szUnchecked[MAX_BUF];
682
/* structure message stream */
683
typedef struct sEMsgStream sems;
687
char szConfirmationMessage[MAX_BUF];
689
DWORD dwMessageBufSize;
692
BOOL bShowConfirmation;
695
/* structure system info*/
696
typedef struct sSysInfo sysinfo;
700
DWORD dwMajorVersion;
701
DWORD dwMinorVersion;
703
char szExtraString[MAX_BUF];
704
DWORD dwMemoryTotalPhysical;
705
DWORD dwMemoryAvailablePhysical;
708
DWORD lastWindowPosCenterX;
709
DWORD lastWindowPosCenterY;
714
typedef struct diskSpaceNode dsN;
717
ULONGLONG ullSpaceRequired;
724
#endif /* _SETUP_H */