Contrib/ExperienceUI/XPUI.nsh
changeset 0 d5ce4c64ef88
child 2 ccebbad46f6a
equal deleted inserted replaced
-1:000000000000 0:d5ce4c64ef88
       
     1 ; NSIS ExperienceUI User Interface version 1.11
       
     2 ; Macro System and Main Logic
       
     3 ; Written by Dan Fuhry
       
     4 
       
     5 ; Copyright İ 2004-2006 Dan Fuhry
       
     6 ; Portions written by Joost Verburg
       
     7 ; Copyright İ 2002-2004 Joost Verburg
       
     8 
       
     9 ; This program is free software; you redistribute and/or modify it
       
    10 ; under the terms of the zlib/libpng license.
       
    11 
       
    12 ; This program is distributed in the hope that it will be useful,
       
    13 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    14 ; merchantability or fitness for a particular purpose.  See the
       
    15 ; zlib/libpng license for details.
       
    16 
       
    17 ; You should have received a copy of the zlib/libpng license with
       
    18 ; this program; if not, visit http://xpui.sf.net/docs/?start=legal.htm.
       
    19 
       
    20 !ifdef XPUI_INCLUDED
       
    21 !warning `The ExperienceUI was included multiple times. Please include it only once in your script.`
       
    22 !endif
       
    23 
       
    24 !ifndef XPUI_INCLUDED
       
    25 
       
    26 ; We're in. Set verbosity.
       
    27 
       
    28 !ifndef XPUI_VERBOSE
       
    29   !define XPUI_VERBOSE 1
       
    30 !endif
       
    31 
       
    32 !verbose push
       
    33 !verbose ${XPUI_VERBOSE}
       
    34 
       
    35 !define XPUI_INCLUDED
       
    36 !define XPUI_VERSION 1.11
       
    37 
       
    38 !ifndef XPUI_SYSDIR
       
    39   !define XPUI_SYSDIR "${NSISDIR}\Contrib\ExperienceUI"
       
    40 !endif
       
    41 
       
    42 ; Do some pretty stuff
       
    43 
       
    44 !verbose 4
       
    45 
       
    46 ; my infamous (new) ASCII art
       
    47 !ifndef XPUI_SILENT
       
    48 !echo "\
       
    49 +-------------------------------------------------------------------------------------------------+$\n\
       
    50 |                                                                             /ŻŻ|  /ŻŻ|  /ŻŻ|    |$\n\
       
    51 | |ŻŻŻŻŻŻŻ|                         _                           |Ż|  |Ż| |Ż| / / | / / | / / |    |$\n\
       
    52 | | |ŻŻŻŻŻ                         |_|                          | |  | | | |  Ż| |  Ż| |  Ż| |    |$\n\
       
    53 | |  ŻŻŻ|   _  _        ___   ___   _   ___   ____    ____  ___ | |  | | | |   | |   | |   | |    |$\n\
       
    54 | | |ŻŻŻ    \\// |ŻŻŻ\ / __\ |  _| | | / __\ |  _  \ / __/ / __\| |__| | | |   | |   | |   | |    |$\n\
       
    55 | |  ŻŻŻŻŻ| //\\ | __/ \___/ |_|   |_| \___/ |_| |_| \___\ \___/\______/ |_|   |_| O |_|   |_|    |$\n\
       
    56 |  ŻŻŻŻŻŻŻ  Ż  Ż |_|                                                       [ A better installer ] |$\n\
       
    57 +-------------------------------------------------------------------------------------------------+$\n"
       
    58 
       
    59 !echo `NSIS ExperienceUI User Interface version ${XPUI_VERSION}   $\n\
       
    60        Copyright İ 2004-2005 Dan Fuhry                            $\n\
       
    61                                                                   $\n\
       
    62        Portions written by Joost Verburg                          $\n\
       
    63        Copyright İ 2002-2004 Joost Verburg                        $\n\
       
    64                                                                   $\n\
       
    65        XPUI: Processing XPUI code...                       $\n`
       
    66 
       
    67 !endif
       
    68 
       
    69 !verbose ${XPUI_VERBOSE}
       
    70 
       
    71 ; Compiler check
       
    72 
       
    73 !define XPUI_NSIS_REQUIRED_FLAGS "NSIS_CONFIG_VISIBLE_SUPPORT | \
       
    74                                   NSIS_CONFIG_ENHANCEDUI_SUPPORT | \
       
    75                                   NSIS_SUPPORT_CODECALLBACKS | \
       
    76                                   NSIS_SUPPORT_INTOPTS | \
       
    77                                   NSIS_SUPPORT_STROPTS | \
       
    78                                   NSIS_SUPPORT_STACK | \
       
    79                                   NSIS_SUPPORT_INIFILES | \
       
    80                                   NSIS_SUPPORT_EXECUTE | \
       
    81                                   NSIS_SUPPORT_FILE | \
       
    82                                   NSIS_SUPPORT_DELETE | \
       
    83                                   NSIS_SUPPORT_MESSAGEBOX | \
       
    84                                   NSIS_CONFIG_PLUGIN_SUPPORT"
       
    85 
       
    86   !ifndef ${XPUI_NSIS_REQUIRED_FLAGS}
       
    87           
       
    88     !verbose 4
       
    89     !error   "$\n  ExperienceUI: FATAL: MakeNSIS was compiled without certain options that are required in order for the \
       
    90                 ExperienceUI to work.$\n  The compiler options required in order for core ExperienceUI functionality are: \
       
    91                 ${XPUI_NSIS_REQUIRED_FLAGS}.$\n  Please remove the ExperienceUI from your script or recompile NSIS to \
       
    92                 support these features."
       
    93   !endif
       
    94   
       
    95 ; Variables
       
    96   
       
    97 Var /GLOBAL XPUI_TEMP1
       
    98 Var /GLOBAL XPUI_TEMP2
       
    99 Var /GLOBAL XPUI_ABORTED
       
   100 Var /GLOBAL XPUI_HWND
       
   101 Var /GLOBAL XPUI_NOABORTWARNING
       
   102 
       
   103 ; Basic macros
       
   104 
       
   105 !macro XPUI_DEFAULT S V
       
   106   !ifndef `${S}`
       
   107     !define `${S}` `${V}`
       
   108   !endif
       
   109 !macroend
       
   110 
       
   111 !macro XPUI_SET S V
       
   112   !ifdef `${S}`
       
   113     !undef `${S}`
       
   114   !endif
       
   115   !define `${S}` `${V}`
       
   116 !macroend
       
   117 
       
   118 !macro XPUI_UNSET S
       
   119   !ifdef `${S}`
       
   120     !undef `${S}`
       
   121   !endif
       
   122 !macroend
       
   123 
       
   124 !macro MUI_DEFAULT S V
       
   125   !ifndef `${S}`
       
   126     !define `${S}` `${V}`
       
   127   !endif
       
   128 !macroend
       
   129 
       
   130 !macro XPUI_SET_QUOTE_ALT SYMBOL CONTENT
       
   131   !ifdef "${SYMBOL}"
       
   132     !undef "${SYMBOL}"
       
   133   !endif
       
   134   !define "${SYMBOL}" "${CONTENT}"
       
   135 !macroEnd
       
   136 
       
   137 !macro XPUI_CREATEID
       
   138 
       
   139   !ifndef XPUI_UNIQUEID
       
   140     !define XPUI_UNIQUEID ${__LINE__}
       
   141   !endif
       
   142 
       
   143   !ifdef XPUI_UNIQUEID
       
   144     !undef XPUI_UNIQUEID
       
   145     !define XPUI_UNIQUEID ${__LINE__}
       
   146   !endif
       
   147 
       
   148 !macroend
       
   149 
       
   150 !macro XPUI_CONVERT XPUI MUI
       
   151 
       
   152   !ifdef ${MUI}
       
   153     !insertmacro XPUI_SET ${XPUI} `${${MUI}}`
       
   154     !undef ${MUI}
       
   155   !endif
       
   156 
       
   157 !macroend
       
   158 
       
   159 !macro XPUI_CONVERT_QUOTE_ALT XPUI MUI
       
   160 
       
   161   !ifdef ${MUI}
       
   162     !insertmacro XPUI_SET_QUOTE_ALT ${XPUI} "${${MUI}}"
       
   163   !endif
       
   164 
       
   165 !macroend
       
   166 
       
   167 !macro XPUI_CONTROL_SKIN HWND
       
   168   !ifdef XPUI_FASTERSKINNING
       
   169     SetCtlColors ${HWND} `${XPUI_TEXT_COLOR}` `${XPUI_TEXT_BGCOLOR}`
       
   170   !else
       
   171   !ifdef XPUI_INTERNAL_INTERFACE_INSERTED
       
   172     SetCtlColors ${HWND} `${XPUI_TEXT_COLOR}` `${XPUI_TEXT_BGCOLOR}`
       
   173   !else
       
   174     !ifndef XPUI_EXTERNAL_SKINNER
       
   175       Push "${HWND}"
       
   176       Call ${XPUI_UNFUNC}xpui.SkinControl
       
   177       Pop "${HWND}"
       
   178     !endif
       
   179   !endif
       
   180   !endif
       
   181 !macroend
       
   182 
       
   183 !macro XPUI_CONTROL_SKIN_LIGHT HWND
       
   184   !ifdef XPUI_FASTERSKINNING
       
   185     SetCtlColors ${HWND} `${XPUI_TEXT_LIGHTCOLOR}` `${XPUI_TEXT_BGCOLOR}`
       
   186   !else
       
   187   !ifdef XPUI_INTERNAL_INTERFACE_INSERTED
       
   188     SetCtlColors ${HWND} `${XPUI_TEXT_LIGHTCOLOR}` `${XPUI_TEXT_BGCOLOR}`
       
   189   !else
       
   190   !ifndef XPUI_EXTERNAL_SKINNER
       
   191   Push "${HWND}"
       
   192   Call ${XPUI_UNFUNC}xpui.SkinControl.light
       
   193   Pop "${HWND}"
       
   194   !endif
       
   195   !endif
       
   196   !endif
       
   197 !macroend
       
   198 
       
   199 !macro XPUI_CONTROL_SKIN_TRANS HWND
       
   200   !ifdef XPUI_FASTERSKINNING
       
   201     SetCtlColors ${HWND} `${XPUI_TEXT_COLOR}` `Transparent`
       
   202   !else
       
   203   !ifdef XPUI_INTERNAL_INTERFACE_INSERTED
       
   204     SetCtlColors ${HWND} `${XPUI_TEXT_COLOR}` `Transparent`
       
   205   !else
       
   206   !ifndef XPUI_EXTERNAL_SKINNER
       
   207   Push "${HWND}"
       
   208   Call ${XPUI_UNFUNC}xpui.SkinControl.trans
       
   209   Pop "${HWND}"
       
   210   !endif
       
   211   !endif
       
   212   !endif
       
   213 !macroend
       
   214 
       
   215 !macro XPUI_CONTROL_SKIN_LIGHT_TRANS HWND
       
   216   !ifdef XPUI_FASTERSKINNING
       
   217     SetCtlColors ${HWND} `${XPUI_TEXT_LIGHTCOLOR}` `Transparent`
       
   218   !else
       
   219   !ifdef XPUI_INTERNAL_INTERFACE_INSERTED
       
   220     SetCtlColors ${HWND} `${XPUI_TEXT_LIGHTCOLOR}` `Transparent`
       
   221   !else
       
   222   !ifndef XPUI_EXTERNAL_SKINNER  
       
   223   Push "${HWND}"
       
   224   Call ${XPUI_UNFUNC}xpui.SkinControl.light.trans
       
   225   Pop "${HWND}"
       
   226   !endif
       
   227   !endif
       
   228   !endif
       
   229 !macroend
       
   230 
       
   231 !macro XPUI_PAGE_CUSTOMFUNCTION Z
       
   232 
       
   233   !ifdef XPUI_PAGE_CUSTOMFUNCTION_${Z}
       
   234     Call `${XPUI_PAGE_CUSTOMFUNCTION_${Z}}`
       
   235     !undef XPUI_PAGE_CUSTOMFUNCTION_${Z}
       
   236   !endif
       
   237   
       
   238   ; Modern UI Compatible
       
   239   !ifdef MUI_PAGE_CUSTOMFUNCTION_${Z}
       
   240     Call `${MUI_PAGE_CUSTOMFUNCTION_${Z}}`
       
   241     !undef MUI_PAGE_CUSTOMFUNCTION_${Z}
       
   242   !endif
       
   243   
       
   244 !macroend
       
   245 
       
   246 !macro XPUI_CONTROL_SKIN_PAGE HWND
       
   247   
       
   248   !ifndef XPUI_EXTERNAL_SKINNER
       
   249   !ifndef XPUI_BGIMAGE
       
   250   !insertmacro XPUI_CONTROL_SKIN ${HWND}
       
   251   !else
       
   252   !insertmacro XPUI_CONTROL_SKIN_TRANS ${HWND}
       
   253   !endif
       
   254   !endif
       
   255   
       
   256 !macroend
       
   257 
       
   258 !macro XPUI_PAGECOLOR_INIT ID
       
   259 
       
   260   Push $XPUI_HWND
       
   261   FindWindow $XPUI_HWND "#32770" "" $HWNDPARENT
       
   262   GetDlgItem $XPUI_HWND $XPUI_HWND ${ID}
       
   263   !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_HWND
       
   264   Pop $XPUI_HWND
       
   265 
       
   266 !macroend
       
   267 
       
   268 !macro XPUI_PAGEMODE_INST
       
   269   !echo `XPUI Page Mode: INSTALL`
       
   270   !insertmacro XPUI_SET XPUI_PAGEMODE_INSERTED ``
       
   271   !insertmacro XPUI_SET XPUI_UN ``
       
   272   !insertmacro XPUI_SET XPUI_UNINST ``
       
   273   !insertmacro XPUI_SET XPUI_UNFUNC ``
       
   274   !insertmacro XPUI_SET XPUI_PAGEMODE `Install`
       
   275 !macroend
       
   276 
       
   277 !macro XPUI_PAGEMODE_UNINST
       
   278   !echo `XPUI Page Mode: UNINSTALL`
       
   279   !insertmacro XPUI_SET XPUI_PAGEMODE_INSERTED ``
       
   280   !insertmacro XPUI_SET XPUI_UN `UN`
       
   281   !insertmacro XPUI_SET XPUI_UNINST `Uninst`
       
   282   !insertmacro XPUI_SET XPUI_UNFUNC `un.`
       
   283   !insertmacro XPUI_SET XPUI_PAGEMODE `Uninstall`
       
   284   
       
   285   !ifndef XPUI_UNINSTALLER
       
   286     !define XPUI_UNINSTALLER
       
   287   !endif
       
   288 !macroend
       
   289 
       
   290 !macro XPUI_PAGEMODE_PUSH
       
   291   !insertmacro XPUI_SET XPUI_UN_PUSHED "${XPUI_UN}"
       
   292   !insertmacro XPUI_SET XPUI_UNINST_PUSHED "${XPUI_UNINST}"
       
   293   !insertmacro XPUI_SET XPUI_UNFUNC_PUSHED "${XPUI_UNFUNC}"
       
   294 !macroend
       
   295 
       
   296 !macro XPUI_PAGEMODE_POP
       
   297   !insertmacro XPUI_SET XPUI_UN "${XPUI_UN_PUSHED}"
       
   298   !insertmacro XPUI_SET XPUI_UNINST "${XPUI_UNINST_PUSHED}"
       
   299   !insertmacro XPUI_SET XPUI_UNFUNC "${XPUI_UNFUNC_PUSHED}"
       
   300 !macroend
       
   301 
       
   302 !macro XPUI_HEADER_TEXT T S
       
   303   Push $XPUI_TEMP1
       
   304   GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1037
       
   305   SendMessage $XPUI_TEMP1 0xC 0 `STR:${T}`
       
   306   GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1038
       
   307   SendMessage $XPUI_TEMP1 0xC 0 `STR:${S}`
       
   308   !ifdef TEMP
       
   309     !define TEMP_PUSH `${TEMP}`
       
   310     !undef TEMP
       
   311   !endif
       
   312   !ifdef XPUI_HEADERIMAGE_NORESIZETOFIT
       
   313     !define TEMP " "
       
   314   !else
       
   315     !define TEMP /RESIZETOFIT
       
   316   !endif
       
   317   !ifndef XPUI_BGIMAGE
       
   318   SetBrandingImage /IMGID=1046 ${TEMP} "$PLUGINSDIR\Header.bmp" ; ...finally...
       
   319   !else
       
   320   SetBrandingImage /IMGID=1099 ${TEMP} "$PLUGINSDIR\BgImage.bmp"
       
   321   !endif
       
   322   !undef TEMP
       
   323   !ifdef TEMP_PUSH
       
   324     !define TEMP `${TEMP_PUSH}`
       
   325     !undef TEMP_PUSH
       
   326   !endif
       
   327   Pop $XPUI_TEMP1
       
   328 !macroend
       
   329 
       
   330 !macro XPUI_USERABORT
       
   331   StrCmp $XPUI_NOABORTWARNING 1 +7
       
   332   IfFileExists $PLUGINSDIR\Finish.ini `` +3
       
   333   WriteINIStr $PLUGINSDIR\Finish.ini `Field 1` State 0
       
   334   WriteINIStr $PLUGINSDIR\Finish.ini `Field 2` State 0
       
   335   StrCpy $XPUI_ABORTED 1
       
   336   SendMessage $HWNDPARENT `0x408` `1` ``
       
   337   Abort
       
   338 !macroend
       
   339 
       
   340 !macro XPUI_INNERDIALOG_TEXT TEXT ID
       
   341 
       
   342   Push $XPUI_HWND
       
   343   FindWindow $XPUI_HWND "#32770" "" $HWNDPARENT
       
   344   GetDlgItem $XPUI_HWND $XPUI_HWND `${ID}`
       
   345   SendMessage $XPUI_HWND 0xC 0 `STR:${TEXT}`
       
   346   Pop $XPUI_HWND
       
   347 
       
   348 !macroend
       
   349 
       
   350 !ifdef XPUI_WANSIS
       
   351   !ifndef XPUI_EXTERNAL_SKINNER
       
   352     !define XPUI_EXTERNAL_SKINNER
       
   353   !endif
       
   354 !endif
       
   355 
       
   356 ; Install Options
       
   357 
       
   358 !insertmacro XPUI_DEFAULT XPUI_INSTALLOPTIONS_MAXFIELD 1250
       
   359 
       
   360 !macro XPUI_INSTALLOPTIONS_EXTRACT FILE
       
   361   !verbose push
       
   362   !verbose ${XPUI_VERBOSE}
       
   363   InitPluginsDir
       
   364   File `/oname=$PLUGINSDIR\${FILE}` `${FILE}`
       
   365   !insertmacro XPUI_INSTALLOPTIONS_WRITE `${FILE}` `Settings` `RTL` `$(^RTL)`
       
   366   !verbose pop
       
   367 !macroend
       
   368 
       
   369 !macro XPUI_INSTALLOPTIONS_EXTRACT_AS FILE FILENAME
       
   370   !verbose push
       
   371   !verbose ${XPUI_VERBOSE}
       
   372   InitPluginsDir
       
   373   File `/oname=$PLUGINSDIR\${FILENAME}` `${FILE}`
       
   374   !insertmacro XPUI_INSTALLOPTIONS_WRITE `${FILENAME}` `Settings` `RTL` `$(^RTL)`
       
   375   !verbose pop
       
   376 !macroend
       
   377 
       
   378 !macro XPUI_INSTALLOPTIONS_DISPLAY FILE
       
   379   !verbose push
       
   380   !verbose ${XPUI_VERBOSE}
       
   381   !insertmacro XPUI_CREATEID
       
   382   StrCmp $XPUI_ABORTED 1 `` +2
       
   383   Abort
       
   384   WriteINIStr `$PLUGINSDIR\${FILE}` `Settings` `RTL` `$(^RTL)`
       
   385   InstallOptions::initDialog /NOUNLOAD `$PLUGINSDIR\${FILE}`
       
   386   Pop $XPUI_HWND
       
   387   !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_HWND
       
   388   LockWindow on
       
   389   StrCpy $XPUI_TEMP2 1199
       
   390   XPUI.loop.setctl.${XPUI_UNIQUEID}:
       
   391   IntOp $XPUI_TEMP2 $XPUI_TEMP2 + 1
       
   392   GetDlgItem $XPUI_TEMP1 $XPUI_HWND $XPUI_TEMP2
       
   393   !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_TEMP1
       
   394   IntCmp $XPUI_TEMP2 ${XPUI_INSTALLOPTIONS_MAXFIELD} `` XPUI.loop.setctl.${XPUI_UNIQUEID}
       
   395   GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1018
       
   396   !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_TEMP1
       
   397   SetBrandingImage /IMGID=1019 /RESIZETOFIT "$PLUGINSDIR\page.bmp"
       
   398   LockWindow off
       
   399   InstallOptions::show
       
   400   !verbose pop
       
   401 !macroend
       
   402 
       
   403 !macro XPUI_INSTALLOPTIONS_DISPLAY_RETURN FILE
       
   404   !verbose push
       
   405   !verbose ${XPUI_VERBOSE}
       
   406   !insertmacro XPUI_CREATEID
       
   407   StrCmp $XPUI_ABORTED 1 `` +2
       
   408   Abort
       
   409   WriteINIStr `$PLUGINSDIR\${FILE}` `Settings` `RTL` `$(^RTL)`
       
   410   InstallOptions::initDialog /NOUNLOAD `$PLUGINSDIR\${FILE}`
       
   411   Pop $XPUI_HWND
       
   412   LockWindow on
       
   413   !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_HWND
       
   414   StrCpy $XPUI_TEMP2 1199
       
   415   XPUI.loop.setctl.${XPUI_UNIQUEID}:
       
   416   IntOp $XPUI_TEMP2 $XPUI_TEMP2 + 1
       
   417   GetDlgItem $XPUI_TEMP1 $XPUI_HWND $XPUI_TEMP2
       
   418   StrCmp $XPUI_TEMP1 0 XPUI.done
       
   419   !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_TEMP1
       
   420   IntCmp $XPUI_TEMP2 ${XPUI_INSTALLOPTIONS_MAXFIELD} XPUI.done.${XPUI_UNIQUEID} XPUI.loop.setctl.${XPUI_UNIQUEID}
       
   421   XPUI.done.${XPUI_UNIQUEID}:
       
   422   SetBrandingImage /IMGID=1019 /RESIZETOFIT "$PLUGINSDIR\page.bmp"
       
   423   LockWindow off
       
   424   InstallOptions::show
       
   425   !verbose pop
       
   426 !macroend
       
   427 
       
   428 !macro XPUI_INSTALLOPTIONS_INITDIALOG FILE
       
   429   !verbose push
       
   430   !verbose ${XPUI_VERBOSE}
       
   431   !insertmacro XPUI_CREATEID
       
   432   StrCmp $XPUI_ABORTED 1 `` +2
       
   433   Abort
       
   434   WriteINIStr `$PLUGINSDIR\${FILE}` `Settings` `RTL` `$(^RTL)`
       
   435   InstallOptions::initDialog /NOUNLOAD `$PLUGINSDIR\${FILE}`
       
   436   Pop $XPUI_HWND
       
   437   LockWindow on
       
   438   !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_HWND
       
   439   StrCpy $XPUI_TEMP2 1199
       
   440   XPUI.loop.setctl.${XPUI_UNIQUEID}:
       
   441   IntOp $XPUI_TEMP2 $XPUI_TEMP2 + 1
       
   442   GetDlgItem $XPUI_TEMP1 $XPUI_HWND $XPUI_TEMP2
       
   443   StrCmp $XPUI_TEMP1 0 XPUI.done.${XPUI_UNIQUEID}
       
   444   !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_TEMP1
       
   445   IntCmp $XPUI_TEMP2 ${XPUI_INSTALLOPTIONS_MAXFIELD} XPUI.done.${XPUI_UNIQUEID} XPUI.loop.setctl.${XPUI_UNIQUEID}
       
   446   XPUI.done.${XPUI_UNIQUEID}:
       
   447   SetBrandingImage /IMGID=1019 /RESIZETOFIT "$PLUGINSDIR\page.bmp"
       
   448   LockWindow off
       
   449   Push $XPUI_HWND
       
   450   !verbose pop
       
   451 !macroend
       
   452 
       
   453 !macro XPUI_INSTALLOPTIONS_SHOW
       
   454 
       
   455   !verbose push
       
   456   !verbose ${XPUI_VERBOSE}
       
   457   InstallOptions::show
       
   458   Pop $XPUI_TEMP1
       
   459   !verbose pop
       
   460 !macroend
       
   461 
       
   462 !macro XPUI_INSTALLOPTIONS_SHOW_RETURN
       
   463 
       
   464   !verbose push
       
   465   !verbose ${XPUI_VERBOSE}
       
   466   InstallOptions::show
       
   467   !verbose pop
       
   468 !macroend
       
   469 
       
   470 !macro XPUI_INSTALLOPTIONS_READ VAR FILE SECTION KEY
       
   471   !verbose push
       
   472   !verbose ${XPUI_VERBOSE}
       
   473   ReadIniStr ${VAR} `$PLUGINSDIR\${FILE}` `${SECTION}` `${KEY}`
       
   474   !verbose pop
       
   475 !macroend
       
   476 
       
   477 !macro XPUI_INSTALLOPTIONS_WRITE FILE SECTION KEY VALUE
       
   478 
       
   479   !verbose push
       
   480   !verbose ${XPUI_VERBOSE}
       
   481   WriteIniStr `$PLUGINSDIR\${FILE}` `${SECTION}` `${KEY}` `${VALUE}`
       
   482   !verbose pop
       
   483 !macroend
       
   484 
       
   485 !macro XPUI_RESERVEFILE_INSTALLOPTIONS
       
   486   !verbose push
       
   487   !verbose ${XPUI_VERBOSE}
       
   488   ReserveFile `${NSISDIR}\Plugins\InstallOptions.dll`
       
   489   !verbose pop
       
   490 !macroend
       
   491 
       
   492 !macro MUI_INSTALLOPTIONS_EXTRACT F
       
   493   !insertmacro XPUI_INSTALLOPTIONS_EXTRACT `${F}`
       
   494 !macroend
       
   495 
       
   496 !macro MUI_INSTALLOPTIONS_EXTRACT_AS O N
       
   497   !insertmacro XPUI_INSTALLOPTIONS_EXTRACT_AS `${O}` `${N}`
       
   498 !macroend
       
   499 
       
   500 !macro MUI_INSTALLOPTIONS_DISPLAY F
       
   501   !insertmacro XPUI_INSTALLOPTIONS_DISPLAY `${F}`
       
   502 !macroend
       
   503 
       
   504 !macro MUI_INSTALLOPTIONS_DISPLAY_RETURN F
       
   505   !insertmacro XPUI_INSTALLOPTIONS_DISPLAY_RETURN `${F}`
       
   506 !macroend
       
   507 
       
   508 !macro MUI_INSTALLOPTIONS_INITDIALOG F
       
   509   !insertmacro XPUI_INSTALLOPTIONS_INITDIALOG `${F}`
       
   510 !macroend
       
   511 
       
   512 !macro MUI_INSTALLOPTIONS_SHOW
       
   513   !insertmacro XPUI_INSTALLOPTIONS_SHOW
       
   514 !macroend
       
   515 
       
   516 !macro MUI_INSTALLOPTIONS_SHOW_RETURN
       
   517   !insertmacro XPUI_INSTALLOPTIONS_SHOW_RETURN
       
   518 !macroend
       
   519 
       
   520 !macro MUI_INSTALLOPTIONS_READ VAR FILE SECTION KEY
       
   521   !verbose push
       
   522   !verbose ${XPUI_VERBOSE}
       
   523   ReadIniStr ${VAR} `$PLUGINSDIR\${FILE}` `${SECTION}` `${KEY}`
       
   524   !verbose pop
       
   525 !macroend
       
   526 
       
   527 !macro MUI_INSTALLOPTIONS_WRITE FILE SECTION KEY VALUE
       
   528 
       
   529   !verbose push
       
   530   !verbose ${XPUI_VERBOSE}
       
   531   WriteIniStr `$PLUGINSDIR\${FILE}` `${SECTION}` `${KEY}` `${VALUE}`
       
   532   !verbose pop
       
   533 !macroend
       
   534 
       
   535 !macro MUI_RESERVEFILE_INSTALLOPTIONS
       
   536   !verbose push
       
   537   !verbose ${XPUI_VERBOSE}
       
   538   ReserveFile `${NSISDIR}\Plugins\InstallOptions.dll`
       
   539   !verbose pop
       
   540 !macroend
       
   541 
       
   542 ; Interface - Compile time settings
       
   543 
       
   544 !insertmacro XPUI_DEFAULT XPUI_UI          "${XPUI_SYSDIR}\UIs\UI.exe"
       
   545 
       
   546 ChangeUI all `${XPUI_UI}`
       
   547 
       
   548 !ifdef XPUI_WANSIS
       
   549   !ifndef XPUI_EXTERNAL_SKINNER
       
   550   !define XPUI_EXTERNAL_SKINNER
       
   551   !endif
       
   552 !endif
       
   553 
       
   554 !ifdef XPUI_BGIMAGE & XPUI_WANSIS
       
   555   !verbose push
       
   556   !verbose 4
       
   557   !warning "ExperienceUI: WARNING: The set of visual features you defined for the installer - XPUI_WANSIS and XPUI_BGIMAGE - does not work.  The ExperienceUI will use WAnsis support only."
       
   558   !undef XPUI_BGIMAGE
       
   559   !verbose pop
       
   560 !endif
       
   561 
       
   562 ; Interface - Runtime Settings
       
   563 
       
   564 !macro XPUI_INTERFACE
       
   565 
       
   566   ; Defaults
       
   567   
       
   568   ; Skin Includes
       
   569   !ifdef XPUI_SKIN
       
   570     !ifndef XPUI_SKIN_INCLUDED
       
   571     !define XPUI_SKIN_INCLUDED
       
   572     !verbose push
       
   573     !verbose 3 ; Allow errors to be exposed
       
   574     !include "${XPUI_SYSDIR}\Skins\${XPUI_SKIN}.xpuiskin"
       
   575     !verbose pop
       
   576     !endif
       
   577   !endif
       
   578   
       
   579   ; We'll just assume that if the user defined UMUI_SKIN he wants a UMUI-style installer
       
   580   !ifdef UMUI_SKIN
       
   581     !include "${NSISDIR}\Contrib\UltraModernUI\Skins\${UMUI_SKIN}.nsh"
       
   582     !insertmacro XPUI_LANGUAGE_CONVERT
       
   583   !endif
       
   584   
       
   585   !ifdef XPUI_BGIMAGE & XPUI_WANSIS
       
   586     !verbose 4
       
   587     !warning "ExperienceUI: WARNING: The set of visual features you defined for the installer - XPUI_WANSIS and XPUI_BGIMAGE - does not work.  The ExperienceUI will use WAnsis support only."
       
   588     !undef XPUI_BGIMAGE
       
   589   !endif
       
   590   
       
   591   ; WAnsis settings
       
   592   !ifdef XPUI_WANSIS
       
   593     !insertmacro XPUI_DEFAULT XPUI_WANSIS_SKIN Forum
       
   594     !insertmacro XPUI_DEFAULT XPUI_LEFTLOGO               `${XPUI_SYSDIR}\Skins\${XPUI_WANSIS_SKIN}\LeftLogo.bmp`
       
   595     !insertmacro XPUI_DEFAULT XPUI_BOTTOMIMAGE            ``
       
   596     !insertmacro XPUI_DEFAULT XPUI_UNBOTTOMIMAGE          ``
       
   597     !insertmacro XPUI_DEFAULT XPUI_BOTTOMIMAGE_BMP        `${XPUI_SYSDIR}\Skins\${XPUI_WANSIS_SKIN}\Bottom.bmp`
       
   598     !insertmacro XPUI_DEFAULT XPUI_WANSIS_GEN             `${XPUI_SYSDIR}\Skins\${XPUI_WANSIS_SKIN}\gen.bmp`
       
   599     !insertmacro XPUI_DEFAULT XPUI_WANSIS_GENEX           `${XPUI_SYSDIR}\Skins\${XPUI_WANSIS_SKIN}\genex.bmp`
       
   600     !insertmacro XPUI_DEFAULT XPUI_WANSIS_HEADERIMAGE_BMP `${XPUI_SYSDIR}\Skins\${XPUI_WANSIS_SKIN}\header.bmp`
       
   601     !insertmacro XPUI_DEFAULT XPUI_WANSIS_CHECKS          `${XPUI_SYSDIR}\Skins\${XPUI_WANSIS_SKIN}\checks.bmp`
       
   602     
       
   603     !insertmacro XPUI_DEFAULT XPUI_WANSIS_UI              `${XPUI_SYSDIR}\UIs\WAnsis_UI.exe`
       
   604     
       
   605     ChangeUI all `${XPUI_WANSIS_UI}`
       
   606     CheckBitmap `${XPUI_WANSIS_CHECKS}`
       
   607     
       
   608     !ifndef XPUI_EXTERNAL_SKINNER
       
   609       !define XPUI_EXTERNAL_SKINNER
       
   610     !endif
       
   611     
       
   612     !warning "ExperienceUI: WARNING: WAnsis has been known to be unstable with certain configurations."
       
   613     
       
   614   !endif
       
   615   
       
   616   ; Interface Colors
       
   617   !insertmacro XPUI_DEFAULT XPUI_TEXT_COLOR `0xB4D3EA`
       
   618   !insertmacro XPUI_DEFAULT XPUI_TEXT_BGCOLOR `0x566978`
       
   619   !insertmacro XPUI_DEFAULT XPUI_TEXT_LIGHTCOLOR `0xFFFFFF`
       
   620   
       
   621   !insertmacro XPUI_DEFAULT XPUI_HEADER_TEXT_COLOR "${XPUI_TEXT_COLOR}"
       
   622   
       
   623   ; Icons
       
   624   !insertmacro XPUI_DEFAULT XPUI_ICON `${NSISDIR}\Contrib\Graphics\Icons\XPUI-install.ico`
       
   625   !insertmacro XPUI_DEFAULT XPUI_UNICON `${NSISDIR}\Contrib\Graphics\Icons\XPUI-uninstall.ico`
       
   626 
       
   627   !ifdef XPUI_ICON
       
   628   Icon `${XPUI_ICON}`
       
   629   !Endif
       
   630 
       
   631   !ifdef XPUI_UNICON
       
   632   UninstallIcon `${XPUI_UNICON}`
       
   633   !Endif
       
   634   
       
   635   ; Check bitmap
       
   636   !ifndef XPUI_WANSIS
       
   637     !insertmacro XPUI_DEFAULT XPUI_CHECKBITMAP "${NSISDIR}\Contrib\Graphics\Checks\Modern.bmp"
       
   638     CheckBitmap "${XPUI_CHECKBITMAP}"
       
   639   !endif
       
   640   
       
   641   ; Header image
       
   642   !insertmacro XPUI_DEFAULT XPUI_HEADERIMAGE `${XPUI_SYSDIR}\Skins\Default\Header.bmp`
       
   643   !insertmacro XPUI_DEFAULT XPUI_UNHEADERIMAGE `${XPUI_HEADERIMAGE}`
       
   644 
       
   645   ; Left Logo
       
   646   !insertmacro XPUI_DEFAULT XPUI_LEFTLOGO `${XPUI_SYSDIR}\Skins\Default\LeftBranding.bmp`
       
   647   !insertmacro XPUI_DEFAULT XPUI_UNLEFTLOGO `${XPUI_LEFTLOGO}`
       
   648 
       
   649   ; Bottom Image
       
   650   
       
   651   !ifndef XPUI_BOTTOMIMAGE
       
   652     !define XPUI_BOTTOMIMAGE
       
   653   !endif
       
   654   !ifdef XPUI_NOBOTTOMIMAGE
       
   655     !undef XPUI_BOTTOMIMAGE
       
   656   !endif
       
   657 
       
   658   !ifndef XPUI_UNBOTTOMIMAGE
       
   659     !define XPUI_UNBOTTOMIMAGE
       
   660   !endif
       
   661   !ifdef XPUI_NOUNBOTTOMIMAGE
       
   662     !undef XPUI_UNBOTTOMIMAGE
       
   663   !endif
       
   664   
       
   665   !ifdef XPUI_BGIMAGE
       
   666     !ifndef XPUI_BOTTOMIMAGE
       
   667       !define XPUI_NOBOTTOMIMAGE
       
   668     !endif
       
   669     !ifndef XPUI_COMPONENTSPAGE_NODESC
       
   670       !define XPUI_COMPONENTSPAGE_NODESC
       
   671     !endif
       
   672   !endif
       
   673   
       
   674   !insertmacro XPUI_DEFAULT XPUI_BOTTOMIMAGE_BMP `${XPUI_SYSDIR}\Skins\Default\Bottom.bmp`
       
   675   !insertmacro XPUI_DEFAULT XPUI_UNBOTTOMIMAGE_BMP `${XPUI_BOTTOMIMAGE_BMP}`
       
   676   
       
   677   !ifdef XPUI_BGIMAGE
       
   678     !insertmacro XPUI_DEFAULT XPUI_BGIMAGE_BMP "${XPUI_SYSDIR}\Skins\Default\BgImage.bmp"
       
   679     !insertmacro XPUI_DEFAULT XPUI_BGIMAGE_UI  "${XPUI_SYSDIR}\UIs\BgUI.exe"
       
   680     ChangeUI all `${XPUI_BGIMAGE_UI}`
       
   681   !endif
       
   682 
       
   683   ; Branding Text
       
   684   !insertmacro XPUI_DEFAULT XPUI_BRANDINGTEXT ` `
       
   685   !insertmacro XPUI_DEFAULT XPUI_BRANDINGTEXT_COLOR_FG 606060
       
   686   !insertmacro XPUI_DEFAULT XPUI_BRANDINGTEXT_COLOR_BG 808080
       
   687   
       
   688   ; BG Gradient
       
   689   !ifndef XPUI_DISABLEBG
       
   690     !ifdef XPUI_BGGRADIENT
       
   691       !ifndef XPUI_BGGRADIENT_CUSTOMCOLORS
       
   692         BGGradient ${XPUI_TEXT_COLOR} ${XPUI_TEXT_BGCOLOR} ${XPUI_TEXT_LIGHTCOLOR}
       
   693       !endif
       
   694     !ifdef XPUI_BGGRADIENT_CUSTOMCOLORS
       
   695       !insertmacro XPUI_DEFAULT XPUI_BGGRADIENT_CUSTOMCOLORS_TOP `${XPUI_TEXT_COLOR}`
       
   696       !insertmacro XPUI_DEFAULT XPUI_BGGRADIENT_CUSTOMCOLORS_BOTTOM `${XPUI_TEXT_BGCOLOR}`
       
   697         !insertmacro XPUI_DEFAULT XPUI_BGGRADIENT_CUSTOMCOLORS_TEXT `${XPUI_TEXT_LIGHTCOLOR}`
       
   698         BGGradient `${XPUI_BGGRADIENT_CUSTOMCOLORS_TOP}` `${XPUI_BGGRADIENT_CUSTOMCOLORS_BOTTOM}` `${XPUI_BGGRADIENT_CUSTOMCOLORS_TEXT}`
       
   699       !endif
       
   700     !endif
       
   701   !endif
       
   702   
       
   703   ; Installer Attributes
       
   704   
       
   705   !ifdef XPUI_WANSIS
       
   706     XPStyle off
       
   707   !else
       
   708     XPStyle on
       
   709   !endif
       
   710   InstallColors `${XPUI_TEXT_COLOR}` `${XPUI_TEXT_BGCOLOR}`
       
   711   
       
   712   !insertmacro XPUI_DEFAULT XPUI_AUTOCLOSE false
       
   713   AutoCloseWindow ${XPUI_AUTOCLOSE}
       
   714   !insertmacro XPUI_DEFAULT XPUI_SHOWDETAILS show
       
   715   ShowInstDetails ${XPUI_SHOWDETAILS}
       
   716   
       
   717   ; Modern UI Compatibility
       
   718   !insertmacro XPUI_LANGUAGE_CONVERT
       
   719   
       
   720    !ifdef MUI_ABORTWARNING
       
   721   !ifndef XPUI_ABORTWARNING
       
   722   !define XPUI_ABORTWARNING
       
   723   !endif
       
   724   !endif
       
   725    !ifdef MUI_UNABORTWARNING
       
   726   !ifndef XPUI_UNABORTWARNING
       
   727   !define XPUI_UNABORTWARNING
       
   728   !endif
       
   729   !endif
       
   730   
       
   731   !ifndef XPUI_FASTERSKINNING
       
   732     !ifdef XPUI_INTERNAL_PAGEUSED_STARTMENU
       
   733       !insertmacro XPUI_STARTMENUPAGE_INITARRAY
       
   734     !endif
       
   735   !endif
       
   736   
       
   737   Function .onGUIInit
       
   738     !insertmacro XPUI_GUIINIT "" ""
       
   739   FunctionEnd
       
   740   
       
   741   !ifdef XPUI_UNINSTALLER
       
   742     Function un.onGUIInit
       
   743       !insertmacro XPUI_GUIINIT "UN" "un."
       
   744     FunctionEnd
       
   745   !endif
       
   746 
       
   747   !ifndef XPUI_FASTERSKINNING
       
   748     !ifdef XPUI_INTERNAL_PAGEUSED_STARTMENU
       
   749       !insertmacro XPUI_STARTMENUPAGE_INITARRAY
       
   750     !endif
       
   751   !endif
       
   752   
       
   753   Function .onGUIEnd
       
   754     LockWindow off
       
   755     !ifdef XPUI_WANSIS
       
   756       SetPluginUnload manual
       
   757       wansis::unskinit
       
   758     !endif
       
   759     
       
   760     !ifmacrodef XPUI_BGFILES_DELETE
       
   761 
       
   762         !ifdef XPUI_ENABLEBG
       
   763 
       
   764           !insertmacro XPUI_BGFILES_DELETE
       
   765 
       
   766         !endif
       
   767 
       
   768       !endif
       
   769       
       
   770   FunctionEnd
       
   771   
       
   772   !ifdef XPUI_UNINSTALLER
       
   773     Function un.onGUIEnd
       
   774       LockWindow off
       
   775       !ifdef XPUI_WANSIS
       
   776         SetPluginUnload manual
       
   777         wansis::unskinit
       
   778       !endif
       
   779       
       
   780      !ifmacrodef XPUI_BGFILES_DELETE
       
   781 
       
   782         !ifdef XPUI_ENABLEBG
       
   783 
       
   784           !insertmacro XPUI_BGFILES_DELETE
       
   785 
       
   786         !endif
       
   787 
       
   788       !endif
       
   789   
       
   790     FunctionEnd
       
   791   !endif
       
   792   
       
   793   !ifdef XPUI_ABORTWARNING
       
   794 
       
   795     Function .onUserAbort
       
   796     
       
   797       StrCmp $XPUI_NOABORTWARNING 1 xpui.exit
       
   798 
       
   799         MessageBox MB_YESNO|MB_ICONQUESTION "$(XPUI_ABORTWARNING_TEXT)" IDNO NoExit
       
   800         !insertmacro XPUI_USERABORT
       
   801         NoExit:
       
   802         Abort
       
   803 
       
   804       xpui.exit:
       
   805     
       
   806     FunctionEnd
       
   807   
       
   808   !endif
       
   809   
       
   810   !ifdef XPUI_ABORTWARNING & XPUI_UNINSTALLER
       
   811   
       
   812     Function un.onUserAbort
       
   813 
       
   814       StrCmp $XPUI_NOABORTWARNING 1 xpui.exit
       
   815 
       
   816         MessageBox MB_YESNO|MB_ICONQUESTION "$(XPUI_ABORTWARNING_TEXT)" IDNO NoExit
       
   817         !insertmacro XPUI_USERABORT
       
   818         NoExit:
       
   819         Abort
       
   820 
       
   821       xpui.exit:
       
   822 
       
   823     FunctionEnd
       
   824 
       
   825   !endif
       
   826   
       
   827   !ifdef XPUI_EXTERNAL_SKINNER | XPUI_FASTERSKINNING
       
   828   !else
       
   829   
       
   830     Function xpui.skinControl
       
   831       Exch "$XPUI_TEMP2"
       
   832       SetCtlColors $XPUI_TEMP2 "${XPUI_TEXT_COLOR}" "${XPUI_TEXT_BGCOLOR}"
       
   833       Exch "$XPUI_TEMP2"
       
   834     FunctionEnd
       
   835     
       
   836     Function xpui.skinControl.trans
       
   837       Exch "$XPUI_TEMP2"
       
   838       SetCtlColors $XPUI_TEMP2 "${XPUI_TEXT_COLOR}" "Transparent"
       
   839       Exch "$XPUI_TEMP2"
       
   840     FunctionEnd
       
   841     
       
   842     Function xpui.skinControl.light
       
   843       Exch "$XPUI_TEMP2"
       
   844       SetCtlColors $XPUI_TEMP2 "${XPUI_TEXT_LIGHTCOLOR}" "${XPUI_TEXT_BGCOLOR}"
       
   845       Exch "$XPUI_TEMP2"
       
   846     FunctionEnd
       
   847     
       
   848     Function xpui.skinControl.light.trans
       
   849       Exch "$XPUI_TEMP2"
       
   850       SetCtlColors $XPUI_TEMP2 "${XPUI_TEXT_LIGHTCOLOR}" "Transparent"
       
   851       Exch "$XPUI_TEMP2"
       
   852     FunctionEnd
       
   853     
       
   854     !ifdef XPUI_UNINSTALLER
       
   855   
       
   856       Function un.xpui.skinControl
       
   857         Exch "$XPUI_TEMP2"
       
   858         SetCtlColors $XPUI_TEMP2 "${XPUI_TEXT_COLOR}" "${XPUI_TEXT_BGCOLOR}"
       
   859         Exch "$XPUI_TEMP2"
       
   860       FunctionEnd
       
   861       
       
   862       Function un.xpui.skinControl.trans
       
   863         Exch "$XPUI_TEMP2"
       
   864         SetCtlColors $XPUI_TEMP2 "${XPUI_TEXT_COLOR}" "Transparent"
       
   865         Exch "$XPUI_TEMP2"
       
   866       FunctionEnd
       
   867       
       
   868       Function un.xpui.skinControl.light
       
   869         Exch "$XPUI_TEMP2"
       
   870         SetCtlColors $XPUI_TEMP2 "${XPUI_TEXT_LIGHTCOLOR}" "${XPUI_TEXT_BGCOLOR}"
       
   871         Exch "$XPUI_TEMP2"
       
   872       FunctionEnd
       
   873       
       
   874       Function un.xpui.skinControl.light.trans
       
   875         Exch "$XPUI_TEMP2"
       
   876         SetCtlColors $XPUI_TEMP2 "${XPUI_TEXT_LIGHTCOLOR}" "Transparent"
       
   877         Exch "$XPUI_TEMP2"
       
   878       FunctionEnd
       
   879     
       
   880     !endif
       
   881   
       
   882   !endif
       
   883   
       
   884 !macroend
       
   885 
       
   886 !macro XPUI_GUIINIT UN UNFUNC
       
   887 
       
   888   !insertmacro XPUI_PAGEMODE_PUSH
       
   889   !define XPUI_UNCHECK_${UN}
       
   890   !ifdef XPUI_UNCHECK_UN
       
   891     !insertmacro XPUI_PAGEMODE_UNINST
       
   892   !else
       
   893     !insertmacro XPUI_PAGEMODE_INST
       
   894   !endif
       
   895   !undef XPUI_UNCHECK_${UN}
       
   896 
       
   897   !ifndef XPUI_BGIMAGE
       
   898     InitPluginsDir
       
   899     SetOutPath $PLUGINSDIR
       
   900     File /oname=header.bmp "${XPUI_HEADERIMAGE}"
       
   901     !ifdef XPUI_BOTTOMIMAGE
       
   902     File /oname=btmimg.bmp "${XPUI_BOTTOMIMAGE_BMP}"
       
   903     !endif
       
   904     File /oname=leftimg.bmp "${XPUI_LEFTLOGO}"
       
   905   !else
       
   906     InitPluginsDir
       
   907     SetOutPath $PLUGINSDIR
       
   908     File /oname=BgImage.bmp "${XPUI_BGIMAGE_BMP}"
       
   909   !endif
       
   910   
       
   911   !ifndef XPUI_EXTERNAL_SKINNER  
       
   912     
       
   913     ; Skin the window background
       
   914     !ifndef XPUI_BGIMAGE
       
   915     GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1099
       
   916     !insertmacro XPUI_CONTROL_SKIN $XPUI_TEMP1
       
   917     !endif
       
   918     
       
   919     !ifdef XPUI_BOTTOMIMAGE
       
   920       GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1045
       
   921       ShowWindow $XPUI_TEMP1 0
       
   922     !else
       
   923       GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1039
       
   924       ShowWindow $XPUI_TEMP1 0
       
   925     !endif
       
   926     
       
   927     ; Left Message Box rect - hidden for now
       
   928     GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1304
       
   929     ShowWindow $XPUI_TEMP1 0
       
   930     
       
   931     ; Header text
       
   932     GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1037
       
   933     SetCtlColors $XPUI_TEMP1 `${XPUI_HEADER_TEXT_COLOR}` `Transparent`
       
   934     CreateFont $XPUI_TEMP2 "$(^Font)" 8 700
       
   935     SendMessage $XPUI_TEMP1 0x30 $XPUI_TEMP2 0
       
   936     
       
   937     GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1038
       
   938     SetCtlColors $XPUI_TEMP1 `${XPUI_HEADER_TEXT_COLOR}` `Transparent`
       
   939     CreateFont $XPUI_TEMP2 "$(^Font)" 8 350
       
   940     SendMessage $XPUI_TEMP1 0x30 $XPUI_TEMP2 0
       
   941     
       
   942   !else
       
   943   
       
   944     !ifdef XPUI_BOTTOMIMAGE
       
   945       GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1045
       
   946       ShowWindow $XPUI_TEMP1 0
       
   947     !else
       
   948       GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1039
       
   949       ShowWindow $XPUI_TEMP1 0
       
   950     !endif
       
   951     
       
   952     ; Left Message Box rect - hidden for now
       
   953     GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1304
       
   954     ShowWindow $XPUI_TEMP1 0
       
   955     
       
   956     ; Header text
       
   957     GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1037
       
   958     CreateFont $XPUI_TEMP2 "$(^Font)" 8 700
       
   959     SendMessage $XPUI_TEMP1 0x30 $XPUI_TEMP2 0
       
   960     
       
   961     GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1038
       
   962     CreateFont $XPUI_TEMP2 "$(^Font)" 8 350
       
   963     SendMessage $XPUI_TEMP1 0x30 $XPUI_TEMP2 0
       
   964   
       
   965   !endif
       
   966     
       
   967   ; Header Image
       
   968   !ifdef TEMP
       
   969     !define TEMP_PUSH `${TEMP}`
       
   970     !undef TEMP
       
   971   !endif
       
   972   !ifdef XPUI_HEADERIMAGE_NORESIZETOFIT
       
   973     !define TEMP " "
       
   974   !else
       
   975     !define TEMP /RESIZETOFIT
       
   976   !endif
       
   977   !ifndef XPUI_BGIMAGE
       
   978   SetBrandingImage /IMGID=1046 ${TEMP} "$PLUGINSDIR\Header.bmp"
       
   979   !endif
       
   980   !undef TEMP
       
   981   !ifdef TEMP_PUSH
       
   982     !define TEMP `${TEMP_PUSH}`
       
   983     !undef TEMP_PUSH
       
   984   !endif
       
   985   
       
   986   ; Left Logo
       
   987   !ifdef TEMP
       
   988     !define TEMP_PUSH `${TEMP}`
       
   989     !undef TEMP
       
   990   !endif
       
   991   !ifdef XPUI_LEFTLOGO_NORESIZETOFIT
       
   992     !define TEMP " "
       
   993   !else
       
   994     !define TEMP /RESIZETOFIT
       
   995   !endif
       
   996   !ifndef XPUI_BGIMAGE
       
   997     SetBrandingImage /IMGID=1302 ${TEMP} "$PLUGINSDIR\Leftimg.bmp"
       
   998   !endif
       
   999   !undef TEMP
       
  1000   !ifdef TEMP_PUSH
       
  1001     !define TEMP `${TEMP_PUSH}`
       
  1002     !undef TEMP_PUSH
       
  1003   !endif
       
  1004   
       
  1005   ; Bottom Image
       
  1006   !ifdef XPUI_BOTTOMIMAGE
       
  1007     !ifdef TEMP
       
  1008       !define TEMP_PUSH `${TEMP}`
       
  1009       !undef TEMP
       
  1010     !endif
       
  1011     !ifdef XPUI_BOTTOMIMAGE_NORESIZETOFIT
       
  1012       !define TEMP " "
       
  1013     !else
       
  1014       !define TEMP /RESIZETOFIT
       
  1015     !endif
       
  1016     SetBrandingImage /IMGID=1039 ${TEMP} "$PLUGINSDIR\Btmimg.bmp"
       
  1017     !undef TEMP
       
  1018     !ifdef TEMP_PUSH
       
  1019       !define TEMP `${TEMP_PUSH}`
       
  1020       !undef TEMP_PUSH
       
  1021     !endif
       
  1022   !endif
       
  1023   
       
  1024   !ifdef XPUI_BGIMAGE
       
  1025     !ifdef TEMP
       
  1026     !define TEMP_PUSH `${TEMP}`
       
  1027     !undef TEMP
       
  1028   !endif
       
  1029   !ifdef XPUI_BGIMAGE_NORESIZETOFIT
       
  1030     !define TEMP " "
       
  1031   !else
       
  1032     !define TEMP /RESIZETOFIT
       
  1033   !endif
       
  1034 
       
  1035     SetBrandingImage /IMGID=1099 ${TEMP} "$PLUGINSDIR\BgImage.bmp"
       
  1036     !undef TEMP
       
  1037   !ifdef TEMP_PUSH
       
  1038     !define TEMP `${TEMP_PUSH}`
       
  1039     !undef TEMP_PUSH
       
  1040   !endif
       
  1041   !endif
       
  1042     
       
  1043     !ifndef XPUI_EXTERNAL_SKINNER
       
  1044     
       
  1045       ; Branding Text
       
  1046       GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1028
       
  1047       CreateFont $XPUI_TEMP2 "Trebuchet MS" 10 700
       
  1048       SendMessage $XPUI_TEMP1 0x30 $XPUI_TEMP2 0
       
  1049       SendMessage $XPUI_TEMP1 0xC 0 "STR:${XPUI_BRANDINGTEXT}"
       
  1050       SetCtlColors $XPUI_TEMP1 "${XPUI_BRANDINGTEXT_COLOR_FG}" "Transparent"
       
  1051       
       
  1052       GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1256
       
  1053       CreateFont $XPUI_TEMP2 "Trebuchet MS" 10 700
       
  1054       SendMessage $XPUI_TEMP1 0x30 $XPUI_TEMP2 0
       
  1055       SendMessage $XPUI_TEMP1 0xC 0 "STR:${XPUI_BRANDINGTEXT}"
       
  1056       SetCtlColors $XPUI_TEMP1 "${XPUI_BRANDINGTEXT_COLOR_BG}" "Transparent"
       
  1057       
       
  1058       ; Left Info - Time Counter
       
  1059       GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1100
       
  1060       CreateFont $XPUI_TEMP2 "Arial" 8 700
       
  1061       SendMessage $XPUI_TEMP1 0x30 $XPUI_TEMP2 0
       
  1062       !insertmacro XPUI_CONTROL_SKIN_TRANS $XPUI_TEMP1
       
  1063       ShowWindow $XPUI_TEMP1 0
       
  1064       
       
  1065       GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1101
       
  1066       CreateFont $XPUI_TEMP2 "Arial" 8 350
       
  1067       SendMessage $XPUI_TEMP1 0x30 $XPUI_TEMP2 0
       
  1068       !insertmacro XPUI_CONTROL_SKIN_LIGHT_TRANS $XPUI_TEMP1
       
  1069       ShowWindow $XPUI_TEMP1 0
       
  1070       
       
  1071       ; Skin the child window - to make flashes when changing pages less noticeable
       
  1072       GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1018
       
  1073       !insertmacro XPUI_CONTROL_SKIN $XPUI_TEMP1
       
  1074     
       
  1075     !else
       
  1076     
       
  1077       ; Branding Text
       
  1078       GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1028
       
  1079       ShowWindow $XPUI_TEMP1 0
       
  1080       
       
  1081       GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1256
       
  1082       ShowWindow $XPUI_TEMP1 0
       
  1083       
       
  1084       ; Left Info - Time Counter
       
  1085       GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1100
       
  1086       CreateFont $XPUI_TEMP2 "Arial" 8 700
       
  1087       SendMessage $XPUI_TEMP1 0x30 $XPUI_TEMP2 0
       
  1088       ShowWindow $XPUI_TEMP1 0
       
  1089       
       
  1090       GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1101
       
  1091       CreateFont $XPUI_TEMP2 "Arial" 8 350
       
  1092       SendMessage $XPUI_TEMP1 0x30 $XPUI_TEMP2 0
       
  1093       ShowWindow $XPUI_TEMP1 0
       
  1094       
       
  1095     !endif
       
  1096     
       
  1097   !ifdef XPUI_WANSIS
       
  1098   
       
  1099     SetOutPath $PLUGINSDIR
       
  1100     File /oname=gen.bmp   `${XPUI_WANSIS_GEN}`
       
  1101     File /oname=genex.bmp `${XPUI_WANSIS_GENEX}`
       
  1102 
       
  1103      !ifdef XPUI_WANSIS_HEADERIMAGE
       
  1104 
       
  1105       File /oname=header.bmp `${XPUI_WANSIS_HEADERIMAGE_BMP}`
       
  1106       GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1047
       
  1107       ShowWindow $XPUI_TEMP1 0
       
  1108       SetBrandingImage /IMGID=1046 $PLUGINSDIR\Header.bmp
       
  1109 
       
  1110     !else
       
  1111 
       
  1112       GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1046
       
  1113       ShowWindow $XPUI_TEMP1 0
       
  1114 
       
  1115     !endif
       
  1116     
       
  1117     ; Check for msvcr71.dll (alerts user of incompatibility problems on older machines or [in my case] fresh Windows installations)
       
  1118     IfFileExists $SYSDIR\msvcr71.dll FoundCRT
       
  1119       MessageBox MB_OK|MB_ICONEXCLAMATION "Setup failed to load the Windows runtime library msvcr71.dll.  Setup will function, but the visual style will not work.  This is most likely caused by a fresh Windows installation." IDOK NoSkin
       
  1120     FoundCRT:
       
  1121 
       
  1122     wansis::skinit /NOUNLOAD `$PLUGINSDIR\gen.bmp` `$PLUGINSDIR\genex.bmp`
       
  1123     
       
  1124     Pop $XPUI_TEMP1
       
  1125       StrCmp $XPUI_TEMP1 "success" +2
       
  1126       MessageBox MB_OK|MB_ICONINFORMATION "Setup encountered an error initializing WAnsis skinning engine. $(^Name) Setup will function, but it will not look very nice.$\n$\nReturn from wansis.dll: $XPUI_TEMP1"
       
  1127 
       
  1128     NoSkin:
       
  1129   
       
  1130   !endif
       
  1131   
       
  1132   ; NSIS is always raving about unused variables, so lets shut it up :)
       
  1133   
       
  1134   Goto +5 ; Ahh, the stupidity of computers...
       
  1135   Push $XPUI_NOABORTWARNING
       
  1136   Pop  $XPUI_NOABORTWARNING
       
  1137   Push $XPUI_ABORTED
       
  1138   Pop  $XPUI_ABORTED
       
  1139   
       
  1140   ; What the heck? Lets do it for functions too :D
       
  1141   
       
  1142   !ifdef XPUI_EXTERNAL_SKINNER | XPUI_FASTERSKINNING
       
  1143   !else
       
  1144   Goto +5 ; This effectively compiles code that will never be executed - costs ~40-50 bytes?
       
  1145   Call ${UNFUNC}xpui.SkinControl
       
  1146   Call ${UNFUNC}xpui.SkinControl.light
       
  1147   Call ${UNFUNC}xpui.SkinControl.trans
       
  1148   Call ${UNFUNC}xpui.SkinControl.light.trans
       
  1149   !endif
       
  1150   
       
  1151   !ifmacrodef XPUI_SET_BG
       
  1152 
       
  1153     !ifdef XPUI_ENABLEBG
       
  1154 
       
  1155       !insertmacro XPUI_SET_BG
       
  1156 
       
  1157     !endif
       
  1158 
       
  1159   !endif
       
  1160   
       
  1161   ; If the faster skinner is disabled, this function will be inserted after pages.
       
  1162   ; Therefore, we can take care of some page functions before the installer starts.
       
  1163   ; This makes page initialization MUCH faster.
       
  1164   
       
  1165   !ifndef XPUI_FASTERSKINNING
       
  1166 
       
  1167     SetOutPath $PLUGINSDIR
       
  1168     !ifdef XPUI_INTERNAL_PAGEUSED_WELCOME
       
  1169       File `${XPUI_SYSDIR}\INI\isWelcome.ini`
       
  1170     !endif
       
  1171     !ifdef XPUI_INTERNAL_PAGEUSED_WELCOME2
       
  1172       File `${XPUI_SYSDIR}\INI\Welcome.ini`
       
  1173     !endif
       
  1174     !ifdef XPUI_INTERNAL_PAGEUSED_INSTCONFIRM
       
  1175       File `${XPUI_SYSDIR}\INI\Confirm.ini`
       
  1176     !endif
       
  1177     !ifdef XPUI_INTERNAL_PAGEUSED_INSTSUCCESS
       
  1178       File `${XPUI_SYSDIR}\INI\Confirm.ini`
       
  1179     !endif
       
  1180     !ifdef XPUI_INTERNAL_PAGEUSED_FINISH
       
  1181       File `${XPUI_SYSDIR}\INI\Finish.ini`
       
  1182     !endif
       
  1183     !ifdef XPUI_INTERNAL_PAGEUSED_STARTMENU
       
  1184       !insertmacro XPUI_STARTMENUPAGE_CREATEINI
       
  1185     !endif
       
  1186     
       
  1187   !endif
       
  1188   
       
  1189   !ifdef XPUI_${UN}CUSTOMFUNCTION_GUIINIT
       
  1190     Call `${XPUI_${UN}CUSTOMFUNCTION_GUIINIT}`
       
  1191     !undef XPUI_${UN}CUSTOMFUNCTION_GUIINIT
       
  1192   !endif
       
  1193   
       
  1194   ShowWindow $HWNDPARENT 2
       
  1195   
       
  1196   !insertmacro XPUI_PAGEMODE_POP
       
  1197 !macroend
       
  1198 
       
  1199 ; Modern UI Compatibility Script
       
  1200 
       
  1201 !include "${XPUI_SYSDIR}\MUIConvert.nsh"
       
  1202 !insertmacro XPUI_LANGUAGE_CONVERT
       
  1203 
       
  1204 ; Pages
       
  1205 
       
  1206 !macro XPUI_PAGECHECKS
       
  1207   ; any checks for settings, etc that will be checked before XPUI pages are inserted go here
       
  1208   !verbose push
       
  1209   !verbose ${XPUI_VERBOSE}
       
  1210   
       
  1211   !ifdef XPUI_INTERNAL_LANG_INSERTED
       
  1212     !verbose 4
       
  1213     !error "ExperienceUI: FATAL: Language files must be inserted after pages.  Please move all lines containing $\"!insertmacro XPUI_LANGUAGE$\" down below page macros."
       
  1214   !endif
       
  1215   
       
  1216   !verbose 0
       
  1217     !insertmacro XPUI_LANGUAGE_CONVERT
       
  1218   !verbose ${XPUI_VERBOSE}
       
  1219   
       
  1220   !ifdef XPUI_WANSIS
       
  1221   !ifndef XPUI_EXTERNAL_SKINNER
       
  1222   !define XPUI_EXTERNAL_SKINNER
       
  1223   !endif
       
  1224   !endif
       
  1225   
       
  1226   !ifdef XPUI_BGIMAGE
       
  1227     !ifndef XPUI_COMPONENTSPAGE_NODESC
       
  1228       !define XPUI_COMPONENTSPAGE_NODESC
       
  1229     !endif
       
  1230   !endif
       
  1231   
       
  1232 !macroend
       
  1233 
       
  1234 !macro XPUI_ENDPAGECHECKS
       
  1235   ; any preproccessor commands after page macros go here
       
  1236   !verbose pop
       
  1237 !macroend
       
  1238 
       
  1239 !macro XPUI_PAGE_WELCOME
       
  1240 
       
  1241   !insertmacro XPUI_PAGECHECKS
       
  1242   
       
  1243   !ifndef XPUI_INTERNAL_PAGEUSED_WELCOME
       
  1244     !define XPUI_INTERNAL_PAGEUSED_WELCOME
       
  1245   !endif
       
  1246   
       
  1247   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}WELCOMEPAGE_TITLE "$(XPUI_${XPUI_UN}WELCOMEPAGE_TITLE)"
       
  1248   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}WELCOMEPAGE_SUBTITLE "$(XPUI_${XPUI_UN}WELCOMEPAGE_SUBTITLE)"
       
  1249   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}WELCOMEPAGE_TEXT_TOP "$(XPUI_${XPUI_UN}WELCOMEPAGE_TEXT_TOP)"
       
  1250   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}WELCOMEPAGE_TEXT "$(XPUI_${XPUI_UN}WELCOMEPAGE_TEXT)"
       
  1251   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}WELCOMEPAGE_CAPTION "$(XPUI_${XPUI_UN}WELCOMEPAGE_CAPTION)"
       
  1252   
       
  1253   !insertmacro XPUI_CREATEID
       
  1254   
       
  1255   PageEx ${XPUI_UNFUNC}custom
       
  1256   PageCallbacks ${XPUI_UNFUNC}XPUI.io.WelcomePage.${XPUI_UNIQUEID} ${XPUI_UNFUNC}XPUI.io.WelcomePage.${XPUI_UNIQUEID}.leave
       
  1257   Caption `${XPUI_${XPUI_UN}WELCOMEPAGE_CAPTION}`
       
  1258   PageExEnd
       
  1259 
       
  1260   Function ${XPUI_UNFUNC}XPUI.io.WelcomePage.${XPUI_UNIQUEID}
       
  1261     LockWindow on
       
  1262     StrCmp $XPUI_ABORTED 1 0 +2
       
  1263       Abort
       
  1264     
       
  1265     !ifdef XPUI_FASTERSKINNING
       
  1266     SetOutPath $PLUGINSDIR
       
  1267     File `${XPUI_SYSDIR}\INI\isWelcome.ini`
       
  1268     !endif
       
  1269 
       
  1270     !insertmacro XPUI_PAGE_CUSTOMFUNCTION PRE    
       
  1271 
       
  1272     WriteINIStr $PLUGINSDIR\isWelcome.ini `Field 1` Text `${XPUI_${XPUI_UN}WELCOMEPAGE_TEXT_TOP}`
       
  1273     WriteINIStr $PLUGINSDIR\isWelcome.ini `Field 2` Text `${XPUI_${XPUI_UN}WELCOMEPAGE_TEXT}`
       
  1274     WriteINIStr `$PLUGINSDIR\isWelcome.ini` `Settings` `RTL` `$(^RTL)`
       
  1275     
       
  1276     InstallOptions::initDialog /NOUNLOAD `$PLUGINSDIR\isWelcome.ini`
       
  1277       
       
  1278       Pop $XPUI_HWND
       
  1279       !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_HWND
       
  1280       
       
  1281       GetDlgItem $XPUI_TEMP1 $XPUI_HWND 1200
       
  1282         CreateFont $XPUI_TEMP2 `$(^Font)` 12 700 ; previously Tahoma
       
  1283         SendMessage $XPUI_TEMP1 0x30 $XPUI_TEMP2 $XPUI_TEMP2
       
  1284         !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_TEMP1
       
  1285       
       
  1286       GetDlgItem $XPUI_TEMP1 $XPUI_HWND 1201
       
  1287         CreateFont $XPUI_TEMP2 `$(^Font)` 8 350 ; previously Tahoma
       
  1288         SendMessage $XPUI_TEMP1 0x30 $XPUI_TEMP2 $XPUI_TEMP2
       
  1289         !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_TEMP1
       
  1290       
       
  1291       !insertmacro XPUI_HEADER_TEXT `${XPUI_${XPUI_UN}WELCOMEPAGE_TITLE}` `${XPUI_${XPUI_UN}WELCOMEPAGE_SUBTITLE}`
       
  1292       
       
  1293       !insertmacro XPUI_PAGE_CUSTOMFUNCTION SHOW
       
  1294       
       
  1295       LockWindow off
       
  1296       
       
  1297     InstallOptions::show
       
  1298     FunctionEnd
       
  1299     
       
  1300     Function ${XPUI_UNFUNC}XPUI.io.WelcomePage.${XPUI_UNIQUEID}.leave
       
  1301     !ifndef XPUI_NOLOCK
       
  1302     LockWindow on
       
  1303     !endif
       
  1304     !insertmacro XPUI_PAGE_CUSTOMFUNCTION LEAVE
       
  1305   FunctionEnd
       
  1306   
       
  1307   !undef XPUI_${XPUI_UN}WELCOMEPAGE_TITLE
       
  1308   !undef XPUI_${XPUI_UN}WELCOMEPAGE_SUBTITLE
       
  1309   !undef XPUI_${XPUI_UN}WELCOMEPAGE_TEXT_TOP
       
  1310   !undef XPUI_${XPUI_UN}WELCOMEPAGE_TEXT
       
  1311   !undef XPUI_${XPUI_UN}WELCOMEPAGE_CAPTION
       
  1312   
       
  1313   !insertmacro XPUI_ENDPAGECHECKS
       
  1314 
       
  1315 !macroend
       
  1316 
       
  1317 !macro XPUI_PAGE_WELCOME2
       
  1318 
       
  1319   !insertmacro XPUI_PAGECHECKS
       
  1320   
       
  1321   !ifndef XPUI_INTERNAL_PAGEUSED_WELCOME2
       
  1322     !define XPUI_INTERNAL_PAGEUSED_WELCOME2
       
  1323   !endif
       
  1324   
       
  1325   !ifdef XPUI_WELCOMEPAGESTYLE2_TITLE | XPUI_WELCOMEPAGESTYLE2_SUBTITLE | XPUI_WELCOMEPAGESTYLE2_CAPTION | XPUI_WELCOMEPAGESTYLE2_TEXT_TOP | XPUI_WELCOMEPAGESTYLE2_TEXT
       
  1326     !warning "The XPUI_WELCOMEPAGESTYLE2 defines are deprecated and have been renamed to XPUI_WELCOMEPAGE2_*.  Please update your script."
       
  1327   !endif
       
  1328   
       
  1329   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}WELCOMEPAGE2_TITLE "$(XPUI_${XPUI_UN}WELCOMEPAGE2_TITLE)"
       
  1330   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}WELCOMEPAGE2_SUBTITLE "$(XPUI_${XPUI_UN}WELCOMEPAGE2_SUBTITLE)"
       
  1331   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}WELCOMEPAGE2_TEXT_TOP "$(XPUI_${XPUI_UN}WELCOMEPAGE2_TEXT_TOP)"
       
  1332   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}WELCOMEPAGE2_TEXT "$(XPUI_${XPUI_UN}WELCOMEPAGE2_TEXT)"
       
  1333   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}WELCOMEPAGE2_CAPTION "$(XPUI_${XPUI_UN}WELCOMEPAGE2_CAPTION)"
       
  1334   
       
  1335   !insertmacro XPUI_CREATEID
       
  1336   
       
  1337   PageEx ${XPUI_UNFUNC}custom
       
  1338   PageCallbacks ${XPUI_UNFUNC}XPUI.io.WelcomePage2.${XPUI_UNIQUEID} ${XPUI_UNFUNC}XPUI.io.WelcomePage2.${XPUI_UNIQUEID}.leave
       
  1339   Caption `${XPUI_${XPUI_UN}WELCOMEPAGE2_CAPTION}`
       
  1340   PageExEnd
       
  1341 
       
  1342   Function ${XPUI_UNFUNC}XPUI.io.WelcomePage2.${XPUI_UNIQUEID}
       
  1343     LockWindow on
       
  1344     StrCmp $XPUI_ABORTED 1 0 +2
       
  1345       Abort
       
  1346     
       
  1347     !ifdef XPUI_FASTERSKINNING
       
  1348     SetOutPath $PLUGINSDIR
       
  1349     File `${XPUI_SYSDIR}\INI\Welcome.ini`
       
  1350     !endif
       
  1351 
       
  1352     !insertmacro XPUI_PAGE_CUSTOMFUNCTION PRE    
       
  1353 
       
  1354     WriteINIStr $PLUGINSDIR\Welcome.ini `Field 1` Text `${XPUI_${XPUI_UN}WELCOMEPAGE2_TEXT_TOP}`
       
  1355     WriteINIStr $PLUGINSDIR\Welcome.ini `Field 2` Text `${XPUI_${XPUI_UN}WELCOMEPAGE2_TEXT}`
       
  1356     WriteINIStr `$PLUGINSDIR\Welcome.ini` `Settings` `RTL` `$(^RTL)`
       
  1357     
       
  1358     InstallOptions::initDialog /NOUNLOAD `$PLUGINSDIR\Welcome.ini`
       
  1359       
       
  1360       Pop $XPUI_HWND
       
  1361       !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_HWND
       
  1362       
       
  1363       GetDlgItem $XPUI_TEMP1 $XPUI_HWND 1200
       
  1364         CreateFont $XPUI_TEMP2 `$(^Font)` 8 700 ; previously Tahoma
       
  1365         SendMessage $XPUI_TEMP1 0x30 $XPUI_TEMP2 $XPUI_TEMP2
       
  1366         !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_TEMP1
       
  1367       
       
  1368       GetDlgItem $XPUI_TEMP1 $XPUI_HWND 1201
       
  1369         CreateFont $XPUI_TEMP2 `$(^Font)` 8 350 ; previously Tahoma
       
  1370         SendMessage $XPUI_TEMP1 0x30 $XPUI_TEMP2 $XPUI_TEMP2
       
  1371         !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_TEMP1
       
  1372       
       
  1373       !insertmacro XPUI_HEADER_TEXT `${XPUI_${XPUI_UN}WELCOMEPAGE2_TITLE}` `${XPUI_${XPUI_UN}WELCOMEPAGE2_SUBTITLE}`
       
  1374       
       
  1375       !insertmacro XPUI_PAGE_CUSTOMFUNCTION SHOW
       
  1376       
       
  1377       LockWindow off
       
  1378       
       
  1379     InstallOptions::show
       
  1380     FunctionEnd
       
  1381     
       
  1382     Function ${XPUI_UNFUNC}XPUI.io.WelcomePage2.${XPUI_UNIQUEID}.leave
       
  1383     !ifndef XPUI_NOLOCK
       
  1384     LockWindow on
       
  1385     !endif
       
  1386     !insertmacro XPUI_PAGE_CUSTOMFUNCTION LEAVE
       
  1387   FunctionEnd
       
  1388   
       
  1389   !undef XPUI_${XPUI_UN}WELCOMEPAGE2_TITLE
       
  1390   !undef XPUI_${XPUI_UN}WELCOMEPAGE2_SUBTITLE
       
  1391   !undef XPUI_${XPUI_UN}WELCOMEPAGE2_TEXT_TOP
       
  1392   !undef XPUI_${XPUI_UN}WELCOMEPAGE2_TEXT
       
  1393   !undef XPUI_${XPUI_UN}WELCOMEPAGE2_CAPTION
       
  1394   
       
  1395   !insertmacro XPUI_ENDPAGECHECKS
       
  1396 
       
  1397 !macroend
       
  1398 
       
  1399 !macro XPUI_PAGE_LICENSE DATA
       
  1400 
       
  1401   !insertmacro XPUI_PAGECHECKS
       
  1402   
       
  1403   !ifndef XPUI_INTERNAL_PAGEUSED_LICENSE
       
  1404     !define XPUI_INTERNAL_PAGEUSED_LICENSE
       
  1405   !endif
       
  1406   
       
  1407   !insertmacro XPUI_DEFAULT MUI_LICENSEPAGE_HEADER_TITLE    "$(XPUI_${XPUI_UN}LICENSEPAGE_TITLE)"
       
  1408   !insertmacro XPUI_DEFAULT MUI_LICENSEPAGE_HEADER_SUBTITLE "$(XPUI_${XPUI_UN}LICENSEPAGE_SUBTITLE)"
       
  1409   !insertmacro XPUI_DEFAULT MUI_LICENSEPAGE_TEXT_TOP        "$(XPUI_${XPUI_UN}LICENSEPAGE_TEXT_TOP)"
       
  1410   !insertmacro XPUI_DEFAULT MUI_LICENSEPAGE_TEXT_BOTTOM     "$(XPUI_${XPUI_UN}LICENSEPAGE_TEXT_BOTTOM)"
       
  1411   !insertmacro XPUI_DEFAULT MUI_LICENSEPAGE_CAPTION         "$(XPUI_${XPUI_UN}LICENSEPAGE_CAPTION)"
       
  1412   
       
  1413   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}LICENSEPAGE_CAPTION     "${MUI_LICENSEPAGE_HEADER_CAPTION}"
       
  1414   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}LICENSEPAGE_TITLE       "${MUI_LICENSEPAGE_HEADER_TITLE}"
       
  1415   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}LICENSEPAGE_SUBTITLE    "${MUI_LICENSEPAGE_HEADER_SUBTITLE}"
       
  1416   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}LICENSEPAGE_TEXT_TOP    "${MUI_LICENSEPAGE_TEXT_TOP}"
       
  1417   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}LICENSEPAGE_TEXT_BOTTOM "${MUI_LICENSEPAGE_TEXT_BOTTOM}"
       
  1418   
       
  1419   ; Fix for John P. on the forums
       
  1420   !ifdef XPUI_LICENSEPAGE_CHECKBOX
       
  1421     !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}LICENSEPAGE_CHECKBOX_TEXT             "$(^AcceptBtn)"
       
  1422   !else ifdef XPUI_LICENSEPAGE_RADIOBUTTONS
       
  1423     !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}LICENSEPAGE_RADIOBUTTONS_TEXT_ACCEPT  "$(^AcceptBtn)"
       
  1424     !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}LICENSEPAGE_RADIOBUTTONS_TEXT_DECLINE "$(^DontAcceptBtn)"
       
  1425   !endif
       
  1426   
       
  1427   !insertmacro XPUI_CREATEID
       
  1428   PageEx ${XPUI_UNFUNC}license
       
  1429     
       
  1430     Caption `$(XPUI_${XPUI_UN}LICENSEPAGE_CAPTION)`
       
  1431     PageCallbacks ${XPUI_UNFUNC}XPUI.lic.${XPUI_UNIQUEID}.pre ${XPUI_UNFUNC}XPUI.lic.${XPUI_UNIQUEID}.show ${XPUI_UNFUNC}XPUI.lic.${XPUI_UNIQUEID}.leave
       
  1432     LicenseData `${DATA}`
       
  1433     
       
  1434     !ifdef XPUI_LICENSEPAGE_RADIOBUTTONS
       
  1435     LicenseForceSelection radiobuttons `${XPUI_${XPUI_UN}LICENSEPAGE_RADIOBUTTONS_TEXT_ACCEPT}` `${XPUI_${XPUI_UN}LICENSEPAGE_RADIOBUTTONS_TEXT_DECLINE}`
       
  1436     !endif
       
  1437     
       
  1438     !ifdef XPUI_LICENSEPAGE_CHECKBOX
       
  1439     LicenseForceSelection checkbox `${XPUI_${XPUI_UN}LICENSEPAGE_CHECKBOX_TEXT}`
       
  1440     !endif
       
  1441   
       
  1442   PageExEnd
       
  1443   
       
  1444   !insertmacro XPUI_DEFAULT XPUI_LICENSEBKCOLOR 0xFFFFFF
       
  1445   LicenseBkColor `${XPUI_LICENSEBKCOLOR}`
       
  1446   
       
  1447   Function ${XPUI_UNFUNC}XPUI.lic.${XPUI_UNIQUEID}.pre
       
  1448     
       
  1449     StrCmp $XPUI_ABORTED 1 0 +2
       
  1450     Abort
       
  1451     
       
  1452     !insertmacro XPUI_PAGE_CUSTOMFUNCTION PRE
       
  1453     
       
  1454   FunctionEnd
       
  1455   
       
  1456   Function ${XPUI_UNFUNC}XPUI.lic.${XPUI_UNIQUEID}.show
       
  1457     
       
  1458     LockWindow On
       
  1459   
       
  1460     !insertmacro XPUI_HEADER_TEXT `${XPUI_${XPUI_UN}LICENSEPAGE_TITLE}` `${XPUI_${XPUI_UN}LICENSEPAGE_SUBTITLE}`
       
  1461     
       
  1462     FindWindow $XPUI_HWND `#32770` `` $HWNDPARENT
       
  1463     !insertmacro XPUI_CONTROL_SKIN $XPUI_HWND
       
  1464     
       
  1465     GetDlgItem $XPUI_TEMP1 $XPUI_HWND 1034
       
  1466     !insertmacro XPUI_CONTROL_SKIN_LIGHT $XPUI_TEMP1
       
  1467       !ifdef XPUI_LICENSEPAGE_RESET
       
  1468         SendMessage $XPUI_TEMP1 0x00F1 0 0
       
  1469       !endif
       
  1470     
       
  1471     GetDlgItem $XPUI_TEMP1 $XPUI_HWND 1035
       
  1472     !insertmacro XPUI_CONTROL_SKIN_LIGHT $XPUI_TEMP1
       
  1473       !ifdef XPUI_LICENSEPAGE_RESET
       
  1474         SendMessage $XPUI_TEMP1 0x00F1 0 0
       
  1475         
       
  1476         GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1
       
  1477         EnableWindow $XPUI_TEMP1 0
       
  1478       !endif
       
  1479       
       
  1480     FindWindow $XPUI_HWND `#32770` `` $HWNDPARENT
       
  1481       
       
  1482     GetDlgItem $XPUI_TEMP1 $XPUI_HWND 1040
       
  1483     !insertmacro XPUI_CONTROL_SKIN $XPUI_TEMP1
       
  1484     SendMessage $XPUI_TEMP1 0xC 0 `STR:${XPUI_${XPUI_UN}LICENSEPAGE_TEXT_TOP}`
       
  1485     
       
  1486     GetDlgItem $XPUI_TEMP1 $XPUI_HWND 1006
       
  1487     !insertmacro XPUI_CONTROL_SKIN $XPUI_TEMP1
       
  1488     
       
  1489     GetDlgItem $XPUI_TEMP1 $XPUI_HWND 1034
       
  1490     !insertmacro XPUI_CONTROL_SKIN_LIGHT $XPUI_TEMP1
       
  1491     
       
  1492     GetDlgItem $XPUI_TEMP1 $XPUI_HWND 1035
       
  1493     !insertmacro XPUI_CONTROL_SKIN_LIGHT $XPUI_TEMP1
       
  1494     
       
  1495     !insertmacro XPUI_CONTROL_SKIN $XPUI_HWND
       
  1496     
       
  1497     !ifndef XPUI_${XPUI_UN}LICENSEPAGE_RADIOBUTTONS
       
  1498       !ifndef XPUI_${XPUI_UN}LICENSEPAGE_CHECKBOX
       
  1499         !insertmacro XPUI_INNERDIALOG_TEXT `${XPUI_${XPUI_UN}LICENSEPAGE_TEXT_BOTTOM}` 1006
       
  1500       !endif
       
  1501     !endif
       
  1502     
       
  1503     !ifdef XPUI_${XPUI_UN}LICENSEPAGE_CHECKBOX
       
  1504     !insertmacro XPUI_INNERDIALOG_TEXT `${XPUI_${XPUI_UN}LICENSEPAGE_TEXT_BOTTOM}` 1006
       
  1505     !endif
       
  1506     
       
  1507     !ifdef XPUI_${XPUI_UN}LICENSEPAGE_RADIOBUTTONS
       
  1508     !insertmacro XPUI_INNERDIALOG_TEXT `${XPUI_${XPUI_UN}LICENSEPAGE_TEXT_BOTTOM}` 1006
       
  1509     !endif
       
  1510     
       
  1511     !insertmacro XPUI_PAGE_CUSTOMFUNCTION SHOW
       
  1512     
       
  1513     LockWindow off
       
  1514   FunctionEnd
       
  1515   
       
  1516   Function ${XPUI_UNFUNC}XPUI.lic.${XPUI_UNIQUEID}.leave
       
  1517   !ifndef XPUI_NOLOCK
       
  1518   LockWindow on
       
  1519   !endif
       
  1520   
       
  1521   !insertmacro XPUI_PAGE_CUSTOMFUNCTION LEAVE
       
  1522   
       
  1523   FunctionEnd
       
  1524   
       
  1525   !insertmacro XPUI_UNSET XPUI_PAGE_CUSTOMFUNCTION_PRE
       
  1526   !insertmacro XPUI_UNSET XPUI_PAGE_CUSTOMFUNCTION_SHOW
       
  1527   !insertmacro XPUI_UNSET XPUI_PAGE_CUSTOMFUNCTION_LEAVE
       
  1528   
       
  1529   !undef XPUI_${XPUI_UN}LICENSEPAGE_CAPTION
       
  1530   !undef XPUI_${XPUI_UN}LICENSEPAGE_TITLE
       
  1531   !undef XPUI_${XPUI_UN}LICENSEPAGE_SUBTITLE
       
  1532   !undef XPUI_${XPUI_UN}LICENSEPAGE_TEXT_TOP
       
  1533   !undef XPUI_${XPUI_UN}LICENSEPAGE_TEXT_BOTTOM
       
  1534   
       
  1535   !insertmacro XPUI_UNSET XPUI_LICENSEPAGE_CHECKBOX
       
  1536   !insertmacro XPUI_UNSET XPUI_LICENSEPAGE_RADIOBUTTONS
       
  1537   
       
  1538   !undef MUI_LICENSEPAGE_HEADER_TITLE
       
  1539   !undef MUI_LICENSEPAGE_HEADER_SUBTITLE
       
  1540   !undef MUI_LICENSEPAGE_TEXT_TOP
       
  1541   !undef MUI_LICENSEPAGE_TEXT_BOTTOM
       
  1542   !undef MUI_LICENSEPAGE_CAPTION
       
  1543   
       
  1544   !insertmacro XPUI_ENDPAGECHECKS
       
  1545 
       
  1546 !macroend
       
  1547 
       
  1548 !macro XPUI_PAGE_COMPONENTS
       
  1549 
       
  1550   !insertmacro XPUI_PAGECHECKS
       
  1551   
       
  1552   !ifndef XPUI_INTERNAL_PAGEUSED_COMPONENTS
       
  1553     !define XPUI_INTERNAL_PAGEUSED_COMPONENTS
       
  1554   !endif
       
  1555   
       
  1556   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}COMPONENTSPAGE_TITLE "$(XPUI_${XPUI_UN}COMPONENTSPAGE_TITLE)"
       
  1557   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}COMPONENTSPAGE_SUBTITLE "$(XPUI_${XPUI_UN}COMPONENTSPAGE_SUBTITLE)"
       
  1558   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}COMPONENTSPAGE_CAPTION "$(XPUI_${XPUI_UN}COMPONENTSPAGE_CAPTION)"
       
  1559   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}COMPONENTSPAGE_TEXT_DESCRIPTION_INFO "$(XPUI_${XPUI_UN}COMPONENTSPAGE_TEXT_DESCRIPTION_INFO)"
       
  1560   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}COMPONENTSPAGE_TEXT_DESCRIPTION_TITLE "$(XPUI_${XPUI_UN}COMPONENTSPAGE_TEXT_DESCRIPTION_TITLE)"
       
  1561   
       
  1562   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}COMPONENTSPAGE_TEXT_TOP      "$(^ComponentsText)"
       
  1563   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}COMPONENTSPAGE_TEXT_INSTTYPE "$(^ComponentsSubText1)"
       
  1564   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}COMPONENTSPAGE_TEXT_SECLIST  "$(^ComponentsSubText2)"
       
  1565   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}COMPONENTSPAGE_TEXT_SECLIST_NOINSTTYPE  "$(^ComponentsSubText2_NoInstTypes)"
       
  1566   
       
  1567   !insertmacro XPUI_CREATEID
       
  1568   PageEx ${XPUI_UNFUNC}components
       
  1569     Caption `$(XPUI_${XPUI_UN}COMPONENTSPAGE_CAPTION)`
       
  1570     PageCallbacks ${XPUI_UNFUNC}XPUI.cmp.${XPUI_UNIQUEID}.pre ${XPUI_UNFUNC}XPUI.cmp.${XPUI_UNIQUEID}.show ${XPUI_UNFUNC}XPUI.cmp.${XPUI_UNIQUEID}.leave
       
  1571     ComponentText "${XPUI_${XPUI_UN}COMPONENTSPAGE_TEXT_TOP}" "${XPUI_${XPUI_UN}COMPONENTSPAGE_TEXT_INSTTYPE}" "${XPUI_${XPUI_UN}COMPONENTSPAGE_TEXT_SECLIST}"
       
  1572   PageExEnd
       
  1573   
       
  1574   Function ${XPUI_UNFUNC}XPUI.cmp.${XPUI_UNIQUEID}.pre
       
  1575     
       
  1576     StrCmp $XPUI_ABORTED 1 0 +2
       
  1577       Abort
       
  1578     
       
  1579     !insertmacro XPUI_PAGE_CUSTOMFUNCTION PRE
       
  1580   
       
  1581   FunctionEnd
       
  1582   
       
  1583   Function ${XPUI_UNFUNC}XPUI.cmp.${XPUI_UNIQUEID}.show
       
  1584   
       
  1585     !insertmacro XPUI_HEADER_TEXT `${XPUI_${XPUI_UN}COMPONENTSPAGE_TITLE}` `${XPUI_${XPUI_UN}COMPONENTSPAGE_SUBTITLE}`
       
  1586     
       
  1587     !insertmacro XPUI_PAGECOLOR_INIT 1022
       
  1588     !insertmacro XPUI_PAGECOLOR_INIT 1021
       
  1589     !insertmacro XPUI_PAGECOLOR_INIT 1023
       
  1590     !insertmacro XPUI_PAGECOLOR_INIT 1006
       
  1591     !insertmacro XPUI_PAGECOLOR_INIT 1042
       
  1592     !insertmacro XPUI_PAGECOLOR_INIT 1043
       
  1593     
       
  1594     FindWindow $XPUI_HWND "#32770" "" "$HWNDPARENT"
       
  1595     GetDlgItem $XPUI_TEMP1 $XPUI_HWND 1032
       
  1596     SetCtlColors $XPUI_TEMP1 0x000000 0xFFFFFF
       
  1597     
       
  1598     !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_HWND
       
  1599     
       
  1600     GetDlgItem $XPUI_TEMP1 $XPUI_HWND 1043
       
  1601       SendMessage $XPUI_TEMP1 0xC 0 `STR:${XPUI_${XPUI_UN}COMPONENTSPAGE_TEXT_DESCRIPTION_INFO}`
       
  1602       StrCpy $XPUI_HWND "${XPUI_${XPUI_UN}COMPONENTSPAGE_TEXT_DESCRIPTION_INFO}"
       
  1603       EnableWindow $XPUI_TEMP1 0
       
  1604     
       
  1605     InstTypeGetText 0 $XPUI_TEMP1
       
  1606     StrCmp $XPUI_TEMP1 "" "" XPUI.using_insttypes
       
  1607       !insertmacro XPUI_INNERDIALOG_TEXT "${XPUI_${XPUI_UN}COMPONENTSPAGE_TEXT_SECLIST_NOINSTTYPE}" 1022
       
  1608       !insertmacro XPUI_INNERDIALOG_TEXT " " 1021
       
  1609     XPUI.using_insttypes:
       
  1610     
       
  1611     !ifdef XPUI_COMPONENTSPAGE_NODESC
       
  1612       FindWindow $XPUI_TEMP1 `#32770` `` `$HWNDPARENT`
       
  1613       GetDlgItem $XPUI_TEMP2 $XPUI_TEMP1 1042
       
  1614       ShowWindow $XPUI_TEMP2 0
       
  1615       GetDlgItem $XPUI_TEMP2 $XPUI_TEMP1 1043
       
  1616       ShowWindow $XPUI_TEMP2 0
       
  1617     !endif
       
  1618     
       
  1619     !insertmacro XPUI_INNERDIALOG_TEXT `${XPUI_${XPUI_UN}COMPONENTSPAGE_TEXT_DESCRIPTION_TITLE}` 1042
       
  1620     StrCpy $XPUI_TEMP2 "${XPUI_${XPUI_UN}COMPONENTSPAGE_TEXT_DESCRIPTION_TITLE}"
       
  1621     
       
  1622     !insertmacro XPUI_PAGE_CUSTOMFUNCTION SHOW
       
  1623     
       
  1624     !ifndef XPUI_NOLOCK
       
  1625     LockWindow off
       
  1626     !endif
       
  1627   FunctionEnd
       
  1628   
       
  1629   Function ${XPUI_UNFUNC}XPUI.cmp.${XPUI_UNIQUEID}.leave
       
  1630   
       
  1631     !ifndef XPUI_NOLOCK
       
  1632       LockWindow on
       
  1633     !endif
       
  1634     
       
  1635     !insertmacro XPUI_PAGE_CUSTOMFUNCTION LEAVE
       
  1636   
       
  1637   FunctionEnd
       
  1638   
       
  1639   !insertmacro XPUI_UNSET XPUI_PAGE_CUSTOMFUNCTION_PRE
       
  1640   !insertmacro XPUI_UNSET XPUI_PAGE_CUSTOMFUNCTION_SHOW
       
  1641   !insertmacro XPUI_UNSET XPUI_PAGE_CUSTOMFUNCTION_LEAVE
       
  1642   
       
  1643   !undef XPUI_${XPUI_UN}COMPONENTSPAGE_TITLE
       
  1644   !undef XPUI_${XPUI_UN}COMPONENTSPAGE_CAPTION
       
  1645   !undef XPUI_${XPUI_UN}COMPONENTSPAGE_SUBTITLE
       
  1646   !undef XPUI_${XPUI_UN}COMPONENTSPAGE_TEXT_DESCRIPTION_TITLE
       
  1647   !undef XPUI_${XPUI_UN}COMPONENTSPAGE_TEXT_DESCRIPTION_INFO
       
  1648   !undef XPUI_${XPUI_UN}COMPONENTSPAGE_TEXT_TOP
       
  1649   !undef XPUI_${XPUI_UN}COMPONENTSPAGE_TEXT_INSTTYPE
       
  1650   !undef XPUI_${XPUI_UN}COMPONENTSPAGE_TEXT_SECLIST
       
  1651   !undef XPUI_${XPUI_UN}COMPONENTSPAGE_TEXT_SECLIST_NOINSTTYPE
       
  1652   
       
  1653   !insertmacro XPUI_ENDPAGECHECKS
       
  1654 
       
  1655 !macroend
       
  1656 
       
  1657 !macro XPUI_PAGE_DIRECTORY
       
  1658 
       
  1659   !insertmacro XPUI_PAGECHECKS
       
  1660   
       
  1661   !ifndef XPUI_INTERNAL_PAGEUSED_DIRECTORY
       
  1662     !define XPUI_INTERNAL_PAGEUSED_DIRECTORY
       
  1663   !endif
       
  1664   
       
  1665   !insertmacro XPUI_DEFAULT MUI_DIRECTORYPAGE_HEADER_TITLE     "$(XPUI_${XPUI_UN}DIRECTORYPAGE_TITLE)"
       
  1666   !insertmacro XPUI_DEFAULT MUI_DIRECTORYPAGE_HEADER_SUBTITLE  "$(XPUI_${XPUI_UN}DIRECTORYPAGE_SUBTITLE)"
       
  1667   !insertmacro XPUI_DEFAULT MUI_DIRECTORYPAGE_TEXT_TOP         "$(XPUI_${XPUI_UN}DIRECTORYPAGE_TEXT_TOP)"
       
  1668   !insertmacro XPUI_DEFAULT MUI_DIRECTORYPAGE_CAPTION          "$(XPUI_${XPUI_UN}DIRECTORYPAGE_CAPTION)"
       
  1669   !insertmacro XPUI_DEFAULT MUI_DIRECTORYPAGE_TEXT_DESTINATION "$(^DirSubText)"
       
  1670   !insertmacro XPUI_DEFAULT MUI_DIRECTORYPAGE_BROWSEDIALOG     "$(^DirBrowseText)"
       
  1671   !insertmacro XPUI_DEFAULT MUI_DIRECTORYPAGE_BROWSEBUTTON     "$(^BrowseBtn)"
       
  1672     
       
  1673   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}DIRECTORYPAGE_TITLE         "${MUI_DIRECTORYPAGE_HEADER_TITLE}"
       
  1674   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}DIRECTORYPAGE_SUBTITLE      "${MUI_DIRECTORYPAGE_HEADER_SUBTITLE}"
       
  1675   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}DIRECTORYPAGE_CAPTION       "${MUI_DIRECTORYPAGE_CAPTION}"
       
  1676   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}DIRECTORYPAGE_TEXT_TOP      "${MUI_DIRECTORYPAGE_TEXT_TOP}"
       
  1677   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}DIRECTORYPAGE_SUBTEXT       "${MUI_DIRECTORYPAGE_TEXT_DESTINATION}"
       
  1678   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}DIRECTORYPAGE_BROWSEDIALOG  "${MUI_DIRECTORYPAGE_BROWSEDIALOG}"
       
  1679   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}DIRECTORYPAGE_BROWSEBUTTON  "${MUI_DIRECTORYPAGE_BROWSEBUTTON}"
       
  1680   
       
  1681   !insertmacro XPUI_DEFAULT MUI_DIRECTORYPAGE_VARIABLE "$INSTDIR"
       
  1682   !insertmacro XPUI_DEFAULT XPUI_DIRVAR "${MUI_DIRECTORYPAGE_VARIABLE}"
       
  1683   
       
  1684   PageEx ${XPUI_UNFUNC}directory
       
  1685     Caption `${XPUI_${XPUI_UN}DIRECTORYPAGE_CAPTION}`
       
  1686     DirVar ${XPUI_DIRVAR}
       
  1687     PageCallbacks ${XPUI_UNFUNC}XPUI.dir.${XPUI_UNIQUEID}.pre ${XPUI_UNFUNC}XPUI.dir.${XPUI_UNIQUEID}.show ${XPUI_UNFUNC}XPUI.dir.${XPUI_UNIQUEID}.leave
       
  1688     DirText "${XPUI_${XPUI_UN}DIRECTORYPAGE_TEXT_TOP}" "${XPUI_${XPUI_UN}DIRECTORYPAGE_SUBTEXT}" "${XPUI_${XPUI_UN}DIRECTORYPAGE_BROWSEBUTTON}" "${XPUI_${XPUI_UN}DIRECTORYPAGE_BROWSEDIALOG}"
       
  1689   PageExEnd
       
  1690   
       
  1691   Function ${XPUI_UNFUNC}XPUI.dir.${XPUI_UNIQUEID}.pre
       
  1692     StrCmp $XPUI_ABORTED 1 0 +2
       
  1693       Abort
       
  1694     
       
  1695     !insertmacro XPUI_PAGE_CUSTOMFUNCTION PRE
       
  1696     
       
  1697   FunctionEnd
       
  1698   
       
  1699   Function ${XPUI_UNFUNC}XPUI.dir.${XPUI_UNIQUEID}.show
       
  1700   
       
  1701     !insertmacro XPUI_HEADER_TEXT `${XPUI_${XPUI_UN}DIRECTORYPAGE_TITLE}` `${XPUI_${XPUI_UN}DIRECTORYPAGE_SUBTITLE}`
       
  1702     
       
  1703     FindWindow $XPUI_TEMP1 `#32770` `` $HWNDPARENT
       
  1704     !insertmacro XPUI_CONTROL_SKIN $XPUI_TEMP1
       
  1705     
       
  1706     !insertmacro XPUI_DEFAULT XPUI_DIRECTORYPAGE_TEXTBOX_COLOR "${XPUI_TEXT_BGCOLOR}"
       
  1707     
       
  1708     GetDlgItem $XPUI_TEMP1 $XPUI_TEMP1 1019
       
  1709     SetCtlColors $XPUI_TEMP1 0x000000 0xFFFFFF
       
  1710     
       
  1711     !insertmacro XPUI_PAGECOLOR_INIT 1001
       
  1712     !insertmacro XPUI_PAGECOLOR_INIT 1008
       
  1713     !insertmacro XPUI_PAGECOLOR_INIT 1006
       
  1714     !insertmacro XPUI_PAGECOLOR_INIT 1020
       
  1715     !insertmacro XPUI_PAGECOLOR_INIT 1023
       
  1716     !insertmacro XPUI_PAGECOLOR_INIT 1024
       
  1717     
       
  1718     !insertmacro XPUI_PAGE_CUSTOMFUNCTION SHOW
       
  1719     
       
  1720     !ifndef XPUI_NOLOCK
       
  1721     LockWindow off
       
  1722     !endif
       
  1723     FunctionEnd
       
  1724     
       
  1725   Function ${XPUI_UNFUNC}XPUI.dir.${XPUI_UNIQUEID}.leave
       
  1726     
       
  1727     !ifndef XPUI_NOLOCK
       
  1728     LockWindow on
       
  1729     !endif
       
  1730     
       
  1731     !insertmacro XPUI_PAGE_CUSTOMFUNCTION LEAVE
       
  1732   
       
  1733   FunctionEnd
       
  1734   
       
  1735   !undef XPUI_DIRVAR
       
  1736   !insertmacro XPUI_UNSET XPUI_PAGE_CUSTOMFUNCTION_PRE
       
  1737   !insertmacro XPUI_UNSET XPUI_PAGE_CUSTOMFUNCTION_SHOW
       
  1738   !insertmacro XPUI_UNSET XPUI_PAGE_CUSTOMFUNCTION_LEAVE
       
  1739   
       
  1740   !undef XPUI_${XPUI_UN}DIRECTORYPAGE_TITLE
       
  1741   !undef XPUI_${XPUI_UN}DIRECTORYPAGE_SUBTITLE
       
  1742   !undef XPUI_${XPUI_UN}DIRECTORYPAGE_CAPTION
       
  1743   !undef XPUI_${XPUI_UN}DIRECTORYPAGE_TEXT_TOP
       
  1744   !undef XPUI_${XPUI_UN}DIRECTORYPAGE_SUBTEXT
       
  1745   !undef XPUI_${XPUI_UN}DIRECTORYPAGE_BROWSEBUTTON
       
  1746   !undef XPUI_${XPUI_UN}DIRECTORYPAGE_BROWSEDIALOG
       
  1747   
       
  1748   !undef MUI_DIRECTORYPAGE_HEADER_TITLE
       
  1749   !undef MUI_DIRECTORYPAGE_HEADER_SUBTITLE
       
  1750   !undef MUI_DIRECTORYPAGE_TEXT_TOP
       
  1751   !undef MUI_DIRECTORYPAGE_CAPTION
       
  1752   !undef MUI_DIRECTORYPAGE_TEXT_DESTINATION
       
  1753   !undef MUI_DIRECTORYPAGE_BROWSEDIALOG
       
  1754   !undef MUI_DIRECTORYPAGE_BROWSEBUTTON
       
  1755   
       
  1756   !insertmacro XPUI_ENDPAGECHECKS
       
  1757 
       
  1758 !macroend
       
  1759 
       
  1760 ; Before you read this code, let me tell you a secret:
       
  1761 ; I HAD TO WRITE THIS D*** THING MYSELF because the StartMenu.dll plugin is too shy - it has to hide behind any control
       
  1762 ; below it - in this case, LABEL 1099, the background for the entire window.  The only other option was to discontinue
       
  1763 ; the start menu page...be glad I chose to write a new one...
       
  1764 
       
  1765 !macro XPUI_PAGE_STARTMENU_INIT ID VAR
       
  1766 
       
  1767   !insertmacro XPUI_PAGECHECKS
       
  1768 
       
  1769   !ifndef XPUI_INTERNAL_PAGEUSED_STARTMENU
       
  1770     !define XPUI_INTERNAL_PAGEUSED_STARTMENU
       
  1771   !endif
       
  1772   
       
  1773   !insertmacro XPUI_CREATEID
       
  1774   
       
  1775   !insertmacro XPUI_DEFAULT XPUI_INTERNAL_STARTMENUPAGE_ID_DEFAULT ${ID}
       
  1776 
       
  1777   !insertmacro XPUI_DEFAULT MUI_STARTMENUPAGE_DEFAULTFOLDER "$(^Name)"
       
  1778   !insertmacro XPUI_DEFAULT XPUI_STARTMENUPAGE_DEFAULTFOLDER "${MUI_STARTMENUPAGE_DEFAULTFOLDER}"
       
  1779   !insertmacro XPUI_DEFAULT XPUI_STARTMENUPAGE_FOLDER "${XPUI_STARTMENUPAGE_DEFAULTFOLDER}"
       
  1780   
       
  1781   !define XPUI_STARTMENUPAGE_VARIABLE "${VAR}"
       
  1782   !define "XPUI_STARTMENUPAGE_${ID}_VARIABLE" "${XPUI_STARTMENUPAGE_VARIABLE}"
       
  1783   !define "XPUI_STARTMENUPAGE_${ID}_DEFAULTFOLDER" "${XPUI_STARTMENUPAGE_FOLDER}"
       
  1784   
       
  1785   !ifdef MUI_STARTMENUPAGE_REGISTRY_ROOT & MUI_STARTMENUPAGE_REGISTRY_KEY & MUI_STARTMENUPAGE_REGISTRY_VALUENAME
       
  1786 
       
  1787   !ifdef MUI_STARTMENUPAGE_REGISTRY_ROOT
       
  1788     !define "XPUI_STARTMENUPAGE_${ID}_REGISTRY_ROOT" "${MUI_STARTMENUPAGE_REGISTRY_ROOT}"
       
  1789   !endif
       
  1790   !ifdef MUI_STARTMENUPAGE_REGISTRY_KEY
       
  1791     !define "XPUI_STARTMENUPAGE_${ID}_REGISTRY_KEY" "${MUI_STARTMENUPAGE_REGISTRY_KEY}"
       
  1792   !endif
       
  1793   !ifdef MUI_STARTMENUPAGE_REGISTRY_VALUENAME
       
  1794     !define "XPUI_STARTMENUPAGE_${ID}_REGISTRY_VALUENAME" "${MUI_STARTMENUPAGE_REGISTRY_VALUENAME}"
       
  1795   !endif
       
  1796   
       
  1797   !else ifdef XPUI_STARTMENUPAGE_REGISTRY_ROOT & XPUI_STARTMENUPAGE_REGISTRY_KEY & XPUI_STARTMENUPAGE_REGISTRY_VALUENAME
       
  1798   
       
  1799   !ifdef XPUI_STARTMENUPAGE_REGISTRY_ROOT
       
  1800     !define "XPUI_STARTMENUPAGE_${ID}_REGISTRY_ROOT" "${XPUI_STARTMENUPAGE_REGISTRY_ROOT}"
       
  1801   !endif
       
  1802   !ifdef XPUI_STARTMENUPAGE_REGISTRY_KEY
       
  1803     !define "XPUI_STARTMENUPAGE_${ID}_REGISTRY_KEY" "${XPUI_STARTMENUPAGE_REGISTRY_KEY}"
       
  1804   !endif
       
  1805   !ifdef XPUI_STARTMENUPAGE_REGISTRY_VALUENAME
       
  1806     !define "XPUI_STARTMENUPAGE_${ID}_REGISTRY_VALUENAME" "${XPUI_STARTMENUPAGE_REGISTRY_VALUENAME}"
       
  1807   !endif
       
  1808   
       
  1809   !endif
       
  1810   
       
  1811   !ifdef XPUI_FASTERSKINNING
       
  1812     !insertmacro XPUI_STARTMENUPAGE_INITARRAY
       
  1813   !endif
       
  1814   
       
  1815   !define XPUI_STARTMENUPAGE_${ID}_ID "${XPUI_UNIQUEID}"
       
  1816   
       
  1817   Function ${XPUI_UNFUNC}xpui.StartMenu.show.${XPUI_UNIQUEID}
       
  1818     StrCmp $XPUI_ABORTED 1 0 +2
       
  1819       Abort
       
  1820     
       
  1821     !insertmacro XPUI_PAGE_CUSTOMFUNCTION PRE
       
  1822 
       
  1823      !ifdef XPUI_STARTMENUPAGE_REGISTRY_ROOT & XPUI_STARTMENUPAGE_REGISTRY_KEY & XPUI_STARTMENUPAGE_REGISTRY_VALUENAME
       
  1824 
       
  1825       StrCmp "${XPUI_STARTMENUPAGE_VARIABLE}" "" 0 +4
       
  1826 
       
  1827       ReadRegStr $XPUI_TEMP1 "${XPUI_STARTMENUPAGE_REGISTRY_ROOT}" "${XPUI_STARTMENUPAGE_REGISTRY_KEY}" "${XPUI_STARTMENUPAGE_REGISTRY_VALUENAME}"
       
  1828         StrCmp $XPUI_TEMP1 "" +2
       
  1829           StrCpy "${XPUI_STARTMENUPAGE_VARIABLE}" $XPUI_TEMP1
       
  1830 
       
  1831     !endif
       
  1832     
       
  1833     StrCmp `${XPUI_STARTMENUPAGE_VARIABLE}` `` 0 +2
       
  1834       StrCpy `${XPUI_STARTMENUPAGE_VARIABLE}` `${XPUI_STARTMENUPAGE_FOLDER}`
       
  1835     !ifdef XPUI_FASTERSKINNING
       
  1836     IfFileExists $PLUGINSDIR\StartMenu.ini 0 +2
       
  1837       ReadINIStr ${XPUI_STARTMENUPAGE_VARIABLE} $PLUGINSDIR\StartMenu.ini "Field 2" State
       
  1838     !else
       
  1839     IfFileExists $PLUGINSDIR\StartMenu.ini 0 +2
       
  1840       ReadINIStr $XPUI_TEMP1 $PLUGINSDIR\StartMenu.ini "Field 2" State
       
  1841       StrCmp $XPUI_TEMP1 '$$(^Name)' +2
       
  1842       StrCpy ${XPUI_STARTMENUPAGE_VARIABLE} $XPUI_TEMP1
       
  1843     !endif
       
  1844     
       
  1845     !insertmacro XPUI_HEADER_TEXT $(XPUI_${XPUI_UN}STARTMENUPAGE_TITLE) $(XPUI_${XPUI_UN}STARTMENUPAGE_SUBTITLE)
       
  1846     
       
  1847     !ifdef XPUI_FASTERSKINNING
       
  1848     
       
  1849       !insertmacro XPUI_STARTMENUPAGE_CREATEINI
       
  1850       
       
  1851     !else
       
  1852     
       
  1853     !endif
       
  1854     
       
  1855       WriteINIStr $PLUGINSDIR\StartMenu.ini "Field 3" State "${XPUI_STARTMENUPAGE_VARIABLE}"
       
  1856       WriteINIStr $PLUGINSDIR\StartMenu.ini `Settings` `RTL` `$(^RTL)`
       
  1857       
       
  1858       InstallOptions::initDialog /NOUNLOAD $PLUGINSDIR\Startmenu.ini
       
  1859         Pop $XPUI_HWND
       
  1860         !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_HWND
       
  1861         GetDlgItem $XPUI_TEMP1 $XPUI_HWND 1200
       
  1862           !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_TEMP1
       
  1863           SendMessage $XPUI_TEMP1 0xC 0 `STR:$(XPUI_${XPUI_UN}STARTMENUPAGE_TEXT)`
       
  1864         GetDlgItem $XPUI_TEMP1 $XPUI_HWND 1201
       
  1865         !insertmacro XPUI_CONTROL_SKIN $XPUI_TEMP1
       
  1866           SendMessage $XPUI_TEMP1 0xC 0 "STR:${XPUI_STARTMENUPAGE_VARIABLE}"
       
  1867         GetDlgItem $XPUI_TEMP1 $XPUI_HWND 1202
       
  1868         !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_TEMP1
       
  1869         GetDlgItem $XPUI_TEMP1 $XPUI_HWND 1203
       
  1870         !insertmacro XPUI_CONTROL_SKIN $XPUI_TEMP1
       
  1871         SendMessage $XPUI_TEMP1 0xC 0 `STR:$(XPUI_${XPUI_UN}STARTMENUPAGE_CHECKBOX)`
       
  1872         !ifdef XPUI_STARTMENUPAGE_NODISABLE
       
  1873           ShowWindow $XPUI_TEMP1 0
       
  1874         !endif
       
  1875         LockWindow off
       
  1876         !insertmacro XPUI_PAGE_CUSTOMFUNCTION SHOW
       
  1877         GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1099
       
  1878         ShowWindow $XPUI_TEMP1 0
       
  1879         !ifndef XPUI_BGIMAGE
       
  1880         SetBrandingImage /IMGID=1302 "$PLUGINSDIR\LeftImg.bmp"
       
  1881         !else
       
  1882         SetBrandingImage /IMGID=1099 "$PLUGINSDIR\BgImage.bmp"
       
  1883         !endif
       
  1884         GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1099
       
  1885         ShowWindow $XPUI_TEMP1 5
       
  1886       InstallOptions::show
       
  1887 
       
  1888     LockWindow off
       
  1889     
       
  1890   FunctionEnd
       
  1891   
       
  1892   Function ${XPUI_UNFUNC}xpui.StartMenu.leave.${XPUI_UNIQUEID}
       
  1893   
       
  1894     LockWindow on
       
  1895     ReadINIStr $XPUI_TEMP1 $PLUGINSDIR\StartMenu.ini Settings State
       
  1896     StrCmp $XPUI_TEMP1 3 list
       
  1897     StrCmp $XPUI_TEMP1 4 check
       
  1898     goto done
       
  1899     list:
       
  1900       ReadINIStr $XPUI_TEMP1 $PLUGINSDIR\StartMenu.ini "Field 3" State
       
  1901       GetDlgItem $XPUI_TEMP2 $XPUI_HWND 1201
       
  1902       SendMessage $XPUI_TEMP2 0xC 0 STR:$XPUI_TEMP1
       
  1903       LockWindow off
       
  1904       abort
       
  1905     check:
       
  1906       ReadINIStr $XPUI_TEMP1 $PLUGINSDIR\StartMenu.ini "Field 4" State
       
  1907       StrCmp $XPUI_TEMP1 1 +3
       
  1908         StrCpy $XPUI_TEMP1 1
       
  1909         goto +2
       
  1910         StrCpy $XPUI_TEMP1 0
       
  1911       GetDlgItem $XPUI_TEMP2 $XPUI_HWND 1201
       
  1912       EnableWindow $XPUI_TEMP2 $XPUI_TEMP1
       
  1913       GetDlgItem $XPUI_TEMP2 $XPUI_HWND 1202
       
  1914       EnableWindow $XPUI_TEMP2 $XPUI_TEMP1
       
  1915       
       
  1916       StrCpy $XPUI_TEMP2 "NOTIFY"
       
  1917       StrCmp $XPUI_TEMP1 0 0 +2
       
  1918         StrCpy $XPUI_TEMP2 "NOTIFY|DISABLED"
       
  1919       WriteINIStr $PLUGINSDIR\StartMenu.ini "Field 2" Flags $XPUI_TEMP2
       
  1920       WriteINIStr $PLUGINSDIR\StartMenu.ini "Field 3" Flags $XPUI_TEMP2
       
  1921       LockWindow off
       
  1922       abort
       
  1923     done:
       
  1924       
       
  1925       ReadINIStr ${XPUI_STARTMENUPAGE_VARIABLE} $PLUGINSDIR\StartMenu.ini "Field 2" State
       
  1926       ReadINIStr $XPUI_TEMP1 $PLUGINSDIR\StartMenu.ini "Field 4" State
       
  1927       StrCmp $XPUI_TEMP1 1 0 +2
       
  1928         StrCpy ${XPUI_STARTMENUPAGE_VARIABLE} >${XPUI_STARTMENUPAGE_VARIABLE}
       
  1929   
       
  1930     !insertmacro XPUI_PAGE_CUSTOMFUNCTION LEAVE
       
  1931     
       
  1932     GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1099
       
  1933       ShowWindow $XPUI_TEMP1 5
       
  1934     
       
  1935   FunctionEnd
       
  1936 
       
  1937   !undef XPUI_STARTMENUPAGE_VARIABLE
       
  1938   
       
  1939   !ifdef XPUI_FASTERSKINNING
       
  1940     !insertmacro XPUI_STARTMENUPAGE_KILLARRAY
       
  1941   !endif
       
  1942   
       
  1943   !insertmacro XPUI_ENDPAGECHECKS
       
  1944   
       
  1945 !macroend
       
  1946 
       
  1947 !macro XPUI_PAGE_STARTMENU_SHOW ID
       
  1948   
       
  1949   PageEx ${XPUI_UNFUNC}custom 
       
  1950     PageCallbacks ${XPUI_UNFUNC}xpui.StartMenu.show.${XPUI_STARTMENUPAGE_${ID}_ID} ${XPUI_UNFUNC}xpui.StartMenu.leave.${XPUI_STARTMENUPAGE_${ID}_ID}
       
  1951     Caption "$(XPUI_${XPUI_UN}STARTMENUPAGE_CAPTION)"
       
  1952   PageExEnd
       
  1953   
       
  1954   !undef XPUI_STARTMENUPAGE_${ID}_ID
       
  1955 
       
  1956 !macroend
       
  1957 
       
  1958 !macro XPUI_PAGE_STARTMENU ID VAR
       
  1959   !insertmacro XPUI_PAGE_STARTMENU_INIT `${ID}` `${VAR}`
       
  1960   !insertmacro XPUI_PAGE_STARTMENU_SHOW `${ID}`
       
  1961 !macroend
       
  1962 
       
  1963 !macro XPUI_STARTMENUPAGE_INITARRAY
       
  1964 
       
  1965   !ifndef XPUI_INTERNAL_SMPAGE_ARRAY_DEFINED
       
  1966   !define XPUI_INTERNAL_SMPAGE_ARRAY_DEFINED
       
  1967 
       
  1968   !include "${NSISDIR}\Include\NSISArray.nsh"
       
  1969   ${Array} xpuiSM 1024 128
       
  1970   ${ArrayFunc} Read
       
  1971   ${ArrayFunc} Clear
       
  1972   ${ArrayFunc} Push
       
  1973   ${ArrayFunc} Reverse
       
  1974   ${ArrayFunc} ReadFirst
       
  1975   ${ArrayFunc} ReadNext
       
  1976   ${ArrayFunc} Sort
       
  1977   ${ArrayFunc} ExistsI
       
  1978   ${ArrayFunc} ReadClose
       
  1979   ${ArrayFunc} Debug
       
  1980   !endif
       
  1981 !macroend
       
  1982 
       
  1983 !macro XPUI_STARTMENUPAGE_KILLARRAY
       
  1984   !ifdef xpui.ArrayNoValVar.notDefined
       
  1985     !undef ArrayNoValVar
       
  1986   !endif
       
  1987 !macroend
       
  1988 
       
  1989 !macro XPUI_STARTMENUPAGE_CREATEINI
       
  1990   !ifndef "xpuiSM${Array_Obj}Init"
       
  1991     !insertmacro XPUI_STARTMENUPAGE_INITARRAY
       
  1992   !endif
       
  1993   SetOutPath $PLUGINSDIR
       
  1994     IfFileExists $PLUGINSDIR\StartMenu.ini +2
       
  1995     File "${XPUI_SYSDIR}\INI\StartMenu.ini"
       
  1996     StrCpy $XPUI_TEMP2 ""
       
  1997 
       
  1998     !ifndef XPUI_INTERNAL_SMPAGE_ARRAY_INITED
       
  1999     !define XPUI_INTERNAL_SMPAGE_ARRAY_INITED
       
  2000     ${xpuiSM${Array_Obj}Init}
       
  2001     !endif
       
  2002 
       
  2003     SetShellVarContext current
       
  2004     FindFirst $XPUI_HWND $XPUI_TEMP1 "$SMPROGRAMS\*"
       
  2005     FindNext  $XPUI_HWND $XPUI_TEMP1
       
  2006       loop:
       
  2007       FindNext  $XPUI_HWND $XPUI_TEMP1
       
  2008       StrCmp $XPUI_TEMP1 "" exit
       
  2009       IfFileExists $SMPROGRAMS\$XPUI_TEMP1\* add
       
  2010       goto loop
       
  2011       add:
       
  2012         ${xpuiSM${Array_Obj}ExistsI} $XPUI_TEMP2 $XPUI_TEMP1 0
       
  2013         StrCmp $XPUI_TEMP2 -1 "" NoAdd
       
  2014           ${xpuiSM${Array_Obj}Push} $XPUI_TEMP1
       
  2015         NoAdd:
       
  2016       goto loop
       
  2017       exit:
       
  2018       FindClose $XPUI_HWND
       
  2019     SetShellVarContext all
       
  2020     FindFirst $XPUI_HWND $XPUI_TEMP1 "$SMPROGRAMS\*"
       
  2021     FindNext  $XPUI_HWND $XPUI_TEMP1
       
  2022       loop2:
       
  2023       FindNext  $XPUI_HWND $XPUI_TEMP1
       
  2024       StrCmp $XPUI_TEMP1 "" exit2
       
  2025       IfFileExists $SMPROGRAMS\$XPUI_TEMP1\* add2
       
  2026       goto loop2
       
  2027       add2:
       
  2028         ${xpuiSM${Array_Obj}ExistsI} $XPUI_TEMP2 $XPUI_TEMP1 0
       
  2029         StrCmp $XPUI_TEMP2 -1 "" NoAdd2
       
  2030           ${xpuiSM${Array_Obj}Push} $XPUI_TEMP1
       
  2031         NoAdd2:
       
  2032       goto loop2
       
  2033       exit2:
       
  2034       FindClose $XPUI_HWND
       
  2035 
       
  2036       ${xpuiSM${Array_Obj}Sort} ""
       
  2037 
       
  2038       ; Build the list
       
  2039       StrCpy $XPUI_HWND  ""
       
  2040       StrCpy $XPUI_TEMP1 ""
       
  2041       StrCpy $XPUI_TEMP2 ""
       
  2042       ClearErrors
       
  2043       ${xpuiSM${Array_Obj}ReadFirst} $XPUI_TEMP1 $XPUI_TEMP2
       
  2044         build:
       
  2045         IfErrors finish
       
  2046         StrCmp $XPUI_TEMP2 "" finish
       
  2047         StrCpy $XPUI_HWND $XPUI_HWND|$XPUI_TEMP2
       
  2048         ClearErrors
       
  2049         ${xpuiSM${Array_Obj}ReadNext} $XPUI_TEMP1 $XPUI_TEMP2
       
  2050         Goto build
       
  2051       finish:
       
  2052       ${xpuiSM${Array_Obj}ReadClose} $XPUI_TEMP1
       
  2053       ${xpuiSM${Array_Obj}Delete}
       
  2054       StrCpy $XPUI_HWND $XPUI_HWND "" 1
       
  2055       
       
  2056       WriteINIStr $PLUGINSDIR\StartMenu.ini "Field 3" ListItems $XPUI_HWND
       
  2057 
       
  2058 !macroend
       
  2059 
       
  2060 !macro XPUI_STARTMENU_GETFOLDER ID VAR
       
  2061 
       
  2062   !ifdef XPUI_STARTMENUPAGE_${ID}_REGISTRY_ROOT & XPUI_STARTMENUPAGE_${ID}_REGISTRY_KEY & XPUI_STARTMENUPAGE_${ID}_REGISTRY_VALUENAME
       
  2063 
       
  2064     ReadRegStr $XPUI_TEMP1 "${XPUI_STARTMENUPAGE_${ID}_REGISTRY_ROOT}" "${XPUI_STARTMENUPAGE_${ID}_REGISTRY_KEY}" "${XPUI_STARTMENUPAGE_${ID}_REGISTRY_VALUENAME}"
       
  2065       StrCmp $XPUI_TEMP1 "" +3
       
  2066         StrCpy "${VAR}" $XPUI_TEMP1
       
  2067         Goto +2
       
  2068 
       
  2069         StrCpy "${VAR}" "${XPUI_STARTMENUPAGE_${ID}_DEFAULTFOLDER}"
       
  2070 
       
  2071    !else
       
  2072    
       
  2073      StrCpy "${VAR}" "${XPUI_STARTMENUPAGE_${ID}_DEFAULTFOLDER}"
       
  2074 
       
  2075    !endif
       
  2076 
       
  2077 !macroend
       
  2078 
       
  2079 !macro XPUI_STARTMENU_WRITE_BEGIN ID
       
  2080 
       
  2081   !verbose push
       
  2082   !verbose ${XPUI_VERBOSE}
       
  2083 
       
  2084   !define XPUI_STARTMENUPAGE_CURRENT_ID "${ID}"
       
  2085 
       
  2086   StrCpy $XPUI_TEMP1 "${XPUI_STARTMENUPAGE_${XPUI_STARTMENUPAGE_CURRENT_ID}_VARIABLE}" 1
       
  2087   StrCmp $XPUI_TEMP1 ">" XPUI.startmenu_write_${XPUI_STARTMENUPAGE_CURRENT_ID}_done
       
  2088 
       
  2089   StrCmp "${XPUI_STARTMENUPAGE_${XPUI_STARTMENUPAGE_CURRENT_ID}_VARIABLE}" "" 0 XPUI.startmenu_writebegin_${XPUI_STARTMENUPAGE_CURRENT_ID}_notempty
       
  2090 
       
  2091     !insertmacro XPUI_STARTMENU_GETFOLDER "${XPUI_STARTMENUPAGE_CURRENT_ID}" "${XPUI_STARTMENUPAGE_${XPUI_STARTMENUPAGE_CURRENT_ID}_VARIABLE}"
       
  2092 
       
  2093   XPUI.startmenu_writebegin_${XPUI_STARTMENUPAGE_CURRENT_ID}_notempty:
       
  2094 
       
  2095   !verbose pop
       
  2096 
       
  2097 !macroend
       
  2098 
       
  2099 !macro XPUI_STARTMENU_WRITE_END
       
  2100 
       
  2101   !verbose push
       
  2102   !verbose ${XPUI_VERBOSE}
       
  2103 
       
  2104   !ifdef XPUI_STARTMENUPAGE_${XPUI_STARTMENUPAGE_CURRENT_ID}_REGISTRY_ROOT & XPUI_STARTMENUPAGE_${XPUI_STARTMENUPAGE_CURRENT_ID}_REGISTRY_KEY & XPUI_STARTMENUPAGE_${XPUI_STARTMENUPAGE_CURRENT_ID}_REGISTRY_VALUENAME
       
  2105     WriteRegStr "${XPUI_STARTMENUPAGE_${XPUI_STARTMENUPAGE_CURRENT_ID}_REGISTRY_ROOT}" "${XPUI_STARTMENUPAGE_${XPUI_STARTMENUPAGE_CURRENT_ID}_REGISTRY_KEY}" "${XPUI_STARTMENUPAGE_${XPUI_STARTMENUPAGE_CURRENT_ID}_REGISTRY_VALUENAME}" "${XPUI_STARTMENUPAGE_${XPUI_STARTMENUPAGE_CURRENT_ID}_VARIABLE}"
       
  2106   !endif
       
  2107 
       
  2108   XPUI.startmenu_write_${XPUI_STARTMENUPAGE_CURRENT_ID}_done:
       
  2109 
       
  2110   !undef XPUI_STARTMENUPAGE_CURRENT_ID
       
  2111 
       
  2112   !verbose pop
       
  2113 
       
  2114 !macroend
       
  2115 
       
  2116 ; END START MENU PAGE
       
  2117 
       
  2118 ; INSTALL CONFIRMATION PAGE
       
  2119 !macro XPUI_PAGE_INSTCONFIRM
       
  2120 
       
  2121   !insertmacro XPUI_PAGECHECKS
       
  2122   
       
  2123   !ifndef XPUI_INTERNAL_PAGEUSED_INSTCONFIRM
       
  2124     !define XPUI_INTERNAL_PAGEUSED_INSTCONFIRM
       
  2125   !endif
       
  2126   
       
  2127   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}INSTCONFIRMPAGE_TITLE "$(XPUI_${XPUI_UN}INSTCONFIRMPAGE_TITLE)"
       
  2128   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}INSTCONFIRMPAGE_SUBTITLE "$(XPUI_${XPUI_UN}INSTCONFIRMPAGE_SUBTITLE)"
       
  2129   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}INSTCONFIRMPAGE_CAPTION "$(XPUI_${XPUI_UN}INSTCONFIRMPAGE_CAPTION)"
       
  2130   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}INSTCONFIRMPAGE_TEXT_TOP "$(XPUI_${XPUI_UN}INSTCONFIRMPAGE_TEXT_TOP)"
       
  2131   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}INSTCONFIRMPAGE_TEXT_BOTTOM "$(XPUI_${XPUI_UN}INSTCONFIRMPAGE_TEXT_BOTTOM)"
       
  2132   
       
  2133   !insertmacro XPUI_CREATEID
       
  2134   
       
  2135   PageEx ${XPUI_UNFUNC}custom
       
  2136     Caption `${XPUI_${XPUI_UN}INSTCONFIRMPAGE_CAPTION}`
       
  2137     PageCallbacks `${XPUI_UNFUNC}XPUI.instconfirm.${XPUI_UNIQUEID}.show` `${XPUI_UNFUNC}XPUI.instconfirm.${XPUI_UNIQUEID}.verify`
       
  2138   PageExEnd
       
  2139   
       
  2140   Function `${XPUI_UNFUNC}XPUI.instconfirm.${XPUI_UNIQUEID}.show`
       
  2141     
       
  2142     StrCmp $XPUI_ABORTED 1 0 +2
       
  2143       Abort
       
  2144       
       
  2145     !ifdef XPUI_FASTERSKINNING
       
  2146     SetOutPath $PLUGINSDIR
       
  2147     File `${XPUI_SYSDIR}\INI\confirm.ini`
       
  2148     !endif
       
  2149     
       
  2150     !insertmacro XPUI_HEADER_TEXT `${XPUI_${XPUI_UN}INSTCONFIRMPAGE_TITLE}` `${XPUI_${XPUI_UN}INSTCONFIRMPAGE_SUBTITLE}`
       
  2151     
       
  2152     !insertmacro XPUI_PAGE_CUSTOMFUNCTION PRE
       
  2153     
       
  2154     WriteINIStr $PLUGINSDIR\Confirm.ini `Field 1` Text `${XPUI_${XPUI_UN}INSTCONFIRMPAGE_TEXT_TOP}`
       
  2155     WriteINIStr $PLUGINSDIR\Confirm.ini `Field 2` Text `${XPUI_${XPUI_UN}INSTCONFIRMPAGE_TEXT_BOTTOM}`
       
  2156     !ifdef XPUI_INSTCONFIRMPAGE_INFOBOX
       
  2157       WriteINIStr $PLUGINSDIR\Confirm.ini `Field 2` Bottom 98
       
  2158       WriteINIStr $PLUGINSDIR\Confirm.ini `Field 5` Type Text
       
  2159       WriteINIStr $PLUGINSDIR\Confirm.ini `Field 5` Flags GROUP|MULTILINE|READONLY
       
  2160       WriteINIStr $PLUGINSDIR\Confirm.ini `Field 5` Left 6
       
  2161       WriteINIStr $PLUGINSDIR\Confirm.ini `Field 5` Right -1
       
  2162       WriteINIStr $PLUGINSDIR\Confirm.ini `Field 5` Top 104
       
  2163       WriteINIStr $PLUGINSDIR\Confirm.ini `Field 5` Bottom 204
       
  2164       WriteINIStr $PLUGINSDIR\Confirm.ini `Field 5` State `Installation Settings:\r\n______________________________________________________________\r\n\r\nDestination folder: $INSTDIR`
       
  2165     
       
  2166       !ifdef XPUI_INTERNAL_STARTMENUPAGE_ID_DEFAULT
       
  2167         !insertmacro XPUI_STARTMENU_WRITE_BEGIN ${XPUI_INTERNAL_STARTMENUPAGE_ID_DEFAULT}
       
  2168         WriteINIStr $PLUGINSDIR\Confirm.ini `Field 5` State `Installation Settings:\r\n______________________________________________________________\r\n\r\nDestination folder: $INSTDIR\r\nStart Menu Folder: ${XPUI_STARTMENUPAGE_${XPUI_INTERNAL_STARTMENUPAGE_ID_DEFAULT}_VARIABLE}`
       
  2169         !insertmacro XPUI_STARTMENU_WRITE_END
       
  2170       !endif
       
  2171       
       
  2172       WriteINIStr $PLUGINSDIR\Confirm.ini `Settings` Numfields 5
       
  2173     !endif
       
  2174     WriteINIStr `$PLUGINSDIR\Confirm.ini` `Settings` `RTL` `$(^RTL)`
       
  2175     InstallOptions::initDialog /NOUNLOAD $PLUGINSDIR\confirm.ini
       
  2176     Pop $XPUI_TEMP2
       
  2177     !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_TEMP2
       
  2178     
       
  2179     !insertmacro XPUI_PAGE_CUSTOMFUNCTION SHOW
       
  2180     
       
  2181     GetDlgItem $XPUI_TEMP1 $XPUI_TEMP2 1200
       
  2182     !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_TEMP1
       
  2183     GetDlgItem $XPUI_TEMP1 $XPUI_TEMP2 1201
       
  2184     !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_TEMP1
       
  2185     GetDlgItem $XPUI_TEMP1 $XPUI_TEMP2 1202
       
  2186     !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_TEMP1
       
  2187     GetDlgItem $XPUI_TEMP1 $XPUI_TEMP2 1203
       
  2188     !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_TEMP1
       
  2189     GetDlgItem $XPUI_TEMP1 $XPUI_TEMP2 1204
       
  2190     !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_TEMP1
       
  2191     !ifndef XPUI_NOLOCK
       
  2192     LockWindow off
       
  2193     !endif
       
  2194     
       
  2195     !ifdef UMUI_CONFIRMPAGE_TEXTBOX
       
  2196     Goto +2
       
  2197     Call `${UMUI_CONFIRMPAGE_TEXTBOX}`
       
  2198     !undef UMUI_CONFIRMPAGE_TEXTBOX
       
  2199     !endif
       
  2200           
       
  2201     InstallOptions::show
       
  2202     
       
  2203   FunctionEnd
       
  2204   
       
  2205   Function `${XPUI_UNFUNC}XPUI.instconfirm.${XPUI_UNIQUEID}.verify`
       
  2206     
       
  2207     !ifndef XPUI_NOLOCK
       
  2208     LockWindow on
       
  2209     !endif
       
  2210     
       
  2211     !insertmacro XPUI_PAGE_CUSTOMFUNCTION LEAVE
       
  2212   
       
  2213   FunctionEnd
       
  2214   
       
  2215   !insertmacro XPUI_UNSET XPUI_PAGE_CUSTOMFUNCTION_PRE
       
  2216   !insertmacro XPUI_UNSET XPUI_PAGE_CUSTOMFUNCTION_SHOW
       
  2217   !insertmacro XPUI_UNSET XPUI_PAGE_CUSTOMFUNCTION_LEAVE
       
  2218   
       
  2219   !undef XPUI_${XPUI_UN}INSTCONFIRMPAGE_TITLE
       
  2220   !undef XPUI_${XPUI_UN}INSTCONFIRMPAGE_SUBTITLE
       
  2221   !undef XPUI_${XPUI_UN}INSTCONFIRMPAGE_CAPTION
       
  2222   !undef XPUI_${XPUI_UN}INSTCONFIRMPAGE_TEXT_TOP
       
  2223   !undef XPUI_${XPUI_UN}INSTCONFIRMPAGE_TEXT_BOTTOM
       
  2224   
       
  2225   !insertmacro XPUI_ENDPAGECHECKS
       
  2226 !macroend
       
  2227 
       
  2228 ; INSTFILES PAGE
       
  2229 !macro XPUI_PAGE_INSTFILES
       
  2230 
       
  2231   !ifdef UMUI_INSTFILEPAGE_ENABLE_CANCEL_BUTTON
       
  2232     !ifndef UMUI_NB_CALL_FUNCTION_CANCEL_DEFINED
       
  2233       !define UMUI_NB_CALL_FUNCTION_CANCEL_DEFINED
       
  2234       Var UMUI_NB_CALL_FUNCTION_CANCEL
       
  2235     !endif
       
  2236   !endif
       
  2237 
       
  2238   !insertmacro XPUI_PAGECHECKS
       
  2239 
       
  2240   !ifndef XPUI_INTERNAL_PAGEUSED_INSTFILES
       
  2241     !define XPUI_INTERNAL_PAGEUSED_INSTFILES
       
  2242   !endif
       
  2243   
       
  2244   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}INSTFILESPAGE_TITLE "$(XPUI_${XPUI_UN}INSTFILESPAGE_TITLE)"
       
  2245   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}INSTFILESPAGE_SUBTITLE "$(XPUI_${XPUI_UN}INSTFILESPAGE_SUBTITLE)"
       
  2246   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}INSTFILESPAGE_CAPTION "$(XPUI_${XPUI_UN}INSTFILESPAGE_CAPTION)"
       
  2247   
       
  2248   !insertmacro XPUI_CREATEID
       
  2249   
       
  2250   PageEx ${XPUI_UNFUNC}instfiles
       
  2251     Caption `${XPUI_${XPUI_UN}INSTFILESPAGE_CAPTION}`
       
  2252     PageCallbacks `${XPUI_UNFUNC}XPUI.cpy.${XPUI_UNIQUEID}.pre` `${XPUI_UNFUNC}XPUI.cpy.${XPUI_UNIQUEID}.show` `${XPUI_UNFUNC}XPUI.cpy.${XPUI_UNIQUEID}.leave`
       
  2253   PageExEnd
       
  2254   
       
  2255   Function ${XPUI_UNFUNC}XPUI.cpy.${XPUI_UNIQUEID}.pre
       
  2256     
       
  2257     StrCmp $XPUI_ABORTED 1 0 +3
       
  2258       SetAutoClose true
       
  2259       Abort
       
  2260     
       
  2261     !insertmacro XPUI_PAGE_CUSTOMFUNCTION PRE
       
  2262     
       
  2263     Return
       
  2264     
       
  2265   FunctionEnd
       
  2266   
       
  2267   Function ${XPUI_UNFUNC}XPUI.cpy.${XPUI_UNIQUEID}.show
       
  2268   
       
  2269     !insertmacro XPUI_HEADER_TEXT `${XPUI_${XPUI_UN}INSTFILESPAGE_TITLE}` `${XPUI_${XPUI_UN}INSTFILESPAGE_SUBTITLE}`
       
  2270     
       
  2271     FindWindow $XPUI_TEMP1 "#32770" "" $HWNDPARENT
       
  2272     !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_TEMP1
       
  2273   
       
  2274     !insertmacro XPUI_PAGECOLOR_INIT 1027
       
  2275     !insertmacro XPUI_PAGECOLOR_INIT 1004
       
  2276     !insertmacro XPUI_PAGECOLOR_INIT 1006
       
  2277     !insertmacro XPUI_PAGECOLOR_INIT 1016
       
  2278     
       
  2279     !ifdef XPUI_BGIMAGE
       
  2280       FindWindow $XPUI_TEMP1 "#32770" "" $HWNDPARENT
       
  2281       GetDlgItem $XPUI_TEMP1 $XPUI_TEMP1 1006
       
  2282       ShowWindow $XPUI_TEMP1 0
       
  2283     !endif
       
  2284     
       
  2285     !insertmacro XPUI_PAGE_CUSTOMFUNCTION SHOW
       
  2286     
       
  2287       !ifdef UMUI_INSTFILEPAGE_ENABLE_CANCEL_BUTTON
       
  2288       	StrCpy $UMUI_NB_CALL_FUNCTION_CANCEL 0
       
  2289 	GetDlgItem $XPUI_TEMP1 $HWNDPARENT 2
       
  2290 	EnableWindow $XPUI_TEMP1 1
       
  2291       !endif
       
  2292     
       
  2293     LockWindow off
       
  2294   FunctionEnd
       
  2295     
       
  2296   Function ${XPUI_UNFUNC}XPUI.cpy.${XPUI_UNIQUEID}.leave
       
  2297   
       
  2298         !ifdef UMUI_INSTFILEPAGE_ENABLE_CANCEL_BUTTON
       
  2299 		StrCmp $XPUI_ABORTED 1 0 +5
       
  2300 		StrCmp $UMUI_NB_CALL_FUNCTION_CANCEL 0 0 +4
       
  2301 		StrCpy $UMUI_NB_CALL_FUNCTION_CANCEL 1
       
  2302 		Call `${UMUI_INSTFILEPAGE_ENABLE_CANCEL_BUTTON}`
       
  2303 		SetAutoClose true
       
  2304 	!endif
       
  2305 	!insertmacro XPUI_UNSET UMUI_INSTFILEPAGE_ENABLE_CANCEL_BUTTON
       
  2306     
       
  2307     LockWindow on
       
  2308     IfAbort 0 Good
       
  2309     !insertmacro XPUI_HEADER_TEXT `$(XPUI_${XPUI_UN}INSTFILESPAGE_FAIL_TITLE)` `$(XPUI_${XPUI_UN}INSTFILESPAGE_FAIL_SUBTITLE)`
       
  2310     Goto TitleFinish
       
  2311     Good:
       
  2312     !insertmacro XPUI_HEADER_TEXT `$(XPUI_${XPUI_UN}INSTFILESPAGE_DONE_TITLE)` `$(XPUI_${XPUI_UN}INSTFILESPAGE_DONE_SUBTITLE)`
       
  2313     TitleFinish:
       
  2314     LockWindow off
       
  2315     
       
  2316     !insertmacro XPUI_PAGE_CUSTOMFUNCTION LEAVE
       
  2317   
       
  2318   FunctionEnd
       
  2319   
       
  2320   !insertmacro XPUI_UNSET XPUI_PAGE_CUSTOMFUNCTION_PRE
       
  2321   !insertmacro XPUI_UNSET XPUI_PAGE_CUSTOMFUNCTION_SHOW
       
  2322   !insertmacro XPUI_UNSET XPUI_PAGE_CUSTOMFUNCTION_LEAVE
       
  2323   
       
  2324   !undef XPUI_${XPUI_UN}INSTFILESPAGE_TITLE
       
  2325   !undef XPUI_${XPUI_UN}INSTFILESPAGE_SUBTITLE
       
  2326   !undef XPUI_${XPUI_UN}INSTFILESPAGE_CAPTION
       
  2327   
       
  2328   !insertmacro XPUI_ENDPAGECHECKS
       
  2329 !macroend
       
  2330 
       
  2331 ; FINISH PAGE
       
  2332 !macro XPUI_PAGE_FINISH
       
  2333 
       
  2334   !insertmacro XPUI_PAGECHECKS
       
  2335 
       
  2336   !ifndef XPUI_INTERNAL_PAGEUSED_FINISH
       
  2337     !define XPUI_INTERNAL_PAGEUSED_FINISH
       
  2338   !endif
       
  2339   
       
  2340   !ifdef MUI_FINISHPAGE_LINK
       
  2341     !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}FINISHPAGE_LINK ""
       
  2342     !insertmacro XPUI_SET XPUI_${XPUI_UN}FINISHPAGE_LINK_TEXT `${MUI_FINISHPAGE_LINK}`
       
  2343     !ifdef MUI_FINISHPAGE_LINK_LOCATION
       
  2344       !insertmacro XPUI_DEFAULT "XPUI_FINISHPAGE_LINK_LOCATION" "${MUI_FINISHPAGE_LINK_LOCATION}"
       
  2345     !endif
       
  2346   !endif
       
  2347   
       
  2348   !insertmacro XPUI_LANGUAGE_CONVERT
       
  2349   
       
  2350   !insertmacro XPUI_DEFAULT MUI_FINISHPAGE_TITLE             "$(XPUI_${XPUI_UN}FINISHPAGE_TEXT_TOP)"
       
  2351   !insertmacro XPUI_DEFAULT MUI_FINISHPAGE_TEXT              "$(XPUI_${XPUI_UN}FINISHPAGE_TEXT)"
       
  2352   !insertmacro XPUI_DEFAULT MUI_FINISHPAGE_BUTTON            "$(^CloseBtn)"
       
  2353   !insertmacro XPUI_DEFAULT MUI_FINISHPAGE_TEXT_REBOOT       "$(XPUI_${XPUI_UN}FINISHPAGE_TEXT_REBOOT)"
       
  2354   !insertmacro XPUI_DEFAULT MUI_FINISHPAGE_TEXT_REBOOTNOW    "$(XPUI_${XPUI_UN}FINISHPAGE_RADIOBUTTON_REBOOT)"
       
  2355   !insertmacro XPUI_DEFAULT MUI_FINISHPAGE_TEXT_REBOOTLATER  "$(XPUI_${XPUI_UN}FINISHPAGE_RADIOBUTTON_NOREBOOT)"
       
  2356   !insertmacro XPUI_DEFAULT MUI_FINISHPAGE_RUN_TEXT          "$(XPUI_${XPUI_UN}FINISHPAGE_CHECKBOX_RUN)"
       
  2357   !insertmacro XPUI_DEFAULT MUI_FINISHPAGE_SHOWREADME_TEXT   "$(XPUI_${XPUI_UN}FINISHPAGE_CHECKBOX_DOCS)"
       
  2358   !ifdef MUI_FINISHPAGE_NOREBOOTSUPPORT
       
  2359     !define XPUI_${XPUI_UN}FINISHPAGE_REBOOT_DISABLE
       
  2360     !undef MUI_FINISHPAGE_NOREBOOTSUPPORT
       
  2361   !endif
       
  2362   
       
  2363   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}FINISHPAGE_TITLE "$(XPUI_${XPUI_UN}FINISHPAGE_TITLE)"
       
  2364   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}FINISHPAGE_SUBTITLE "$(XPUI_${XPUI_UN}FINISHPAGE_SUBTITLE)"
       
  2365   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}FINISHPAGE_CAPTION "$(XPUI_${XPUI_UN}FINISHPAGE_CAPTION)"
       
  2366   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}FINISHPAGE_CHECKBOX_RUN  "$(XPUI_${XPUI_UN}FINISHPAGE_CHECKBOX_RUN)"   # No LangString for this one
       
  2367   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}FINISHPAGE_CHECKBOX_DOCS "$(XPUI_${XPUI_UN}FINISHPAGE_CHECKBOX_DOCS)"  # No LangString for this one
       
  2368   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}FINISHPAGE_TEXT "$(XPUI_${XPUI_UN}FINISHPAGE_TEXT)"
       
  2369   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}FINISHPAGE_TEXT_RUN "$(XPUI_${XPUI_UN}FINISHPAGE_TEXT_RUN)"
       
  2370   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}FINISHPAGE_TEXT_TOP "$(XPUI_${XPUI_UN}FINISHPAGE_TEXT_TOP)"
       
  2371   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}FINISHPAGE_TEXT_TOP_ALT "$(XPUI_${XPUI_UN}FINISHPAGE_TEXT_TOP_ALT)"
       
  2372   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}FINISHPAGE_TEXT_REBOOT "$(XPUI_${XPUI_UN}FINISHPAGE_TEXT_REBOOT)"
       
  2373   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}FINISHPAGE_REBOOT_MESSAGEBOX "$(XPUI_${XPUI_UN}FINISHPAGE_REBOOT_MESSAGEBOX)"
       
  2374   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}FINISHPAGE_RADIOBUTTON_REBOOT "$(XPUI_${XPUI_UN}FINISHPAGE_RADIOBUTTON_REBOOT)"
       
  2375   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}FINISHPAGE_RADIOBUTTON_NOREBOOT "$(XPUI_${XPUI_UN}FINISHPAGE_RADIOBUTTON_NOREBOOT)"
       
  2376   
       
  2377   PageEx ${XPUI_UNFUNC}custom
       
  2378     Caption `${XPUI_${XPUI_UN}FINISHPAGE_CAPTION}`
       
  2379     PageCallbacks `${XPUI_UNFUNC}XPUI.finish.${XPUI_UNIQUEID}.show` `${XPUI_UNFUNC}XPUI.finish.${XPUI_UNIQUEID}.verify`
       
  2380   PageExEnd
       
  2381   
       
  2382   !ifndef XPUI_VAR_REBOOT
       
  2383   Var XPUI_REBOOT
       
  2384   !define XPUI_VAR_REBOOT
       
  2385   !endif
       
  2386   
       
  2387   Function `${XPUI_UNFUNC}XPUI.FINISH.${XPUI_UNIQUEID}.show`
       
  2388   
       
  2389     StrCmp $XPUI_ABORTED 1 0 +2
       
  2390       Abort
       
  2391     
       
  2392     ; SET THE XPUI LOCAL REBOOT FLAG
       
  2393     StrCpy $XPUI_REBOOT 0
       
  2394     
       
  2395     !ifdef XPUI_${XPUI_UN}FINISHPAGE_REBOOT_FORCE
       
  2396       StrCpy $XPUI_REBOOT 1
       
  2397     !endif
       
  2398     
       
  2399     !ifndef XPUI_${XPUI_UN}FINISHPAGE_NOREBOOT
       
  2400       IfRebootFlag `` +2
       
  2401         StrCpy $XPUI_REBOOT 1
       
  2402     !endif
       
  2403     
       
  2404     !ifdef `XPUI_${XPUI_UN}FINISHPAGE_ABORT_ON_NOREBOOT`
       
  2405       StrCmp $XPUI_REBOOT 1 `` 0 +2
       
  2406         Abort
       
  2407     !endif
       
  2408     
       
  2409     ; Extract the INI
       
  2410     !ifdef XPUI_FASTERSKINNING
       
  2411     SetOutPath $PLUGINSDIR
       
  2412     File `${XPUI_SYSDIR}\INI\finish.ini`
       
  2413     !endif
       
  2414     
       
  2415     !insertmacro XPUI_HEADER_TEXT `${XPUI_${XPUI_UN}FINISHPAGE_TITLE}` `${XPUI_${XPUI_UN}FINISHPAGE_SUBTITLE}`
       
  2416     
       
  2417     StrCmp $XPUI_REBOOT 1 `` XPUI.finish.norb.${XPUI_UNIQUEID}
       
  2418     WriteINIStr $PLUGINSDIR\Finish.ini `Field 1` Type RadioButton
       
  2419     WriteINIStr $PLUGINSDIR\Finish.ini `Field 2` Type RadioButton
       
  2420     WriteINIStr $PLUGINSDIR\Finish.ini `Field 1` Text `${XPUI_${XPUI_UN}FINISHPAGE_RADIOBUTTON_REBOOT}`
       
  2421     WriteINIStr $PLUGINSDIR\Finish.ini `Field 2` Text `${XPUI_${XPUI_UN}FINISHPAGE_RADIOBUTTON_NOREBOOT}`
       
  2422     XPUI.finish.norb.${XPUI_UNIQUEID}:
       
  2423     
       
  2424     StrCmp $XPUI_REBOOT 1 XPUI.nochk
       
  2425     !ifdef XPUI_${XPUI_UN}FINISHPAGE_RUN_NOTCHECKED
       
  2426     WriteINIStr $PLUGINSDIR\Finish.ini `Field 1` State 0
       
  2427     !endif
       
  2428     !ifdef XPUI_${XPUI_UN}FINISHPAGE_DOCS_NOTCHECKED
       
  2429     WriteINIStr $PLUGINSDIR\Finish.ini `Field 2` State 0
       
  2430     !endif
       
  2431     XPUI.nochk:
       
  2432     
       
  2433     StrCmp $XPUI_REBOOT 1 `` +2
       
  2434     WriteINIStr $PLUGINSDIR\Finish.ini `Field 2` State 0
       
  2435     
       
  2436     !ifdef XPUI_${XPUI_UN}FINISHPAGE_LINK_TEXT
       
  2437     WriteINIStr $PLUGINSDIR\Finish.ini `Field 3` Text `${XPUI_${XPUI_UN}FINISHPAGE_LINK_TEXT}`
       
  2438     !endif
       
  2439     
       
  2440     StrCmp $XPUI_REBOOT 1 `` +3
       
  2441     WriteINIStr $PLUGINSDIR\Finish.ini `Field 5` Text  `${XPUI_${XPUI_UN}FINISHPAGE_TEXT_REBOOT}`
       
  2442     Goto +2
       
  2443     !ifdef XPUI_${XPUI_UN}FINISHPAGE_RUN & XPUI_${XPUI_UN}FINISHPAGE_DOCS
       
  2444     WriteINIStr $PLUGINSDIR\Finish.ini `Field 5` Text `${XPUI_${XPUI_UN}FINISHPAGE_TEXT_RUN}`
       
  2445     !else
       
  2446     WriteINIStr $PLUGINSDIR\Finish.ini `Field 5` Text `${XPUI_${XPUI_UN}FINISHPAGE_TEXT}`
       
  2447     !endif
       
  2448     
       
  2449     !ifdef XPUI_${XPUI_UN}FINISHPAGE_TEXT_USE_TOP_ALT
       
  2450     WriteINIStr $PLUGINSDIR\Finish.ini `Field 4` Top 17
       
  2451     !endif
       
  2452     
       
  2453     !ifndef XPUI_FINISHPAGE_NOCLOSEBUTTON
       
  2454       WriteINIStr $PLUGINSDIR\Finish.ini Settings NextButtonText $(XPUI_BUTTONTEXT_CLOSE)
       
  2455     !endif
       
  2456     
       
  2457     WriteINIStr `$PLUGINSDIR\Finish.ini` `Settings` `RTL` `$(^RTL)`
       
  2458     InstallOptions::initDialog /NOUNLOAD $PLUGINSDIR\finish.ini
       
  2459     Pop $XPUI_TEMP2
       
  2460     !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_TEMP2
       
  2461     GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1
       
  2462     EnableWindow $XPUI_TEMP1 1
       
  2463     !ifndef XPUI_FINISHPAGE_NOCLOSEBUTTON
       
  2464     SendMessage $XPUI_TEMP1 0xC 0 STR:$(XPUI_BUTTONTEXT_CLOSE)
       
  2465     !endif
       
  2466     GetDlgItem $XPUI_TEMP1 $HWNDPARENT 2
       
  2467     SendMessage $XPUI_TEMP1 0xC `` `STR:$(^CancelBtn)`
       
  2468     EnableWindow $XPUI_TEMP1 1
       
  2469     GetDlgItem $XPUI_TEMP1 $HWNDPARENT 3
       
  2470     !ifdef XPUI_${XPUI_UN}FINISHPAGE_NO_REINSTALL
       
  2471       EnableWindow $XPUI_TEMP1 0
       
  2472     !endif
       
  2473     
       
  2474     LockWindow on
       
  2475     GetDlgItem $XPUI_TEMP1 $XPUI_TEMP2 1200
       
  2476     !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_TEMP1
       
  2477     StrCmp $XPUI_REBOOT 1 a
       
  2478     !ifdef XPUI_${XPUI_UN}FINISHPAGE_RUN
       
  2479     SendMessage $XPUI_TEMP1 0xC 0 `STR:${XPUI_${XPUI_UN}FINISHPAGE_CHECKBOX_RUN}`
       
  2480     !endif
       
  2481     a:
       
  2482     
       
  2483     StrCmp $XPUI_REBOOT 1 XPUI.norunchk
       
  2484     !ifndef XPUI_${XPUI_UN}FINISHPAGE_RUN
       
  2485     ShowWindow $XPUI_TEMP1 0
       
  2486     !endif
       
  2487     XPUI.norunchk:
       
  2488     
       
  2489     GetDlgItem $XPUI_TEMP1 $XPUI_TEMP2 1201
       
  2490     !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_TEMP1
       
  2491     StrCmp $XPUI_REBOOT 1 b
       
  2492     !ifdef XPUI_${XPUI_UN}FINISHPAGE_DOCS
       
  2493     SendMessage $XPUI_TEMP1 0xC 0 `STR:${XPUI_${XPUI_UN}FINISHPAGE_CHECKBOX_DOCS}`
       
  2494     !endif
       
  2495     b:
       
  2496     
       
  2497     StrCmp $XPUI_REBOOT 1 XPUI.nodocchk
       
  2498     !ifndef XPUI_${XPUI_UN}FINISHPAGE_DOCS
       
  2499     ShowWindow $XPUI_TEMP1 0
       
  2500     !endif
       
  2501     XPUI.nodocchk:
       
  2502     
       
  2503     GetDlgItem $XPUI_TEMP1 $XPUI_TEMP2 1203
       
  2504     !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_TEMP1
       
  2505     GetDlgItem $XPUI_TEMP1 $XPUI_TEMP2 1203
       
  2506     !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_TEMP1
       
  2507     SendMessage $XPUI_TEMP1 0xC 0 `STR:${XPUI_${XPUI_UN}FINISHPAGE_TEXT_TOP}`
       
  2508     CreateFont $XPUI_HWND `$(^Font)` 12 700 ; previously Tahoma
       
  2509     SendMessage $XPUI_TEMP1 0x30 $XPUI_HWND $XPUI_HWND
       
  2510     !ifdef XPUI_${XPUI_UN}FINISHPAGE_TEXT_USE_TOP_ALT
       
  2511       SendMessage $XPUI_TEMP1 0xC 0 `STR:${XPUI_${XPUI_UN}FINISHPAGE_TEXT_TOP_ALT}`
       
  2512       CreateFont $XPUI_HWND `$(^Font)` 8 700 ; previously MS Sans Serif
       
  2513       SendMessage $XPUI_TEMP1 0x30 $XPUI_HWND $XPUI_HWND
       
  2514     !endif
       
  2515     GetDlgItem $XPUI_TEMP1 $XPUI_TEMP2 1204
       
  2516     !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_TEMP1
       
  2517     
       
  2518     !ifndef XPUI_${XPUI_UN}FINISHPAGE_RUN & XPUI_${XPUI_UN}FINISHPAGE_DOCS
       
  2519     StrCmp $XPUI_REBOOT 1 XPUI.no-normal-text
       
  2520     GetDlgItem $XPUI_TEMP1 $XPUI_TEMP2 1200
       
  2521     ShowWindow $XPUI_TEMP1 0
       
  2522     GetDlgItem $XPUI_TEMP1 $XPUI_TEMP2 1201
       
  2523     ShowWindow $XPUI_TEMP1 0
       
  2524     XPUI.no-normal-text:
       
  2525     !endif
       
  2526     
       
  2527     GetDlgItem $XPUI_TEMP1 $XPUI_TEMP2 1202
       
  2528     !insertmacro XPUI_CONTROL_SKIN_LIGHT $XPUI_TEMP1
       
  2529     !ifdef XPUI_${XPUI_UN}FINISHPAGE_LINK_TEXT
       
  2530     SendMessage $XPUI_TEMP1 0xC 0 `STR:${XPUI_${XPUI_UN}FINISHPAGE_LINK_TEXT}`
       
  2531     !endif
       
  2532     !ifndef XPUI_${XPUI_UN}FINISHPAGE_LINK
       
  2533     ShowWindow $XPUI_TEMP1 0
       
  2534     !endif
       
  2535     
       
  2536     !insertmacro XPUI_PAGE_CUSTOMFUNCTION SHOW
       
  2537     SetBrandingImage /IMGID=1019 /RESIZETOFIT "$PLUGINSDIR\page.bmp"
       
  2538     
       
  2539     LockWindow off
       
  2540     InstallOptions::show
       
  2541   FunctionEnd
       
  2542   
       
  2543   Function `${XPUI_UNFUNC}XPUI.FINISH.${XPUI_UNIQUEID}.verify`
       
  2544     StrCmp $XPUI_ABORTED 1 XPUI.grinding-halt
       
  2545     
       
  2546     !ifdef XPUI_${XPUI_UN}FINISHPAGE_LINK
       
  2547     ReadINIStr $XPUI_TEMP1 `$PLUGINSDIR\Finish.ini` `Settings` `State`
       
  2548     StrCmp $XPUI_TEMP1 3 `` XPUI.nolink
       
  2549     !ifdef XPUI_${XPUI_UN}FINISHPAGE_LINK_FUNCTION
       
  2550     Call `${XPUI_${XPUI_UN}FINISHPAGE_LINK_FUNCTION}`
       
  2551     !else
       
  2552       !ifdef XPUI_${XPUI_UN}FINISHPAGE_LINK_LOCATION
       
  2553         ExecShell open `${XPUI_${XPUI_UN}FINISHPAGE_LINK_LOCATION}`
       
  2554       !else
       
  2555         MessageBox MB_OK|MB_ICONINFORMATION `Developer: Please specify a function for the Finish Page link to run in the symbol XPUI_${XPUI_UN}FINISHPAGE_LINK_FUNCTION or specify a location (local or http) to load in XPUI_${XPUI_UN}FINISHPAGE_LINK_LOCATION.  The Abort command is called automatically.$\n$\nUser: The developer of this setup program specified that a link be shown on this page, but he/she did not define what the link will do.  Please contact the company from which you obtained this installer and tell them about this message.`
       
  2556       !endif
       
  2557     !endif
       
  2558     LockWindow off
       
  2559     Abort
       
  2560     XPUI.nolink:
       
  2561     !endif
       
  2562     
       
  2563     !ifndef XPUI_${XPUI_UN}FINISHPAGE_NOREBOOT
       
  2564     ReadINIStr $XPUI_TEMP1 `$PLUGINSDIR\Finish.ini` `Settings` `State`
       
  2565     StrCmp $XPUI_TEMP1 1 `` XPUI.nodonebutton
       
  2566     StrCmp $XPUI_TEMP1 2 `` XPUI.nodonebutton
       
  2567     GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1
       
  2568     EnableWindow $XPUI_TEMP1 1
       
  2569     Abort
       
  2570     XPUI.nodonebutton:
       
  2571     !endif
       
  2572     
       
  2573     ReadINIStr $XPUI_TEMP1 `$PLUGINSDIR\Finish.ini` `Field 1` `State`
       
  2574     ReadINIStr $XPUI_TEMP2 `$PLUGINSDIR\Finish.ini` `Field 2` `State`
       
  2575     
       
  2576     StrCmp $XPUI_REBOOT 1 `` XPUI.norb2
       
  2577     StrCmp $XPUI_TEMP1 1 `` XPUI.norb
       
  2578     MessageBox MB_OKCANCEL|MB_ICONINFORMATION `${XPUI_${XPUI_UN}FINISHPAGE_REBOOT_MESSAGEBOX}` IDCANCEL XPUI.done
       
  2579     # the big...
       
  2580     Reboot # REBOOT! (Wow)
       
  2581     XPUI.norb:
       
  2582     Goto XPUI.done
       
  2583     
       
  2584     XPUI.norb2:
       
  2585     
       
  2586     !ifdef XPUI_${XPUI_UN}FINISHPAGE_RUN
       
  2587       !ifdef XPUI_${XPUI_UN}FINISHPAGE_RUN_FILE
       
  2588         StrCmp $XPUI_TEMP1 1 `` NoCallRun
       
  2589         Exec `${XPUI_${XPUI_UN}FINISHPAGE_RUN_FILE}`
       
  2590       !endif
       
  2591       !ifdef XPUI_${XPUI_UN}FINISHPAGE_RUN_FUNCTION
       
  2592         StrCmp $XPUI_TEMP1 1 `` NoCallRun
       
  2593         Call `${XPUI_${XPUI_UN}FINISHPAGE_RUN_FUNCTION}`
       
  2594       !endif
       
  2595       NoCallRun:
       
  2596     !endif
       
  2597     
       
  2598     !ifdef XPUI_${XPUI_UN}FINISHPAGE_DOCS
       
  2599       !ifdef XPUI_${XPUI_UN}FINISHPAGE_DOCS_FILE
       
  2600       StrCmp $XPUI_TEMP2 1 `` NoCallDocs
       
  2601       ExecShell open `${XPUI_${XPUI_UN}FINISHPAGE_DOCS_FILE}`
       
  2602       !endif
       
  2603       !ifdef XPUI_${XPUI_UN}FINISHPAGE_DOCS_FUNCTION
       
  2604       StrCmp $XPUI_TEMP2 1 `` NoCallDocs
       
  2605       Call `${XPUI_${XPUI_UN}FINISHPAGE_DOCS_FUNCTION}`
       
  2606       !endif
       
  2607       NoCallDocs:
       
  2608     !endif
       
  2609     
       
  2610     XPUI.done:
       
  2611     
       
  2612     !insertmacro XPUI_PAGE_CUSTOMFUNCTION LEAVE
       
  2613     
       
  2614     XPUI.grinding-halt:
       
  2615     SetRebootFlag false
       
  2616   
       
  2617   FunctionEnd
       
  2618   
       
  2619   !insertmacro XPUI_UNSET XPUI_PAGE_CUSTOMFUNCTION_PRE
       
  2620   !insertmacro XPUI_UNSET XPUI_PAGE_CUSTOMFUNCTION_SHOW
       
  2621   !insertmacro XPUI_UNSET XPUI_PAGE_CUSTOMFUNCTION_LEAVE
       
  2622   
       
  2623   !insertmacro XPUI_UNSET XPUI_${XPUI_UN}FINISHPAGE_LINK
       
  2624   !insertmacro XPUI_UNSET XPUI_${XPUI_UN}FINISHPAGE_LINK_FUNCTION
       
  2625   
       
  2626   !insertmacro XPUI_UNSET MUI_FINISHPAGE_LINK
       
  2627   !insertmacro XPUI_UNSET MUI_FINISHPAGE_LINK_LOCATION
       
  2628   !insertmacro XPUI_UNSET XPUI_${XPUI_UN}FINISHPAGE_LINK_LOCATION
       
  2629   
       
  2630   !insertmacro XPUI_UNSET XPUI_${XPUI_UN}FINISHPAGE_RUN
       
  2631   !insertmacro XPUI_UNSET XPUI_${XPUI_UN}FINISHPAGE_RUN_FILE
       
  2632   !insertmacro XPUI_UNSET XPUI_${XPUI_UN}FINISHPAGE_RUN_FUNCTION
       
  2633   !insertmacro XPUI_UNSET XPUI_${XPUI_UN}FINISHPAGE_DOCS
       
  2634   !insertmacro XPUI_UNSET XPUI_${XPUI_UN}FINISHPAGE_DOCS_FILE
       
  2635   !insertmacro XPUI_UNSET XPUI_${XPUI_UN}FINISHPAGE_DOCS_FUNCTION
       
  2636   !insertmacro XPUI_UNSET XPUI_${XPUI_UN}FINISHPAGE_REBOOT_DISABLE
       
  2637   !insertmacro XPUI_UNSET XPUI_${XPUI_UN}FINISHPAGE_REBOOT_FORCE
       
  2638   !insertmacro XPUI_UNSET XPUI_${XPUI_UN}FINISHPAGE_CHECKBOX_RUN
       
  2639   !insertmacro XPUI_UNSET XPUI_${XPUI_UN}FINISHPAGE_CHECKBOX_DOCS
       
  2640   !insertmacro XPUI_UNSET XPUI_UNFINISHPAGE_CHECKBOX_RUN
       
  2641   !insertmacro XPUI_UNSET XPUI_UNFINISHPAGE_CHECKBOX_DOCS
       
  2642   !insertmacro XPUI_UNSET XPUI_${XPUI_UN}FINISHPAGE_NOCLOSEBUTTON
       
  2643   
       
  2644   !undef XPUI_${XPUI_UN}FINISHPAGE_CAPTION
       
  2645   !undef XPUI_${XPUI_UN}FINISHPAGE_TITLE
       
  2646   !undef XPUI_${XPUI_UN}FINISHPAGE_SUBTITLE
       
  2647   !undef XPUI_${XPUI_UN}FINISHPAGE_TEXT_TOP
       
  2648   !undef XPUI_${XPUI_UN}FINISHPAGE_TEXT_TOP_ALT
       
  2649   !undef XPUI_${XPUI_UN}FINISHPAGE_TEXT
       
  2650   !undef XPUI_${XPUI_UN}FINISHPAGE_TEXT_RUN
       
  2651   !undef XPUI_${XPUI_UN}FINISHPAGE_TEXT_REBOOT
       
  2652   !undef XPUI_${XPUI_UN}FINISHPAGE_RADIOBUTTON_REBOOT
       
  2653   !undef XPUI_${XPUI_UN}FINISHPAGE_RADIOBUTTON_NOREBOOT
       
  2654   !undef XPUI_${XPUI_UN}FINISHPAGE_REBOOT_MESSAGEBOX
       
  2655   
       
  2656   !undef MUI_FINISHPAGE_TITLE
       
  2657   !undef MUI_FINISHPAGE_TEXT
       
  2658   !undef MUI_FINISHPAGE_BUTTON
       
  2659   !undef MUI_FINISHPAGE_TEXT_REBOOT
       
  2660   !undef MUI_FINISHPAGE_TEXT_REBOOTNOW
       
  2661   !undef MUI_FINISHPAGE_TEXT_REBOOTLATER
       
  2662   !undef MUI_FINISHPAGE_RUN_TEXT
       
  2663   !undef MUI_FINISHPAGE_SHOWREADME_TEXT
       
  2664   
       
  2665   !verbose pop
       
  2666 
       
  2667 !macroend
       
  2668 
       
  2669 ; INSTALL SUCCESS PAGE
       
  2670 !macro XPUI_PAGE_INSTSUCCESS
       
  2671 
       
  2672   !insertmacro XPUI_PAGECHECKS
       
  2673 
       
  2674   !ifndef XPUI_INTERNAL_PAGEUSED_INSTSUCCESS
       
  2675     !define XPUI_INTERNAL_PAGEUSED_INSTSUCCESS
       
  2676   !endif
       
  2677   
       
  2678   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}INSTSUCCESSPAGE_TITLE "$(XPUI_${XPUI_UN}INSTSUCCESSPAGE_TITLE)"
       
  2679   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}INSTSUCCESSPAGE_SUBTITLE "$(XPUI_${XPUI_UN}INSTSUCCESSPAGE_SUBTITLE)"
       
  2680   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}INSTSUCCESSPAGE_CAPTION "$(XPUI_${XPUI_UN}INSTSUCCESSPAGE_CAPTION)"
       
  2681   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}INSTSUCCESSPAGE_TEXT_TOP "$(XPUI_${XPUI_UN}INSTSUCCESSPAGE_TEXT_TOP)"
       
  2682   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}INSTSUCCESSPAGE_TEXT_BOTTOM "$(XPUI_${XPUI_UN}INSTSUCCESSPAGE_TEXT_BOTTOM)"
       
  2683   
       
  2684   !insertmacro XPUI_CREATEID
       
  2685   
       
  2686   PageEx ${XPUI_UNFUNC}custom
       
  2687     Caption `${XPUI_${XPUI_UN}INSTSUCCESSPAGE_CAPTION}`
       
  2688     PageCallbacks `${XPUI_UNFUNC}XPUI.instSuccess.${XPUI_UNIQUEID}.show` `${XPUI_UNFUNC}XPUI.instSuccess.${XPUI_UNIQUEID}.verify`
       
  2689   PageExEnd
       
  2690   
       
  2691   Function `${XPUI_UNFUNC}XPUI.instSuccess.${XPUI_UNIQUEID}.show`
       
  2692     StrCmp $XPUI_ABORTED 1 0 +2
       
  2693       Abort
       
  2694       
       
  2695     !ifdef XPUI_FASTERSKINNING
       
  2696     SetOutPath $PLUGINSDIR
       
  2697     File `${XPUI_SYSDIR}\INI\confirm.ini`
       
  2698     !endif
       
  2699     
       
  2700     !insertmacro XPUI_HEADER_TEXT `${XPUI_${XPUI_UN}INSTSUCCESSPAGE_TITLE}` `${XPUI_${XPUI_UN}INSTSUCCESSPAGE_SUBTITLE}`
       
  2701     
       
  2702     WriteINIStr $PLUGINSDIR\Confirm.ini `Settings` NextButtonText `Close`
       
  2703     WriteINIStr $PLUGINSDIR\Confirm.ini `Field 1` Text `${XPUI_${XPUI_UN}INSTSUCCESSPAGE_TEXT_TOP}`
       
  2704     WriteINIStr $PLUGINSDIR\Confirm.ini `Field 2` Text `${XPUI_${XPUI_UN}INSTSUCCESSPAGE_TEXT_BOTTOM}`
       
  2705     WriteINIStr `$PLUGINSDIR\Confirm.ini` `Settings` `RTL` `$(^RTL)`
       
  2706     InstallOptions::initDialog /NOUNLOAD $PLUGINSDIR\confirm.ini
       
  2707     GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1
       
  2708     EnableWindow $XPUI_TEMP1 0
       
  2709     SendMessage $XPUI_TEMP1 0xC `` `STR:Next`
       
  2710     GetDlgItem $XPUI_TEMP1 $HWNDPARENT 2
       
  2711     SendMessage $XPUI_TEMP1 0xC `` `STR:Close`
       
  2712     EnableWindow $XPUI_TEMP1 1
       
  2713     Pop $XPUI_TEMP2
       
  2714     !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_TEMP2
       
  2715     
       
  2716     !insertmacro XPUI_PAGE_CUSTOMFUNCTION SHOW
       
  2717     
       
  2718     GetDlgItem $XPUI_TEMP1 $XPUI_TEMP2 1200
       
  2719     !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_TEMP1
       
  2720     GetDlgItem $XPUI_TEMP1 $XPUI_TEMP2 1201
       
  2721     !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_TEMP1
       
  2722     GetDlgItem $XPUI_TEMP1 $XPUI_TEMP2 1202
       
  2723     !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_TEMP1
       
  2724     GetDlgItem $XPUI_TEMP1 $XPUI_TEMP2 1203
       
  2725     !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_TEMP1
       
  2726     GetDlgItem $XPUI_TEMP1 $XPUI_TEMP2 1204
       
  2727     !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_TEMP1
       
  2728     StrCpy $XPUI_NOABORTWARNING 1
       
  2729     SetBrandingImage /IMGID=1019 /RESIZETOFIT "$PLUGINSDIR\page.bmp"
       
  2730     !ifndef XPUI_NOLOCK
       
  2731     LockWindow off
       
  2732     !endif
       
  2733     InstallOptions::show
       
  2734   FunctionEnd
       
  2735   
       
  2736   Function `${XPUI_UNFUNC}XPUI.instSuccess.${XPUI_UNIQUEID}.verify`
       
  2737     
       
  2738     !ifndef XPUI_NOLOCK
       
  2739     LockWindow on
       
  2740     !endif
       
  2741     
       
  2742     !insertmacro XPUI_PAGE_CUSTOMFUNCTION LEAVE
       
  2743     
       
  2744   FunctionEnd
       
  2745   
       
  2746   !undef XPUI_${XPUI_UN}INSTSUCCESSPAGE_CAPTION
       
  2747   !undef XPUI_${XPUI_UN}INSTSUCCESSPAGE_TITLE
       
  2748   !undef XPUI_${XPUI_UN}INSTSUCCESSPAGE_SUBTITLE
       
  2749   !undef XPUI_${XPUI_UN}INSTSUCCESSPAGE_TEXT_TOP
       
  2750   !undef XPUI_${XPUI_UN}INSTSUCCESSPAGE_TEXT_BOTTOM
       
  2751   
       
  2752   !insertmacro XPUI_UNSET XPUI_PAGE_CUSTOMFUNCTION_PRE
       
  2753   !insertmacro XPUI_UNSET XPUI_PAGE_CUSTOMFUNCTION_SHOW
       
  2754   !insertmacro XPUI_UNSET XPUI_PAGE_CUSTOMFUNCTION_LEAVE
       
  2755   
       
  2756   !insertmacro XPUI_ENDPAGECHECKS
       
  2757   
       
  2758 !macroend
       
  2759 
       
  2760 !macro XPUI_PAGE_ABORT
       
  2761 
       
  2762   !insertmacro XPUI_PAGECHECKS
       
  2763   
       
  2764   !ifndef XPUI_INTERNAL_PAGEUSED_ABORT
       
  2765     !define XPUI_INTERNAL_PAGEUSED_ABORT
       
  2766   !endif
       
  2767   
       
  2768   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}ABORTPAGE_TITLE "$(XPUI_${XPUI_UN}ABORTPAGE_TITLE)"
       
  2769   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}ABORTPAGE_SUBTITLE "$(XPUI_${XPUI_UN}ABORTPAGE_SUBTITLE)"
       
  2770   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}ABORTPAGE_TEXT_TOP "$(XPUI_${XPUI_UN}ABORTPAGE_TEXT_TOP)"
       
  2771   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}ABORTPAGE_TEXT "$(XPUI_${XPUI_UN}ABORTPAGE_TEXT)"
       
  2772   !insertmacro XPUI_DEFAULT XPUI_${XPUI_UN}ABORTPAGE_CAPTION "$(XPUI_${XPUI_UN}ABORTPAGE_CAPTION)"
       
  2773   
       
  2774   !insertmacro XPUI_CREATEID
       
  2775   
       
  2776   PageEx ${XPUI_UNFUNC}custom
       
  2777   PageCallbacks ${XPUI_UNFUNC}XPUI.io.ABORTPAGE.${XPUI_UNIQUEID} ${XPUI_UNFUNC}XPUI.io.ABORTPAGE.${XPUI_UNIQUEID}.leave
       
  2778   Caption `${XPUI_${XPUI_UN}ABORTPAGE_CAPTION}`
       
  2779   PageExEnd
       
  2780 
       
  2781   Function ${XPUI_UNFUNC}XPUI.io.ABORTPAGE.${XPUI_UNIQUEID}
       
  2782     LockWindow on
       
  2783     StrCmp $XPUI_ABORTED 1 +2
       
  2784       Abort
       
  2785     
       
  2786     SetOutPath $PLUGINSDIR
       
  2787     File `${XPUI_SYSDIR}\INI\isWelcome.ini`
       
  2788 
       
  2789     !insertmacro XPUI_PAGE_CUSTOMFUNCTION PRE    
       
  2790 
       
  2791     WriteINIStr $PLUGINSDIR\isWelcome.ini `Field 1` Text `${XPUI_${XPUI_UN}ABORTPAGE_TEXT_TOP}`
       
  2792     WriteINIStr $PLUGINSDIR\isWelcome.ini `Field 2` Text `${XPUI_${XPUI_UN}ABORTPAGE_TEXT}`
       
  2793     WriteINIStr `$PLUGINSDIR\isWelcome.ini` `Settings` `RTL` `$(^RTL)`
       
  2794     
       
  2795     InstallOptions::initDialog /NOUNLOAD `$PLUGINSDIR\isWelcome.ini`
       
  2796       
       
  2797       Pop $XPUI_HWND
       
  2798       !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_HWND
       
  2799       
       
  2800       GetDlgItem $XPUI_TEMP1 $XPUI_HWND 1200
       
  2801         CreateFont $XPUI_TEMP2 `$(^Font)` 8 700 ; previously Tahoma
       
  2802         SendMessage $XPUI_TEMP1 0x30 $XPUI_TEMP2 $XPUI_TEMP2
       
  2803         !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_TEMP1
       
  2804       
       
  2805       GetDlgItem $XPUI_TEMP1 $XPUI_HWND 1201
       
  2806         CreateFont $XPUI_TEMP2 `$(^Font)` 8 350 ; previously Tahoma
       
  2807         SendMessage $XPUI_TEMP1 0x30 $XPUI_TEMP2 $XPUI_TEMP2
       
  2808         !insertmacro XPUI_CONTROL_SKIN_PAGE $XPUI_TEMP1
       
  2809       
       
  2810       !insertmacro XPUI_HEADER_TEXT `${XPUI_${XPUI_UN}ABORTPAGE_TITLE}` `${XPUI_${XPUI_UN}ABORTPAGE_SUBTITLE}`
       
  2811       
       
  2812       StrCpy $XPUI_NOABORTWARNING 1
       
  2813       
       
  2814       GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1
       
  2815       EnableWindow $XPUI_TEMP1 0
       
  2816       SendMessage $XPUI_TEMP1 0xC 0 STR:$(^NextBtn)
       
  2817       
       
  2818       GetDlgItem $XPUI_TEMP1 $HWNDPARENT 3
       
  2819       EnableWindow $XPUI_TEMP1 0
       
  2820       SendMessage $XPUI_TEMP1 0xC 0 STR:$(^BackBtn)
       
  2821       
       
  2822       GetDlgItem $XPUI_TEMP1 $HWNDPARENT 2
       
  2823       EnableWindow $XPUI_TEMP1 1
       
  2824       SendMessage $XPUI_TEMP1 0xC 0 STR:$(^CloseBtn)
       
  2825       
       
  2826       !insertmacro XPUI_PAGE_CUSTOMFUNCTION SHOW
       
  2827       
       
  2828       LockWindow off
       
  2829       
       
  2830     InstallOptions::show
       
  2831     FunctionEnd
       
  2832     
       
  2833     Function ${XPUI_UNFUNC}XPUI.io.ABORTPAGE.${XPUI_UNIQUEID}.leave
       
  2834     !ifndef XPUI_NOLOCK
       
  2835     LockWindow on
       
  2836     !endif
       
  2837     !insertmacro XPUI_PAGE_CUSTOMFUNCTION LEAVE
       
  2838   FunctionEnd
       
  2839   
       
  2840   !undef XPUI_${XPUI_UN}ABORTPAGE_TITLE
       
  2841   !undef XPUI_${XPUI_UN}ABORTPAGE_SUBTITLE
       
  2842   !undef XPUI_${XPUI_UN}ABORTPAGE_TEXT_TOP
       
  2843   !undef XPUI_${XPUI_UN}ABORTPAGE_TEXT
       
  2844   !undef XPUI_${XPUI_UN}ABORTPAGE_CAPTION
       
  2845   
       
  2846   !insertmacro XPUI_ENDPAGECHECKS
       
  2847 
       
  2848 !macroend
       
  2849 
       
  2850 !macro XPUI_PAGE_UNINSTCONFIRM_NSIS
       
  2851 
       
  2852 !insertmacro XPUI_PAGECHECKS
       
  2853 
       
  2854 !insertmacro XPUI_CREATEID
       
  2855 PageEx un.uninstConfirm
       
  2856 Caption `$(XPUI_UNINSTCONFIRMPAGE_NSIS_CAPTION)`
       
  2857 PageCallbacks `un.XPUI.unc_NSIS.${XPUI_UNIQUEID}.pre` `un.XPUI.unc_NSIS.${XPUI_UNIQUEID}.show` `un.XPUI.unc_NSIS.${XPUI_UNIQUEID}.leave`
       
  2858 PageExEnd
       
  2859 
       
  2860 Function `un.XPUI.unc_NSIS.${XPUI_UNIQUEID}.pre`
       
  2861 StrCmp $XPUI_ABORTED 1 `` +2
       
  2862 Abort
       
  2863 !insertmacro XPUI_PAGE_CUSTOMFUNCTION PRE
       
  2864 FunctionEnd
       
  2865 
       
  2866 Function `un.XPUI.unc_NSIS.${XPUI_UNIQUEID}.show`
       
  2867 
       
  2868 !insertmacro XPUI_HEADER_TEXT `$(XPUI_UNINSTCONFIRMPAGE_NSIS_TITLE)` `$(XPUI_UNINSTCONFIRMPAGE_NSIS_SUBTITLE)`
       
  2869 
       
  2870 FindWindow $XPUI_TEMP1 `#32770` `` $HWNDPARENT
       
  2871 !insertmacro XPUI_CONTROL_SKIN $XPUI_TEMP1
       
  2872 
       
  2873 !insertmacro XPUI_PAGECOLOR_INIT 1019
       
  2874 !insertmacro XPUI_PAGECOLOR_INIT 1029
       
  2875 !insertmacro XPUI_PAGECOLOR_INIT 1000
       
  2876 !insertmacro XPUI_PAGECOLOR_INIT 1006
       
  2877 
       
  2878 !insertmacro XPUI_INNERDIALOG_TEXT `$(XPUI_UNINSTCONFIRMPAGE_NSIS_TEXT_TOP)` 1006
       
  2879 !insertmacro XPUI_INNERDIALOG_TEXT `$(XPUI_UNINSTCONFIRMPAGE_NSIS_TEXT_FOLDER)` 1029
       
  2880 !insertmacro XPUI_PAGE_CUSTOMFUNCTION SHOW
       
  2881 FunctionEnd
       
  2882 
       
  2883 Function `un.XPUI.unc_NSIS.${XPUI_UNIQUEID}.leave`
       
  2884 !insertmacro XPUI_PAGE_CUSTOMFUNCTION LEAVE
       
  2885 FunctionEnd
       
  2886 !insertmacro XPUI_ENDPAGECHECKS
       
  2887 !macroEnd
       
  2888 
       
  2889 ; Page Command
       
  2890 
       
  2891 !macro XPUI_PAGE pname
       
  2892   !define `XPUI_PAGE_CHECK_${pname}`
       
  2893     !ifdef `XPUI_PAGE_CHECK_Welcome`
       
  2894     !insertmacro XPUI_PAGE_WELCOME
       
  2895     !else ifdef `XPUI_PAGE_CHECK_Welcome2`
       
  2896     !insertmacro XPUI_PAGE_WELCOME2
       
  2897     !else ifdef `XPUI_PAGE_CHECK_Components`
       
  2898     !insertmacro XPUI_PAGE_COMPONENTS
       
  2899     !else ifdef `XPUI_PAGE_CHECK_Directory`
       
  2900     !insertmacro XPUI_PAGE_DIRECTORY
       
  2901     !else ifdef `XPUI_PAGE_CHECK_InstConfirm`
       
  2902     !insertmacro XPUI_PAGE_INSTCONFIRM
       
  2903     !else ifdef `XPUI_PAGE_CHECK_InstFiles`
       
  2904     !insertmacro XPUI_PAGE_INSTFILES
       
  2905     !else ifdef `XPUI_PAGE_CHECK_InstSuccess`
       
  2906     !insertmacro XPUI_PAGE_INSTSUCCESS
       
  2907     !else ifdef `XPUI_PAGE_CHECK_Finish`
       
  2908     !insertmacro XPUI_PAGE_FINISH
       
  2909     !else ifdef `XPUI_PAGE_CHECK_Abort`
       
  2910     !insertmacro XPUI_PAGE_ABORT
       
  2911     !else
       
  2912     !verbose 4
       
  2913     !define temp.TEXT {Page}
       
  2914     !error "ExperienceUI: FATAL: Improper use of $${temp.TEXT} command.$\nUsage: $${temp.TEXT} (Welcome|Welcome2|Components|Directory|InstConfirm|InstFiles|Finish|InstSuccess|Abort)$\nNOTE: License and StartMenu pages must be inserted the old way."
       
  2915     !endif
       
  2916   !undef  `XPUI_PAGE_CHECK_${pname}`
       
  2917 !macroend
       
  2918 
       
  2919 !macro XPUI_UNPAGE pname
       
  2920   !insertmacro XPUI_PAGEMODE_PUSH
       
  2921   !insertmacro XPUI_PAGEMODE_UNINST
       
  2922   !define `XPUI_PAGE_CHECK_${pname}`
       
  2923     !ifdef `XPUI_PAGE_CHECK_Welcome`
       
  2924     !insertmacro XPUI_PAGE_WELCOME
       
  2925     !else ifdef `XPUI_PAGE_CHECK_Welcome2`
       
  2926     !insertmacro XPUI_PAGE_WELCOME2
       
  2927     !else ifdef `XPUI_PAGE_CHECK_Components`
       
  2928     !insertmacro XPUI_PAGE_COMPONENTS
       
  2929     !else ifdef `XPUI_PAGE_CHECK_Directory`
       
  2930     !insertmacro XPUI_PAGE_DIRECTORY
       
  2931     !else ifdef `XPUI_PAGE_CHECK_InstConfirm`
       
  2932     !insertmacro XPUI_PAGE_INSTCONFIRM
       
  2933     !else ifdef `XPUI_PAGE_CHECK_InstFiles`
       
  2934     !insertmacro XPUI_PAGE_INSTFILES
       
  2935     !else ifdef `XPUI_PAGE_CHECK_InstSuccess`
       
  2936     !insertmacro XPUI_PAGE_INSTSUCCESS
       
  2937     !else ifdef `XPUI_PAGE_CHECK_Finish`
       
  2938     !insertmacro XPUI_PAGE_FINISH
       
  2939     !else ifdef `XPUI_PAGE_CHECK_Abort`
       
  2940     !insertmacro XPUI_PAGE_ABORT
       
  2941     !else ifdef `XPUI_PAGE_CHECK_UnConfirm`
       
  2942     !insertmacro XPUI_PAGE_UNINSTCONFIRM_NSIS
       
  2943     !else
       
  2944     !verbose 4
       
  2945     !define temp.TEXT {UnPage}
       
  2946     !error "ExperienceUI: FATAL: Improper use of $${temp.TEXT} command.$\nUsage: $${temp.TEXT} (Welcome|Welcome2|Components|Directory|InstConfirm|InstFiles|Finish|InstSuccess|Abort)$\nNOTE: License and StartMenu pages must be inserted the old way."
       
  2947     !endif
       
  2948   !undef  `XPUI_PAGE_CHECK_${pname}`
       
  2949   !insertmacro XPUI_PAGEMODE_POP
       
  2950 !macroend
       
  2951 
       
  2952 !define Page "!insertmacro XPUI_PAGE"
       
  2953 !define UnPage "!insertmacro XPUI_UNPAGE"
       
  2954 !define StartMenuPage "!insertmacro XPUI_PAGE_STARTMENU"
       
  2955 !define LicensePage "!insertmacro XPUI_PAGE_LICENSE"
       
  2956 
       
  2957 ; SECTION DESCRIPTION CODE
       
  2958 ; WRITTEN BY JOOST VERBURG
       
  2959 
       
  2960 !macro XPUI_DESCRIPTION_BEGIN
       
  2961 FindWindow $XPUI_TEMP1 `#32770` `` $HWNDPARENT
       
  2962 GetDlgItem $XPUI_TEMP1 $XPUI_TEMP1 1043
       
  2963 StrCmp $0 -1 0 XPUI.description_begin_done
       
  2964 SendMessage $XPUI_TEMP1 0xC 0 `STR:$XPUI_HWND`
       
  2965 EnableWindow $XPUI_TEMP1 0
       
  2966 
       
  2967 Goto XPUI.description_done
       
  2968 XPUI.description_begin_done:
       
  2969 !macroend
       
  2970 
       
  2971 !macro XPUI_DESCRIPTION_TEXT VAR TEXT
       
  2972 !verbose push
       
  2973   !verbose 4
       
  2974   !ifndef XPUI_SILENT
       
  2975     !echo `XPUI Section Description Text: Section ${VAR}, Text "${TEXT}"`
       
  2976   !endif
       
  2977   !verbose ${XPUI_VERBOSE}
       
  2978 StrCmp $0 ${VAR} 0 XPUI.description_${VAR}_done
       
  2979 SendMessage $XPUI_TEMP1 0xC 0 `STR:`
       
  2980 EnableWindow $XPUI_TEMP1 1
       
  2981 SendMessage $XPUI_TEMP1 0xC 0 `STR:${TEXT}`
       
  2982 Goto XPUI.description_done
       
  2983 XPUI.description_${VAR}_done:
       
  2984 !verbose pop
       
  2985 !macroend
       
  2986 
       
  2987 !macro XPUI_DESCRIPTION_END
       
  2988 XPUI.description_done:
       
  2989 !macroend
       
  2990 
       
  2991 
       
  2992 !macro XPUI_FUNCTION_DESCRIPTION_BEGIN
       
  2993 !verbose push
       
  2994   !verbose 4
       
  2995   !ifndef XPUI_SILENT
       
  2996     !echo `!insertmacro: XPUI_FUNCTION_DESCRIPTION_BEGIN (Start Description Function)`
       
  2997   !endif
       
  2998   !verbose ${XPUI_VERBOSE}
       
  2999 Function .onMouseOverSection
       
  3000 FindWindow $XPUI_TEMP1 `#32770` `` $HWNDPARENT
       
  3001 GetDlgItem $XPUI_TEMP1 $XPUI_TEMP1 1042
       
  3002 SendMessage $XPUI_TEMP1 0xC 0 `STR:$XPUI_TEMP2`
       
  3003 !insertmacro XPUI_DESCRIPTION_BEGIN
       
  3004 !verbose pop
       
  3005 !macroend
       
  3006 
       
  3007 !macro XPUI_FUNCTION_DESCRIPTION_END
       
  3008 !verbose push
       
  3009   !verbose 4
       
  3010   !ifndef XPUI_SILENT
       
  3011     !echo `!insertmacro: XPUI_FUNCTION_DESCRIPTION_END (End Description Function)`
       
  3012   !endif
       
  3013   !verbose ${XPUI_VERBOSE}
       
  3014 !insertmacro XPUI_DESCRIPTION_END
       
  3015 FunctionEnd
       
  3016 !verbose pop
       
  3017 !macroend
       
  3018 
       
  3019 ; END SECTION DESCRIPTION CODE
       
  3020 
       
  3021 ; Macros - Left Info Panel
       
  3022 !macro XPUI_LEFT_SETTIME M
       
  3023 
       
  3024   Push $XPUI_TEMP1
       
  3025   
       
  3026     !ifndef XPUI_BGIMAGE
       
  3027     SetBrandingImage /IMGID=1302 "$PLUGINSDIR\LeftImg.bmp"
       
  3028     !else
       
  3029     SetBrandingImage /IMGID=1099 "$PLUGINSDIR\BgImage.bmp"
       
  3030     !endif
       
  3031   
       
  3032     GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1100
       
  3033     ShowWindow $XPUI_TEMP1 0
       
  3034     SendMessage $XPUI_TEMP1 0xC 0 "STR:Setup will complete in approximately:"
       
  3035     ShowWindow $XPUI_TEMP1 5
       
  3036     
       
  3037     GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1101
       
  3038     ShowWindow $XPUI_TEMP1 0
       
  3039     SendMessage $XPUI_TEMP1 0xC 0 "STR:${M}"
       
  3040     ShowWindow $XPUI_TEMP1 5
       
  3041     
       
  3042   Pop $XPUI_TEMP1
       
  3043 
       
  3044 !macroend
       
  3045 
       
  3046 !macro XPUI_LEFT_STATUS T B
       
  3047 
       
  3048   Push $XPUI_TEMP1
       
  3049   
       
  3050     !ifndef XPUI_BGIMAGE
       
  3051     SetBrandingImage /IMGID=1302 "$PLUGINSDIR\LeftImg.bmp"
       
  3052     !else
       
  3053     SetBrandingImage /IMGID=1099 "$PLUGINSDIR\BgImage.bmp"
       
  3054     !endif
       
  3055     
       
  3056     GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1100
       
  3057     ShowWindow $XPUI_TEMP1 0
       
  3058     SendMessage $XPUI_TEMP1 0xC 0 "STR:${T}"
       
  3059     ShowWindow $XPUI_TEMP1 5
       
  3060 
       
  3061     GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1101
       
  3062     ShowWindow $XPUI_TEMP1 0
       
  3063     SendMessage $XPUI_TEMP1 0xC 0 "STR:${B}"
       
  3064     ShowWindow $XPUI_TEMP1 5
       
  3065     
       
  3066   Pop $XPUI_TEMP1
       
  3067 
       
  3068 !macroend
       
  3069 
       
  3070 !macro XPUI_LEFT_BLANK
       
  3071 
       
  3072   Push $XPUI_TEMP1
       
  3073     GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1100
       
  3074     ShowWindow $XPUI_TEMP1 0
       
  3075 
       
  3076     GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1101
       
  3077     ShowWindow $XPUI_TEMP1 0
       
  3078   Pop $XPUI_TEMP1
       
  3079 
       
  3080 !macroend
       
  3081 
       
  3082 !macro XPUI_LEFT_MESSAGE T M B
       
  3083 
       
  3084   !define XPUI_LMB_CHECK_${B}
       
  3085   
       
  3086   !ifdef XPUI_LMB_CHECK_1 | XPUI_LMB_CHECK_2 | XPUI_LMB_CHECK_3
       
  3087   !else
       
  3088     !error "XPUI_LEFT_MESSAGE: Syntax error$\nUsage: !insertmacro XPUI_LEFT_MESSAGE message_title message_text type(1|2|3)$\nType: 1 - OK button, 2 - OK and cancel buttons, 3 - Yes and No buttons"
       
  3089   !endif
       
  3090   
       
  3091   !ifdef XPUI_BGIMAGE
       
  3092     !insertmacro XPUI_DEFAULT XPUI_LMB_TRANSPARENT ""
       
  3093   !endif
       
  3094   
       
  3095   StrCmp $XPUI_ABORTED 1 0 +2
       
  3096     Abort
       
  3097   
       
  3098   !ifndef XPUI_LMB_TRANSPARENT
       
  3099     GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1302
       
  3100     ShowWindow $XPUI_TEMP1 0
       
  3101   !endif
       
  3102   
       
  3103   SetOutPath $PLUGINSDIR
       
  3104   File "${XPUI_SYSDIR}\INI\MBSide.ini"
       
  3105   
       
  3106   InstallOptions::initDialog /NOUNLOAD $PLUGINSDIR\MBSide.ini
       
  3107 
       
  3108     Pop $XPUI_HWND
       
  3109     
       
  3110     !ifdef XPUI_LMB_TRANSPARENT
       
  3111       !insertmacro XPUI_CONTROL_SKIN_TRANS $XPUI_HWND
       
  3112     !else
       
  3113       !insertmacro XPUI_CONTROL_SKIN $XPUI_HWND
       
  3114     !endif
       
  3115     
       
  3116     GetDlgItem $XPUI_TEMP1 $XPUI_HWND 1203
       
  3117     !insertmacro XPUI_CONTROL_SKIN_LIGHT_TRANS $XPUI_TEMP1
       
  3118     CreateFont $XPUI_TEMP2 "Arial" 8 700
       
  3119     SendMessage $XPUI_TEMP1 0x30 $XPUI_TEMP2 0
       
  3120     SendMessage $XPUI_TEMP1 0xC 0 `STR:${T}`
       
  3121     
       
  3122     GetDlgItem $XPUI_TEMP1 $XPUI_HWND 1204
       
  3123     !insertmacro XPUI_CONTROL_SKIN_TRANS $XPUI_TEMP1
       
  3124     CreateFont $XPUI_TEMP2 "Arial" 8 350
       
  3125     SendMessage $XPUI_TEMP1 0x30 $XPUI_TEMP2 0
       
  3126     SendMessage $XPUI_TEMP1 0xC 0 `STR:${M}`
       
  3127     
       
  3128     ; Buttons
       
  3129     !ifdef XPUI_LMB_CHECK_1
       
  3130 
       
  3131       GetDlgItem $XPUI_TEMP1 $XPUI_HWND 1200
       
  3132       ShowWindow $XPUI_TEMP1 5
       
  3133       SendMessage $XPUI_TEMP1 0xC 0 STR:OK
       
  3134       
       
  3135       GetDlgItem $XPUI_TEMP1 $XPUI_HWND 1201
       
  3136       ShowWindow $XPUI_TEMP1 0
       
  3137       
       
  3138       GetDlgItem $XPUI_TEMP1 $XPUI_HWND 1202
       
  3139       ShowWindow $XPUI_TEMP1 0
       
  3140       
       
  3141     !else ifdef XPUI_LMB_CHECK_2
       
  3142 
       
  3143       GetDlgItem $XPUI_TEMP1 $XPUI_HWND 1200
       
  3144       ShowWindow $XPUI_TEMP1 0
       
  3145 
       
  3146       GetDlgItem $XPUI_TEMP1 $XPUI_HWND 1201
       
  3147       ShowWindow $XPUI_TEMP1 5
       
  3148       SendMessage $XPUI_TEMP1 0xC 0 STR:OK
       
  3149 
       
  3150       GetDlgItem $XPUI_TEMP1 $XPUI_HWND 1202
       
  3151       ShowWindow $XPUI_TEMP1 5
       
  3152       SendMessage $XPUI_TEMP1 0xC 0 STR:Cancel
       
  3153 
       
  3154     !else ifdef XPUI_LMB_CHECK_3
       
  3155 
       
  3156       GetDlgItem $XPUI_TEMP1 $XPUI_HWND 1200
       
  3157       ShowWindow $XPUI_TEMP1 0
       
  3158 
       
  3159       GetDlgItem $XPUI_TEMP1 $XPUI_HWND 1201
       
  3160       ShowWindow $XPUI_TEMP1 5
       
  3161       SendMessage $XPUI_TEMP1 0xC 0 STR:Yes
       
  3162 
       
  3163       GetDlgItem $XPUI_TEMP1 $XPUI_HWND 1202
       
  3164       ShowWindow $XPUI_TEMP1 5
       
  3165       SendMessage $XPUI_TEMP1 0xC 0 STR:No
       
  3166 
       
  3167     !endif
       
  3168     
       
  3169     GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1
       
  3170     ShowWindow $XPUI_TEMP1 0
       
  3171     
       
  3172     LockWindow off
       
  3173     
       
  3174   InstallOptions::show
       
  3175   
       
  3176   !ifndef XPUI_LMB_TRANSPARENT
       
  3177     GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1302
       
  3178     ShowWindow $XPUI_TEMP1 5
       
  3179   !endif
       
  3180   GetDlgItem $XPUI_TEMP1 $HWNDPARENT 1
       
  3181   ShowWindow $XPUI_TEMP1 5
       
  3182   
       
  3183   ReadINIStr $XPUI_TEMP2 $PLUGINSDIR\MBSide.ini Settings State
       
  3184   
       
  3185   !undef XPUI_LMB_CHECK_${B}
       
  3186 
       
  3187 !macroend
       
  3188 
       
  3189 ; This include is the entire multi-language system.  Without it, you're lost.  This is
       
  3190 ; really the only part from the old code that was completely spared.
       
  3191 !include "${XPUI_SYSDIR}\Lang.nsh"
       
  3192 !define Language "!insertmacro XPUI_LANGUAGE"
       
  3193 !define LangDialog "!insertmacro XPUI_LANGDLL_DISPLAY"
       
  3194 !define LangPage "!insertmacro XPUI_LANGPAGE_DISPLAY"
       
  3195 
       
  3196 !insertmacro XPUI_PAGEMODE_INST
       
  3197 
       
  3198 ; Skin Includes
       
  3199   !ifdef XPUI_SKIN
       
  3200     !ifndef XPUI_SKIN_INCLUDED
       
  3201     !define XPUI_SKIN_INCLUDED
       
  3202     !verbose push
       
  3203     !verbose 3 ; Allow errors to be exposed
       
  3204     !include "${XPUI_SYSDIR}\Skins\${XPUI_SKIN}.xpuiskin"
       
  3205     !verbose pop
       
  3206     !endif
       
  3207   !endif
       
  3208 
       
  3209 !ifdef XPUI_FASTERSKINNING
       
  3210   !insertmacro XPUI_DEFAULT XPUI_INTERNAL_INTERFACE_INSERTED ""
       
  3211   !insertmacro XPUI_INTERFACE
       
  3212 !endif
       
  3213 
       
  3214 !verbose 4
       
  3215 !ifndef XPUI_SILENT
       
  3216 !echo `XPUI Processing Complete.$\n$\n`
       
  3217 !endif ;XPUI_SILENT
       
  3218 !verbose pop
       
  3219 !endif ;XPUI_INCLUDED