;================================================================
; Project:		NSIS Installer Core
; Installer Author:	Bob Ward  (AOL Dulles)
;
; Copyright 2005 -- America Online Inc
;================================================================

;--------------------------------
;Compression settings

   SetCompressor lzma
   SetCompressorDictSize 16		; Adjust for optimum compressed EXE size (size is in MB)

;--------------------------------
;Extra Paths for Includes and Plugins

	; Includes
  !addincludedir "..\..\..\..\memberacq\components\common\include"

  ; Plugins
  !addplugindir "..\..\..\..\memberacq\components\common\plugins\bin"

;--------------------------------
; Defines...Constants

	; Standard Constants
	!define PRODUCT_UNINST_REGKEY "Software\Microsoft\Windows\CurrentVersion\Uninstall"
	!define REGKEYAOLMAIN "Software\America Online"
	!define REGKEYMSAPPPATHS "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths"

  ; For use with AOLInstallerFW.dll
  !define FWRegURLWithPC_NSIS   72558466352
  !define FWRegAppWithPC_NSIS   51352551253
  !define FWUnRegAppWithPC_NSIS	12342541765

	; User defined constants and variables
	
			!include "defines_consts_vars.nsh"

	; **** Ensure key constants are defined by user ****
 	!ifndef _LOCALE_    ; This is the country code for the resources installer is built with
		!error "_LOCALE_ must be defined (eg: 'en-US')"
	!endif


;--------------------------------
; Standard Variables

	; Installer Path Variables -- Initialize these in the ".onInit" and "un.onInit" callback functions
	Var COM_APP_DATA   ; Common Application Data Folder (eg: "C:\Documents and Settings\All Users")
	Var EE_DIR         ; Directory for the OCP EE
	Var ISLAND_DIR     ; Island dir for optional island install
	
	; Installer State
	Var INSTALL_MODE   ; 0 = Do not install; 1 = Do normal, non-upgrade install; 2 = Upgrade install
	Var IS_ISLAND      ; Y = Island install; N = Install to common or default EE hive

	;Diskspace
	Var TOTALSPACE  ; Amount of total diskspace required
	Var SYSSPACE		; Amount of diskspace required on System Drive in Kilobytes
	Var ALTSPACE		; Amount of diskspace required on non-System Drive in Kilobytes
	Var TMPSPACE		; Amount of temporary diskspace required to run installer in Kilobytes

	; Command Line Variables
	Var CHECK_MUTX          ; Holds whether or not we need to check the mutex
	Var POP_MSG_BOX         ; Holds whether or not we allow message boxes

	;Configuration File
	Var INI_PATH						; Pathname of configuration INI file
	Var SECTION							; Section in configuration INI file to use
	Var DISK_SPACE
	Var DO_ADDREMOVE_ENTRY	; Type of Add/Remove Programs entries to create
	Var PRODUCT_UNINSTSTR		; Uninstall display string to use for Add/Remove Programs entry

;--------------------------------
; Includes

  !include "WinMessages.nsh"			; Constants defining standard Windows messages (eg: ${WM_QUIT})
  !include "InstallFile.nsh"      ; File install macros for replacing by version and replacing in-use files
  !include "reftrackapi.nsh"      ; NSIS helper functions for calling RefTrack API
  !include "utility.nsh"          ; AOL Utility Plugin

  !include ".\${_LOCALE_}\stringtable.nsh"		; localized string resources and constants
  
