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