Examples/ExperienceUI/WAnsis.nsi
changeset 0 d5ce4c64ef88
child 13 2ae1abe546fd
equal deleted inserted replaced
-1:000000000000 0:d5ce4c64ef88
       
     1 SetCompressor /SOLID /FINAL lzma
       
     2 
       
     3 !define       XPUI_WANSIS
       
     4 !define       XPUI_TEXT_COLOR 30343D
       
     5 !define       XPUI_TEXT_BGCOLOR 8DB174
       
     6 !define       XPUI_TEXT_LIGHTCOLOR FFFFFF
       
     7 !define       XPUI_WANSIS_SKIN Bliss
       
     8 !define       XPUI_WANSIS_HEADERIMAGE
       
     9 !define       XPUI_BUTTONTEXT_CLOSE "Finish"
       
    10 !define       XPUI_FINISHPAGE_TEXT "Setup has successfully installed $(^Name) on your computer.\r\n\r\nBut we're NOT DONE YET!\r\n\r\n\r\n\r\n\r\nPlease click Finish to find out what's just around the corner..."
       
    11 !define       XPUI_LICENSEPAGE_RADIOBUTTONS
       
    12 ;!define       XPUI_SKIN "Windows XP"
       
    13 !define       XPUI_DISABLEBG
       
    14 !define       XPUI_BOTTOMIMAGE
       
    15 
       
    16 !include      XPUI.nsh
       
    17 
       
    18 !define       XPUI_ABORTWARNING
       
    19 !define       XPUI_UNABORTWARNING
       
    20 
       
    21 !define       XPUI_FINISHPAGE_TEXT_USE_TOP_ALT
       
    22 !define       XPUI_UNFINISHPAGE_TEXT_USE_TOP_ALT
       
    23 
       
    24 !define       XPUI_PAGE_CUSTOMFUNCTION_PRE SetTime
       
    25 !insertmacro  XPUI_PAGE_WELCOME
       
    26 !insertmacro  XPUI_PAGE_WELCOME2
       
    27 !insertmacro  XPUI_PAGE_LICENSE "${NSISDIR}\Contrib\ExperienceUI\License.rtf"
       
    28 !insertmacro  XPUI_PAGE_COMPONENTS
       
    29 !insertmacro  XPUI_PAGE_DIRECTORY
       
    30 !insertmacro  XPUI_PAGE_STARTMENU App $0
       
    31 !insertmacro  XPUI_PAGE_INSTCONFIRM
       
    32 !insertmacro  XPUI_PAGE_INSTFILES
       
    33 !insertmacro  XPUI_PAGE_FINISH
       
    34 !insertmacro  XPUI_PAGE_ABORT
       
    35 
       
    36 !insertmacro  XPUI_PAGEMODE_UNINST
       
    37 !insertmacro  XPUI_PAGE_WELCOME
       
    38 !insertmacro  XPUI_PAGE_WELCOME2
       
    39 !insertmacro  XPUI_PAGE_LICENSE "${NSISDIR}\Contrib\ExperienceUI\License.rtf"
       
    40 !insertmacro  XPUI_PAGE_COMPONENTS
       
    41 !insertmacro  XPUI_PAGE_DIRECTORY
       
    42 !insertmacro  XPUI_PAGE_STARTMENU UninstApp $0
       
    43 !insertmacro  XPUI_PAGE_INSTCONFIRM
       
    44 !insertmacro  XPUI_PAGE_INSTFILES
       
    45 !insertmacro  XPUI_PAGE_FINISH
       
    46 !insertmacro  XPUI_PAGE_ABORT
       
    47 
       
    48 Icon D:\Nullsoft\NSIS2\Contrib\Graphics\Icons\modern-install-colorful.ico
       
    49 UninstallIcon D:\Nullsoft\NSIS2\Contrib\Graphics\Icons\modern-uninstall-colorful.ico
       
    50 
       
    51 Name "ExperienceUI $\"Bryce$\" Milestone One WAnsis Test"
       
    52 OutFile WAnsis.exe
       
    53 InstallDir $PROGRAMFILES\$(^Name)
       
    54 
       
    55 Section "Program"
       
    56   DetailPrint "Installing program (nah!)..."
       
    57   WriteUninstaller $EXEDIR\WAnsis-Uninst.exe
       
    58 SectionEnd
       
    59 
       
    60 SectionGroup /e "Documentation"
       
    61   Section "Help"
       
    62     DetailPrint "Installing docs (nah!)..."
       
    63   SectionEnd
       
    64 
       
    65   Section "Reference"
       
    66     DetailPrint "Installing docs (nah!)..."
       
    67   SectionEnd
       
    68 SectionGroupEnd
       
    69 
       
    70 Section "Source code"
       
    71   DetailPrint "Installing souce code (nah!)..."
       
    72 SectionEnd
       
    73 
       
    74 !insertmacro XPUI_PAGEMODE_INST
       
    75 !undef        XPUI_FINISHPAGE_TEXT_USE_TOP_ALT
       
    76 !define       XPUI_FINISHPAGE_LINK
       
    77 !define       XPUI_FINISHPAGE_LINK_TEXT "Here is a link. (No function set here, but functionality is obvious)"
       
    78 !define       XPUI_PAGE_CUSTOMFUNCTION_PRE ChangeSkin
       
    79 !insertmacro  XPUI_PAGE_WELCOME
       
    80 !insertmacro  XPUI_PAGE_WELCOME2
       
    81 !insertmacro  XPUI_PAGE_LICENSE "${NSISDIR}\Contrib\ExperienceUI\License.rtf"
       
    82 !insertmacro  XPUI_PAGE_COMPONENTS
       
    83 !insertmacro  XPUI_PAGE_DIRECTORY
       
    84 !insertmacro  XPUI_PAGE_INSTCONFIRM
       
    85 !insertmacro  XPUI_PAGE_INSTFILES
       
    86 !define       XPUI_PAGE_CUSTOMFUNCTION_SHOW SetTextOnFinish
       
    87 !insertmacro  XPUI_PAGE_FINISH
       
    88 !insertmacro  XPUI_PAGE_ABORT
       
    89 
       
    90 !insertmacro XPUI_PAGEMODE_UNINST
       
    91 !undef        XPUI_UNFINISHPAGE_TEXT_USE_TOP_ALT
       
    92 !define       XPUI_UNFINISHPAGE_LINK
       
    93 !define       XPUI_UNFINISHPAGE_LINK_TEXT "Here is a link. (No function set here, but functionality is obvious)"
       
    94 !define       XPUI_UNPAGE_CUSTOMFUNCTION_PRE un.ChangeSkin
       
    95 !insertmacro  XPUI_PAGE_WELCOME
       
    96 !insertmacro  XPUI_PAGE_WELCOME2
       
    97 !insertmacro  XPUI_PAGE_LICENSE "${NSISDIR}\Contrib\ExperienceUI\License.rtf"
       
    98 !insertmacro  XPUI_PAGE_COMPONENTS
       
    99 !insertmacro  XPUI_PAGE_DIRECTORY
       
   100 !insertmacro  XPUI_PAGE_INSTCONFIRM
       
   101 !insertmacro  XPUI_PAGE_INSTFILES
       
   102 !define       XPUI_PAGE_CUSTOMFUNCTION_SHOW un.SetTextOnFinish
       
   103 !insertmacro  XPUI_PAGE_FINISH
       
   104 !insertmacro  XPUI_PAGE_ABORT
       
   105 
       
   106 Function SetTime
       
   107 !insertmacro XPUI_LEFT_SETTIME "This is a test"
       
   108 FunctionEnd
       
   109 
       
   110 ; /*
       
   111 Function ChangeSkin
       
   112 LockWindow on
       
   113 SetOutPath $PLUGINSDIR
       
   114 File "${NSISDIR}\Contrib\ExperienceUI\Skins\LCD\*.bmp"
       
   115 SetBrandingImage /IMGID=1302 /RESIZETOFIT $PLUGINSDIR\LeftLogo.bmp
       
   116 SetBrandingImage /IMGID=1039 /RESIZETOFIT $PLUGINSDIR\bottom.bmp
       
   117 SetBrandingImage /IMGID=1046 /RESIZETOFIT $PLUGINSDIR\Header.bmp
       
   118 wansis::setskin /NOUNLOAD "$PLUGINSDIR\gen.bmp" "$PLUGINSDIR\genex.bmp"
       
   119 FunctionEnd
       
   120 ; */
       
   121 
       
   122 ; /*
       
   123 Function un.ChangeSkin
       
   124 LockWindow on
       
   125 SetOutPath $PLUGINSDIR
       
   126 File "${NSISDIR}\Contrib\ExperienceUI\Skins\LCD\*.bmp"
       
   127 SetBrandingImage /IMGID=1302 /RESIZETOFIT $PLUGINSDIR\LeftLogo.bmp
       
   128 SetBrandingImage /IMGID=1039 /RESIZETOFIT $PLUGINSDIR\bottom.bmp
       
   129 SetBrandingImage /IMGID=1046 /RESIZETOFIT $PLUGINSDIR\Header.bmp
       
   130 wansis::setskin /NOUNLOAD "$PLUGINSDIR\gen.bmp" "$PLUGINSDIR\genex.bmp"
       
   131 FunctionEnd
       
   132 ; */
       
   133 
       
   134 Function SetTextOnFinish
       
   135 GetDlgItem $0 $XPUI_TEMP2 1204
       
   136 SendMessage $0 0xC 0 "STR:Setup has successfully installed $(^Name) on your computer.$\r$\n$\r$\nPlease click $(XPUI_BUTTONTEXT_CLOSE) to exit Setup."
       
   137 FunctionEnd
       
   138 
       
   139 Function un.SetTextOnFinish
       
   140 GetDlgItem $0 $XPUI_TEMP2 1204
       
   141 SendMessage $0 0xC 0 "STR:Setup has successfully uninstalled $(^Name) from your computer.$\r$\n$\r$\nPlease click $(XPUI_BUTTONTEXT_CLOSE) to exit Setup."
       
   142 FunctionEnd
       
   143 
       
   144 Function .onInit
       
   145   InitPluginsDir
       
   146   SetOutPath $PLUGINSDIR
       
   147   File /oname=splash.gif "${NSISDIR}\Contrib\ExperienceUI\LargeLogo.gif"
       
   148   newAdvSplash::show 5000 1000 1000 -1 "$PLUGINSDIR\splash.gif"
       
   149 FunctionEnd
       
   150 
       
   151 !insertmacro  XPUI_LANGUAGE English