;---------------------------------
; Build Sanity Checks 
;		(Ensure needed constants are defined because NSIS will build without these defined otherwise)

	!ifndef PRODUCT_NAME    ; This is the product brand name
		!error "PRODUCT_NAME must be defined in stringtable.nsh"
	!endif

	!ifndef _CMPRODVER_    ; This is the 2 part product version (eg: "2.0")
		!error "_CMPRODVER_ (eg: '2.0.1.1') must be defined"
	!endif

	!ifndef _PRODUCT_MAJORVER_    ; This is the 2 part product version (eg: "2.0")
		!error "_PRODUCT_MAJORVER_ (eg: '2.0') must be defined"
	!endif

	!ifndef _EXENAME_    ; This is name of the installer EXE
		!error "_EXENAME_ (name of installer EXE - eg: 'myinst.exe') must be defined"
	!endif

  !ifndef LANG_PACK        
  	!ifndef UNINSTNAME    ; This is name of the uninstaller EXE
  		!error "UNINSTNAME (name of uninstaller EXE - eg: 'uninst.exe') must be defined in defines_consts_vars.nsh"
  	!endif

  	!ifndef UNINSTICON			; Pathname of icon file to use in default Add/Remove Programs
  		!define UNINSTICON "$COMMONFILES\AOL\AOLLaunch.exe"
  	!endif

  	!ifndef PRODUCT_UNINSTSTRING		; Used when creating default "Add/Remove Programs" entry
  		!error "PRODUCT_UNINSTSTRING (string shown to user in 'Add/Remove Programs') must be defined in stringtable.nsh"
  	!endif
	
  	!ifndef PROD_MASTERFILE		; Used to form Strauss-style reference tracking entries
  		!error 'PROD_MASTERFILE must be defined in defines_consts_vars.nsh (can be "" if no Strauss-style RefTracking required)'
  	!endif
  !endif   ; LANG_PACK
	
	!ifndef INSTALL_DIRECTORY    ; This is where product is installed -- Also where NSIS install log goes
		!error "INSTALL_DIRECTORY (where product binaries are installed) must be defined in defines_consts_vars.nsh"
	!endif

	!ifndef APP_ID_USED_BY_PROGUPD    ; Used by UpdateProgress and SetReboot
		!error "APP_ID_USED_BY_PROGUPD must be defined in defines_consts_vars.nsh (MAX 6 chars -- all lowercase)"
	!endif
	
	!ifndef REGKEYMAIN			; Used to store the product installation folder info
		!error "REGKEYMAIN (registry key path for product data) must be defined in defines_consts_vars.nsh"
	!endif
	
	!ifndef ERR_UNINSTCONFLICT			; Message box string
		!error "ERR_UNINSTCONFLICT (error message shown when user runs simultaneous installs/uninstalls) must be defined in stringtable.nsh"
	!endif
	 
	!ifndef MSG_NO_ADMIN			; Message box string
		!error "MSG_NO_ADMIN (error message shown when user not Administrator) must be defined in stringtable.nsh"
	!endif
   
	!ifndef MSG_UNINST_SUCC			; Message box string
		!error "MSG_UNINST_SUCC (success message shown when user completes uninstall) must be defined in stringtable.nsh"
	!endif

;--------------------------------
; Build and Install Settings

	AllowRootDirInstall false
	
	SilentInstall silent
	SilentUninstall silent
	
  ;Name and file
  Name "${PRODUCT_NAME} ${_PRODUCT_MAJORVER_}"
  OutFile "${_EXENAME_}"

;--------------------------------
; Version Information Block
	
			!include "version_info.nsh"

;--------------------------------
; Special Support Macros -- Custom user features

			!include "functions.nsh"

;--------------------------------
; InstallTypes -- Each becomes an option in the MUI_PAGE_COMPONENTS dialog

	InstType "Typical"
	InstType /NOCUSTOM

	!define MAXINSTTYPES 1

;--------------------------------
; Installation - This is where you write your installer

Section "S_Main" Sec_Main_Sys
SectionIn 1 RO    ; Typical install

	; ** Call the utility plugin from inside a section
  ; ** to make available in the HFE
	utility::IsInstDriverSyncMutxOpen /NOUNLOAD
	Pop $0
	
	; Initialize the progress bar
	Push "1"
	Call UpdateProgress

	; ********************************
	; Do optional pre-install version check
	; ********************************

  Call CheckVersion
  Pop $INSTALL_MODE
  StrCmp 0 $INSTALL_MODE 0 endVerChk
    ; Stop install now without reporting error
    Push "100"             ; percent done
    Call UpdateProgress
   
    ; Update the exit code to indicate no error
    WriteIniStr $INI_PATH $SECTION "ExitCode" "0"

    SetErrorLevel 4        ; Indicate install ended due to version check fail
    Quit                   ; Exit install NOW without processing callback functions
  endVerChk:

	; Ensure destination folder exists before using it
  CreateDirectory "$INSTDIR"

	; Turn Install Logging ON 
	LogSet on
  LogText "****** Start Log ******"
  LogText "Passed Key file, command line, and product version checks"
  LogText "Installing to '$INSTDIR'"
  LogText "INSTALL_MODE = '$INSTALL_MODE' (1=Non-upgrade; 2=Upgrade)"
  LogText "Path to install configuration file: '$INI_PATH'"
  LogText "Section within configuration file to use: '$SECTION'"
  
  ; Update the exit code
  WriteIniStr $INI_PATH $SECTION "ExitCode" "1"

