Examples/ExperienceUI/WAnsis.nsi
changeset 13 2ae1abe546fd
parent 0 d5ce4c64ef88
equal deleted inserted replaced
12:e1e0fe6c578e 13:2ae1abe546fd
    22 !define       XPUI_UNFINISHPAGE_TEXT_USE_TOP_ALT
    22 !define       XPUI_UNFINISHPAGE_TEXT_USE_TOP_ALT
    23 
    23 
    24 !define       XPUI_PAGE_CUSTOMFUNCTION_PRE SetTime
    24 !define       XPUI_PAGE_CUSTOMFUNCTION_PRE SetTime
    25 !insertmacro  XPUI_PAGE_WELCOME
    25 !insertmacro  XPUI_PAGE_WELCOME
    26 !insertmacro  XPUI_PAGE_WELCOME2
    26 !insertmacro  XPUI_PAGE_WELCOME2
    27 !insertmacro  XPUI_PAGE_LICENSE "${NSISDIR}\Contrib\ExperienceUI\License.rtf"
    27 !insertmacro  XPUI_PAGE_LICENSE "${XPUI_SYSDIR}\License.rtf"
    28 !insertmacro  XPUI_PAGE_COMPONENTS
    28 !insertmacro  XPUI_PAGE_COMPONENTS
    29 !insertmacro  XPUI_PAGE_DIRECTORY
    29 !insertmacro  XPUI_PAGE_DIRECTORY
    30 !insertmacro  XPUI_PAGE_STARTMENU App $0
    30 !insertmacro  XPUI_PAGE_STARTMENU App $0
    31 !insertmacro  XPUI_PAGE_INSTCONFIRM
    31 !insertmacro  XPUI_PAGE_INSTCONFIRM
    32 !insertmacro  XPUI_PAGE_INSTFILES
    32 !insertmacro  XPUI_PAGE_INSTFILES
    34 !insertmacro  XPUI_PAGE_ABORT
    34 !insertmacro  XPUI_PAGE_ABORT
    35 
    35 
    36 !insertmacro  XPUI_PAGEMODE_UNINST
    36 !insertmacro  XPUI_PAGEMODE_UNINST
    37 !insertmacro  XPUI_PAGE_WELCOME
    37 !insertmacro  XPUI_PAGE_WELCOME
    38 !insertmacro  XPUI_PAGE_WELCOME2
    38 !insertmacro  XPUI_PAGE_WELCOME2
    39 !insertmacro  XPUI_PAGE_LICENSE "${NSISDIR}\Contrib\ExperienceUI\License.rtf"
    39 !insertmacro  XPUI_PAGE_LICENSE "${XPUI_SYSDIR}\License.rtf"
    40 !insertmacro  XPUI_PAGE_COMPONENTS
    40 !insertmacro  XPUI_PAGE_COMPONENTS
    41 !insertmacro  XPUI_PAGE_DIRECTORY
    41 !insertmacro  XPUI_PAGE_DIRECTORY
    42 !insertmacro  XPUI_PAGE_STARTMENU UninstApp $0
    42 !insertmacro  XPUI_PAGE_STARTMENU UninstApp $0
    43 !insertmacro  XPUI_PAGE_INSTCONFIRM
    43 !insertmacro  XPUI_PAGE_INSTCONFIRM
    44 !insertmacro  XPUI_PAGE_INSTFILES
    44 !insertmacro  XPUI_PAGE_INSTFILES
    45 !insertmacro  XPUI_PAGE_FINISH
    45 !insertmacro  XPUI_PAGE_FINISH
    46 !insertmacro  XPUI_PAGE_ABORT
    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 
    47 
    51 Name "ExperienceUI $\"Bryce$\" Milestone One WAnsis Test"
    48 Name "ExperienceUI $\"Bryce$\" Milestone One WAnsis Test"
    52 OutFile WAnsis.exe
    49 OutFile WAnsis.exe
    53 InstallDir $PROGRAMFILES\$(^Name)
    50 InstallDir $PROGRAMFILES\$(^Name)
    54 
    51 
    76 !define       XPUI_FINISHPAGE_LINK
    73 !define       XPUI_FINISHPAGE_LINK
    77 !define       XPUI_FINISHPAGE_LINK_TEXT "Here is a link. (No function set here, but functionality is obvious)"
    74 !define       XPUI_FINISHPAGE_LINK_TEXT "Here is a link. (No function set here, but functionality is obvious)"
    78 !define       XPUI_PAGE_CUSTOMFUNCTION_PRE ChangeSkin
    75 !define       XPUI_PAGE_CUSTOMFUNCTION_PRE ChangeSkin
    79 !insertmacro  XPUI_PAGE_WELCOME
    76 !insertmacro  XPUI_PAGE_WELCOME
    80 !insertmacro  XPUI_PAGE_WELCOME2
    77 !insertmacro  XPUI_PAGE_WELCOME2
    81 !insertmacro  XPUI_PAGE_LICENSE "${NSISDIR}\Contrib\ExperienceUI\License.rtf"
    78 !insertmacro  XPUI_PAGE_LICENSE "${XPUI_SYSDIR}\License.rtf"
    82 !insertmacro  XPUI_PAGE_COMPONENTS
    79 !insertmacro  XPUI_PAGE_COMPONENTS
    83 !insertmacro  XPUI_PAGE_DIRECTORY
    80 !insertmacro  XPUI_PAGE_DIRECTORY
    84 !insertmacro  XPUI_PAGE_INSTCONFIRM
    81 !insertmacro  XPUI_PAGE_INSTCONFIRM
    85 !insertmacro  XPUI_PAGE_INSTFILES
    82 !insertmacro  XPUI_PAGE_INSTFILES
    86 !define       XPUI_PAGE_CUSTOMFUNCTION_SHOW SetTextOnFinish
    83 !define       XPUI_PAGE_CUSTOMFUNCTION_SHOW SetTextOnFinish
    92 !define       XPUI_UNFINISHPAGE_LINK
    89 !define       XPUI_UNFINISHPAGE_LINK
    93 !define       XPUI_UNFINISHPAGE_LINK_TEXT "Here is a link. (No function set here, but functionality is obvious)"
    90 !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
    91 !define       XPUI_UNPAGE_CUSTOMFUNCTION_PRE un.ChangeSkin
    95 !insertmacro  XPUI_PAGE_WELCOME
    92 !insertmacro  XPUI_PAGE_WELCOME
    96 !insertmacro  XPUI_PAGE_WELCOME2
    93 !insertmacro  XPUI_PAGE_WELCOME2
    97 !insertmacro  XPUI_PAGE_LICENSE "${NSISDIR}\Contrib\ExperienceUI\License.rtf"
    94 !insertmacro  XPUI_PAGE_LICENSE "${XPUI_SYSDIR}\License.rtf"
    98 !insertmacro  XPUI_PAGE_COMPONENTS
    95 !insertmacro  XPUI_PAGE_COMPONENTS
    99 !insertmacro  XPUI_PAGE_DIRECTORY
    96 !insertmacro  XPUI_PAGE_DIRECTORY
   100 !insertmacro  XPUI_PAGE_INSTCONFIRM
    97 !insertmacro  XPUI_PAGE_INSTCONFIRM
   101 !insertmacro  XPUI_PAGE_INSTFILES
    98 !insertmacro  XPUI_PAGE_INSTFILES
   102 !define       XPUI_PAGE_CUSTOMFUNCTION_SHOW un.SetTextOnFinish
    99 !define       XPUI_PAGE_CUSTOMFUNCTION_SHOW un.SetTextOnFinish
   109 
   106 
   110 ; /*
   107 ; /*
   111 Function ChangeSkin
   108 Function ChangeSkin
   112 LockWindow on
   109 LockWindow on
   113 SetOutPath $PLUGINSDIR
   110 SetOutPath $PLUGINSDIR
   114 File "${NSISDIR}\Contrib\ExperienceUI\Skins\LCD\*.bmp"
   111 File "${XPUI_SYSDIR}\Skins\LCD\*.bmp"
   115 SetBrandingImage /IMGID=1302 /RESIZETOFIT $PLUGINSDIR\LeftLogo.bmp
   112 SetBrandingImage /IMGID=1302 /RESIZETOFIT $PLUGINSDIR\LeftLogo.bmp
   116 SetBrandingImage /IMGID=1039 /RESIZETOFIT $PLUGINSDIR\bottom.bmp
   113 SetBrandingImage /IMGID=1039 /RESIZETOFIT $PLUGINSDIR\bottom.bmp
   117 SetBrandingImage /IMGID=1046 /RESIZETOFIT $PLUGINSDIR\Header.bmp
   114 SetBrandingImage /IMGID=1046 /RESIZETOFIT $PLUGINSDIR\Header.bmp
   118 wansis::setskin /NOUNLOAD "$PLUGINSDIR\gen.bmp" "$PLUGINSDIR\genex.bmp"
   115 wansis::setskin /NOUNLOAD "$PLUGINSDIR\gen.bmp" "$PLUGINSDIR\genex.bmp"
   119 FunctionEnd
   116 FunctionEnd
   121 
   118 
   122 ; /*
   119 ; /*
   123 Function un.ChangeSkin
   120 Function un.ChangeSkin
   124 LockWindow on
   121 LockWindow on
   125 SetOutPath $PLUGINSDIR
   122 SetOutPath $PLUGINSDIR
   126 File "${NSISDIR}\Contrib\ExperienceUI\Skins\LCD\*.bmp"
   123 File "${XPUI_SYSDIR}\Skins\LCD\*.bmp"
   127 SetBrandingImage /IMGID=1302 /RESIZETOFIT $PLUGINSDIR\LeftLogo.bmp
   124 SetBrandingImage /IMGID=1302 /RESIZETOFIT $PLUGINSDIR\LeftLogo.bmp
   128 SetBrandingImage /IMGID=1039 /RESIZETOFIT $PLUGINSDIR\bottom.bmp
   125 SetBrandingImage /IMGID=1039 /RESIZETOFIT $PLUGINSDIR\bottom.bmp
   129 SetBrandingImage /IMGID=1046 /RESIZETOFIT $PLUGINSDIR\Header.bmp
   126 SetBrandingImage /IMGID=1046 /RESIZETOFIT $PLUGINSDIR\Header.bmp
   130 wansis::setskin /NOUNLOAD "$PLUGINSDIR\gen.bmp" "$PLUGINSDIR\genex.bmp"
   127 wansis::setskin /NOUNLOAD "$PLUGINSDIR\gen.bmp" "$PLUGINSDIR\genex.bmp"
   131 FunctionEnd
   128 FunctionEnd
   142 FunctionEnd
   139 FunctionEnd
   143 
   140 
   144 Function .onInit
   141 Function .onInit
   145   InitPluginsDir
   142   InitPluginsDir
   146   SetOutPath $PLUGINSDIR
   143   SetOutPath $PLUGINSDIR
   147   File /oname=splash.gif "${NSISDIR}\Contrib\ExperienceUI\LargeLogo.gif"
   144   File /oname=splash.gif "${XPUI_SYSDIR}\LargeLogo.gif"
   148   newAdvSplash::show 5000 1000 1000 -1 "$PLUGINSDIR\splash.gif"
   145   newAdvSplash::show 5000 1000 1000 -1 "$PLUGINSDIR\splash.gif"
   149 FunctionEnd
   146 FunctionEnd
   150 
   147 
   151 !insertmacro  XPUI_LANGUAGE English
   148 !insertmacro  XPUI_LANGUAGE English