Examples/ExperienceUI/UmuiImport.nsi
author Dan
Fri, 09 Oct 2009 16:27:44 -0400
changeset 18 0f79de3ac304
parent 13 2ae1abe546fd
permissions -rwxr-xr-x
Finish page: added XPUI_FINISHPAGE_CANCEL_ENABLE, which defaults to off. (Warning, default behavior change! - per MUI compat)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
     1
;ExperienceUI for NSIS
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
     2
;Welcome/Finish Page Example Script
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
     3
;Written by Dan Fuhry
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
     4
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
     5
;OK, I cheated, Joost wrote it :)
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
     6
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
     7
SetCompressor /FINAL /SOLID lzma
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
     8
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
     9
;--------------------------------
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    10
;Include ExperienceUI
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    11
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    12
  !define XPUI_SKIN Modern-blue
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    13
  !define XPUI_VERBOSE 4
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    14
  !include "XPUI.nsh"
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    15
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    16
;--------------------------------
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    17
;General
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    18
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    19
  ;Name and file
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    20
  Name "ExperienceUI Test - UltraModernUI Skin Import"
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    21
  OutFile "UmuiImport.exe"
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    22
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    23
  ;Default installation folder
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    24
  InstallDir "$PROGRAMFILES\ExperienceUI Test"
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    25
  
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    26
  ;Get installation folder from registry if available
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    27
  InstallDirRegKey HKCU "Software\ExperienceUI Test" ""
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    28
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    29
;--------------------------------
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    30
;Interface Settings
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    31
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    32
  !define MUI_ABORTWARNING
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    33
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    34
;--------------------------------
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    35
;Pages
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    36
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    37
  !insertmacro MUI_PAGE_WELCOME
13
2ae1abe546fd Updated all examples for detached installation compatibility
Dan
parents: 0
diff changeset
    38
  !insertmacro MUI_PAGE_LICENSE "${XPUI_SYSDIR}\License.rtf"
0
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    39
  !insertmacro MUI_PAGE_COMPONENTS
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    40
  !insertmacro MUI_PAGE_DIRECTORY
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    41
  !insertmacro MUI_PAGE_INSTFILES
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    42
  !insertmacro MUI_PAGE_FINISH
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    43
  
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    44
  !ifdef XPUI_VERSION
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    45
    !insertmacro XPUI_PAGE_ABORT
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    46
  !else
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    47
    !insertmacro UMUI_PAGE_ABORT
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    48
  !endif
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    49
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    50
  !ifdef XPUI_VERSION
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    51
    !insertmacro XPUI_PAGEMODE_UNINST
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    52
    !insertmacro XPUI_PAGE_WELCOME
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    53
    !insertmacro XPUI_PAGE_UNINSTCONFIRM_NSIS
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    54
    !insertmacro XPUI_PAGE_INSTFILES
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    55
    !insertmacro XPUI_PAGE_FINISH
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    56
    !insertmacro XPUI_PAGE_ABORT
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    57
  !else
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    58
    !insertmacro MUI_UNPAGE_WELCOME
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    59
    !insertmacro MUI_UNPAGE_CONFIRM
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    60
    !insertmacro MUI_UNPAGE_INSTFILES
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    61
    !insertmacro MUI_UNPAGE_FINISH
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    62
    !insertmacro UMUI_UNPAGE_ABORT
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    63
  !endif
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    64
  
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    65
  !ifdef XPUI_VERSION
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    66
    !insertmacro XPUI_PAGE_ABORT
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    67
  !endif
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    68
  
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    69
;--------------------------------
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    70
;Languages
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    71
 
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    72
  !insertmacro MUI_LANGUAGE "English"
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    73
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    74
;--------------------------------
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    75
;Installer Sections
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    76
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    77
Section "Dummy Section" SecDummy
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    78
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    79
  SetOutPath "$INSTDIR"
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    80
  
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    81
  ;ADD YOUR OWN FILES HERE...
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    82
  
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    83
  ;Store installation folder
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    84
  WriteRegStr HKCU "Software\ExperienceUI Test" "" $INSTDIR
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    85
  
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    86
  ;Create uninstaller
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    87
  WriteUninstaller "$INSTDIR\Uninstall.exe"
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    88
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    89
SectionEnd
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    90
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    91
;--------------------------------
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    92
;Descriptions
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    93
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    94
  ;Language strings
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    95
  LangString DESC_SecDummy ${LANG_ENGLISH} "A test section."
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    96
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    97
  ;Assign language strings to sections
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    98
  !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    99
    !insertmacro MUI_DESCRIPTION_TEXT ${SecDummy} $(DESC_SecDummy)
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   100
  !insertmacro MUI_FUNCTION_DESCRIPTION_END
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   101
 
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   102
;--------------------------------
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   103
;Uninstaller Section
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   104
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   105
Section "Uninstall"
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   106
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   107
  ;ADD YOUR OWN FILES HERE...
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   108
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   109
  Delete "$INSTDIR\Uninstall.exe"
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   110
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   111
  RMDir "$INSTDIR"
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   112
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   113
  DeleteRegKey /ifempty HKCU "Software\ExperienceUI Test"
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   114
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   115
SectionEnd