!ifndef LANG_PACK        
  StrCmp "$IS_ISLAND" "Y" skip_uninstaller_and_refs

    ;Create uninstaller (Needed for Rollback so install it first)
    WriteUninstaller "$INSTDIR\${UNINSTNAME}"

    ; Create Add/Remove entry for the app, if applicable
    StrCmp $DO_ADDREMOVE_ENTRY "Y" 0 skipOSAddRemovePrograms1
      ; Add entry to Add/Remove Programs only when uberuninstaller absent
      IfFileExists "$COMMONFILES\AOL\Uninstaller.exe" skipOSAddRemovePrograms1
        ; Uberuninstaller not present -- Force Add/Remove Programs Entry
        StrCpy $DO_ADDREMOVE_ENTRY "A"
  skipOSAddRemovePrograms1:
  
    StrCmp $DO_ADDREMOVE_ENTRY "A" 0 skipOSAddRemovePrograms2
		WriteRegStr HKLM "${PRODUCT_UNINST_REGKEY}\${PRODUCT_NAME} ${_PRODUCT_MAJORVER_}" "DisplayName" "${PRODUCT_UNINSTSTRING}"
		WriteRegStr HKLM "${PRODUCT_UNINST_REGKEY}\${PRODUCT_NAME} ${_PRODUCT_MAJORVER_}" "DisplayIcon" "${UNINSTICON}"
		WriteRegStr HKLM "${PRODUCT_UNINST_REGKEY}\${PRODUCT_NAME} ${_PRODUCT_MAJORVER_}" "UninstallString" "$INSTDIR\${UNINSTNAME}"
  skipOSAddRemovePrograms2:

	; ********************************
	; Prepare for Reference Tracking and Rollback support
	; ********************************
	
  !include "references.nsh"
  skip_uninstaller_and_refs:

!endif

	; ********************************
	; Begin Installation
	; ********************************
	
	SetOutPath "$INSTDIR"   ; Set installation working folder to selected installation folder

!ifndef LANG_PACK        
	; **** Store installation folder ****
	StrCmp "$IS_ISLAND" "Y" +2
  	WriteRegStr HKLM "${REGKEYMAIN}" "InstallDir" $INSTDIR
!endif

SectionEnd

;--------------------------------
; Fileset - This is where the unique fileset is included to be installed

        !include "fileset.nsh"

Section "S_Cleanup" Cleanup
SectionIn 1 RO    ; Typical install

SectionEnd

!ifndef LANG_PACK        
;--------------------------------
; Uninstallation - This is where you write your uninstaller

Section "Uninstall" Sec_Uninstall_Main

;--------------------------------
; Uninstallation - This is where you include your uninstaller

        !include "uninst.nsh"

!ifndef LANG_PACK        
	; Uninstall uninstaller -- If it is still there
	IfFileExists "${INSTALL_DIRECTORY}\${UNINSTNAME}" 0 +2
		Delete /REBOOTOK "${INSTALL_DIRECTORY}\${UNINSTNAME}"
	
	; **** Remove registry keys but only for shared EE ****
	StrCmp "$IS_ISLAND" "Y" endCommonRgeKeyDelChk
  	DeleteRegValue HKLM "${REGKEYMAIN}" "InstallDir"
  	DeleteRegKey /ifempty HKLM "${REGKEYMAIN}"
!ifdef REGKEYPROD
	DeleteRegKey /ifempty HKLM "${REGKEYPROD}"	
!endif
        	
	; Remove OS Add/Remove Programs entry
	DeleteRegKey HKLM "${PRODUCT_UNINST_REGKEY}\${PRODUCT_NAME} ${_PRODUCT_MAJORVER_}"
endCommonRgeKeyDelChk:	
!endif

	DeleteRegKey /ifempty HKLM "${REGKEYAOLMAIN}"	

SectionEnd
!endif

;================================
; Functions
;================================

;--------------------------------
; Installation Callbacks -- Called automatically by NSIS installer

Function .onInit
	; ****** Initialize Uninstaller Path Variables ******
  StrCpy $ISLAND_DIR ""

  ; Determine EE Dir
  ReadRegStr "$EE_DIR" HKLM "SOFTWARE\America Online\OCP" "InstallDir"

	; **** Process Command Line ****
  Push "IniPath"
  Push ""
  Call GetParameterValue
  Pop $INI_PATH
  
  Push "section"
  Push ""
  Call GetParameterValue
  Pop $SECTION

  Push "ds"
  Push ""
  Call GetParameterValue
  Pop $DISK_SPACE

  Push "islandpath"
  Push ""
  Call GetParameterValue
  Pop $ISLAND_DIR
  
  StrCmp "$ISLAND_DIR" "" 0 elseIsIslandInstall
    StrCpy $IS_ISLAND "N"   ; installpath not specified -- Installing to Shared EE
    Goto endIsIslandInstall
  elseIsIslandInstall:
    StrCpy $IS_ISLAND "Y"   ; installpath specified -- Installing to Island EE
    StrCpy $EE_DIR $ISLAND_DIR
  endIsIslandInstall:

  ; Determine Common App Data Dir
  ReadRegStr $COM_APP_DATA HKLM "Software\Microsoft\Windows\CurrentVersion\explorer\Shell Folders" "Common AppData"
  StrCmp $COM_APP_DATA "" 0 endCOM_APP_DATA
    StrCpy $COM_APP_DATA "$WINDIR\All Users\Application Data"   ; Default if all else fails
  endCOM_APP_DATA:

  ;Default installation folder
  StrCpy $INSTDIR "${INSTALL_DIRECTORY}"



  ; **** Ensure Proper Environment for Operation ****
  ; Prevent launch when ProgUpd not present 
  ; and/or command line doesn't contain key info
  IfFileExists "$TEMP\ProgUpd.dll" 0 elseKeyFileMissing   ; Progress updates and RefTracking
    StrCmp "" "$INI_PATH" elseKeyFileChk
      IfFileExists "$INI_PATH" 0 elseKeyFileMissing       ; Suite install config file
        StrCmp "" "$SECTION" elseKeyFileChk endKeyFileChk          ; Section to use within config file
  elseKeyFileMissing:
    ; Key file(s) missing
    SetErrorLevel 5
    Quit    ; FATAL ERROR -- Key Files missing -- Exit
  elseKeyFileChk:
    ; Necessary command line options missing
    SetErrorLevel 6
    Quit    ; FATAL ERROR -- Necessary command line options missing -- Exit
  endKeyFileChk:
  
  ; **** Do Command Line Tasks ****
  StrCmp "$DISK_SPACE" "Y" 0 skipWriteDiskSpace
	  ; A diskspace query requires a valid Installer Driver config file -- Ensure it exists
		IfFileExists "$INI_PATH" endIniExistChk2
  		Abort		; Fatal Error -- Configuration file missing
  	endIniExistChk2:
  
		StrCmp $SECTION "" 0 endSectionChk2
  		Abort		; Fatal Error -- Do not know what section to use
  	endSectionChk2:
  
	  ; Get the size of the installer
	  Call CalcReqDiskspace
  	;SectionGetSize ${Sec_Main} $0
  
	  ; Update the ini with the disk space required
	  WriteIniStr "$INI_PATH" $SECTION "SysSize" "$SYSSPACE"
	  WriteIniStr "$INI_PATH" $SECTION "AltSize" "$ALTSPACE"
	  WriteIniStr "$INI_PATH" $SECTION "TmpSize" "$TMPSPACE"
	  
    ; Update the exit code
    WriteIniStr $INI_PATH $SECTION "ExitCode" "2"

	  Quit
	skipWriteDiskSpace:

	; Determine Uninstaller Display string
	IfFileExists "$INI_PATH" elseIniExistChk1 0
		; Assume running standalone -- Use defaults
 		StrCpy $DO_ADDREMOVE_ENTRY "Y"
 		StrCpy $PRODUCT_UNINSTSTR "${PRODUCT_UNINSTSTRING}"
 		Goto endIniExistChk1
 	elseIniExistChk1:
 		; INI file exists
		StrCmp $SECTION "" 0 endSectionChk1
  		Abort		; Fatal Error -- Do not know what section to use
  	endSectionChk1:
  
  	; Use INI defined values
  	ReadIniStr $PRODUCT_UNINSTSTR $INI_PATH $SECTION "AOLUninstStr"
  	ReadIniStr $DO_ADDREMOVE_ENTRY $INI_PATH $SECTION "OSAddRemove"
 	endIniExistChk1:
FunctionEnd

Function .onInstSuccess
  
  ; Update the exit code
  WriteIniStr $INI_PATH $SECTION "ExitCode" "0"

	IfRebootFlag 0 endRebootFlagChk
		SetRebootFlag false	; suppress reboots
		
		Call SetReboot    ; No return code
	endRebootFlagChk:
	
	; Ensure that 100% is reported for a successful install
	Push "100"
	Call UpdateProgress

FunctionEnd

Function .onInstFailed

; User has cancelled or an exit via "Abort" occurred

  SetErrorLevel 3   ; indicate "Abort" called
        
	SetRebootFlag false	; suppress reboots

FunctionEnd

; *** Special Callbacks ***
; These may return allowing the install to continue
; -- Ensure that the values of any registers ($0 to $9 and $R0 to $R9) are preserved

Function .onUserAbort
	Abort ; Do not allow user to cancel in middle of component install.
FunctionEnd


;--------------------------------
; Uninstallation Callbacks -- Called automatically by NSIS uninstaller

Function un.onInit
        
  ; Open Uninstaller Mutex
  utility::OpenUninstallerSyncMutx /NOUNLOAD
  Pop $0

	; ****** Initialize Uninstaller Path Variables ******
  ;Determine EE Dir
  ReadRegStr "$EE_DIR" HKLM "SOFTWARE\America Online\OCP" "InstallDir"

  ; Determine Common App Data Dir
	ReadRegStr $COM_APP_DATA HKLM "Software\Microsoft\Windows\CurrentVersion\explorer\Shell Folders" "Common AppData"
	StrCmp $COM_APP_DATA "" 0 endCOM_APP_DATA
		StrCpy $COM_APP_DATA "$WINDIR\All Users\Application Data"   ; Default if all else fails
	endCOM_APP_DATA:

	; ****** Read Command Line ******
  ; Check cmd line param to see if we need to check mutex
  Push "CheckMutx"
  Push ""
  Call un.GetParameterValue
  Pop $CHECK_MUTX
 
!ifndef FORCE_NOMTXCHK    ; Used to allow customization of mutex check -- Use with extreme caution
  StrCmp "$CHECK_MUTX" "N" skipMutxCheck 0
		; The following plug-in function to check if the mutex is open
		; actually opens the mutex.  So there is no need to explictly
		; open it again.
		utility::IsInstDriverSyncMutxOpen /NOUNLOAD
		Pop $0
		StrCmp $0 "1" mutexNotAlreadyOpen
			MessageBox MB_OK "${ERR_UNINSTCONFLICT}"	; This string is Localizable
			Abort
		mutexNotAlreadyOpen:
	skipMutxCheck:
!endif  ; FORCE_NOMTXCHK 

  Push "PopUpMsgBox"
  Push ""
  Call un.GetParameterValue
  Pop $POP_MSG_BOX

	; ****** Check for Correct Permissions ******
  UserInfo::GetAccountType
  Pop $0
  StrCmp "$0" "Admin" continueUninstall 0
    MessageBox MB_OK "${MSG_NO_ADMIN}"		; This string is Localizable
		Abort
  continueUninstall:

FunctionEnd

Function un.onUninstSuccess
  StrCmp "$POP_MSG_BOX" "N" skipMsgBox 0
	  MessageBox MB_ICONINFORMATION|MB_OK "${MSG_UNINST_SUCC}"
  skipMsgBox:
  
  ; Set RunOnce entry so other AOL apps know not to install/uninstall if a reboot is pending
  ; (only necessary if Uber Uninstaller not running, otherwise send reboot message)
  IfRebootFlag 0 noReboot
    FindWindow $0 "AOLUberUninstaller"
    IntCmp $0 0 noUberUninstaller
    	IntOp $R0 ${WM_USER} + 259	; Form reboot message value
      SendMessage $0 $R0 0 0 /TIMEOUT=30000		; Set timeout for 30 seconds to prevent hangs
      Goto noReboot
    noUberUninstaller:
    ; Uninstaller running standalone, so write the run once key
    WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" "AOLRebootNeeded" "regsvr32.exe /s"
  noReboot:
FunctionEnd

Function un.onUninstFailed

; User has cancelled or an exit via "Abort" occurred

	SetRebootFlag false	; suppress reboots

FunctionEnd

; *** Special Callbacks ***
; These may return allowing the uninstall to continue
; -- Ensure that the values of any registers ($0 to $9 and $R0 to $R9) are preserved

Function un.onUserAbort
	Abort ; Do not allow user to cancel in middle of component uninstall.
FunctionEnd


;--------------------------------
; Special Support Functions -- Custom user functions

; **** Installer Support ****
; Function to update progress
Function        UpdateProgress
  Exch $1  ; Pop PercentDone off stack and push current contents of $1 on stack
  Push $0  ; $0 used for AppID in this function
  Push $2  ; Return code from StdUpdateProgress

  IfFileExists "$TEMP\ProgUpd.dll" 0 noProgDLLPresent
    StrCpy $0 "${APP_ID_USED_BY_PROGUPD}"
  	System::Call '$TEMP\ProgUpd::StdUpdateProgress(t r0, i r1) i.r2'
	noProgDLLPresent:

  ; Restore previous values of $0 and $1 for calling routine
  Pop $2
  Pop $0
  Pop $1
FunctionEnd

; Function to set reboot
Function        SetReboot
  Push $0  ; $0 used for AppID in this function
  Push $1  ; Return code from SetReboot

  IfFileExists "$TEMP\ProgUpd.dll" 0 noProgDLLPresent
    StrCpy $0 "${APP_ID_USED_BY_PROGUPD}"
  	System::Call '$TEMP\ProgUpd::SetReboot(t r0) i.r1'
	noProgDLLPresent:

  ; Restore previous values of $0 and $1 for calling routine
  Pop $1
  Pop $0
FunctionEnd

Function	CalcReqDiskspace

	Push $0		; Index of Section to Query
	Push $1		; Section Name
	Push $2		; Temporary variable
	Push $3		; Diskspace required for section in K

	ClearErrors
	 
	StrCpy $0 "0"
loop:
	StrCpy $1 ""
	StrCpy $2 ""
	StrCpy $3 ""
	SectionGetText $0 $1
	IfErrors endDiskspaceScan
	StrCmp $1 "" continue

	ClearErrors
	 
	; Check if section is selected
	SectionGetFlags $0 $2
	IntOp $2 $2 & 1
	IntCmp $2 1 0 continue continue

	; Check where to apply diskspace for section
	StrCpy $2 $1 2 0
	StrCmp $2 "S_" checkSysSpace 0
	StrCmp $2 "A_" checkAltSpace 0
	StrCmp $2 "T_" checkTmpSpace 0
	goto continue		; Section with improper name found
	
checkSysSpace:
	SectionGetSize $0 $3
	IntOp $SYSSPACE $SYSSPACE + $3
	goto fixName
checkTmpSpace:
	SectionGetSize $0 $3
	IntCmp $TMPSPACE $3 fixName 0 fixName		; Store only largest temp space found
	StrCpy "$TMPSPACE" "$3"
	goto fixName
checkAltSpace:
	SectionGetSize $0 $3
	IntOp $ALTSPACE $ALTSPACE + $3
	
fixName:
	SectionSetText $0 ""		; Make section hidden in components dialog
continue:
;	MessageBox MB_OK "Requirements for '$0' -> '$3'"
	IntOp $0 $0 + 1
	goto loop
endDiskspaceScan:
;MessageBox MB_OK "Sys :<$SYSSPACE> Alt : <$ALTSPACE>   Tmp:  <$TMPSPACE>"
	; Find Total Diskspace to be installed for progress reporting
	IntOp $TOTALSPACE $SYSSPACE + $TMPSPACE
	IntOp $TOTALSPACE $TOTALSPACE + $ALTSPACE

	; Uncomment the following line for debugging purposes
;	MessageBox MB_OK "Total Diskspace Requirements -> Sys='$SYSSPACE'; Tmp='$TMPSPACE'; Alt='$ALTSPACE'; Total='$TOTALSPACE'"

	Pop $3
	Pop $2
	Pop $1
	Pop $0
	
FunctionEnd

!ifndef LANG_PACK        
; **** Uninstaller Support ****

Function	un.CalcReqDiskspace

	; Add code to query all active uninstall sections for their uninstallation diskspace

FunctionEnd
!endif




