Merge pull request #167 from esainane/patch-1
[quassel.git] / scripts / build / SnoreNotify.nsh
1 !include LogicLib.nsh
2 !include WordFunc.nsh
3
4 Function SnoreWinVer
5     ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
6     ${VersionCompare} "6.2" $R0 $R0
7     ${If} $R0 == 1
8         Push "NotWin8"
9     ${Else}
10         Push "AtLeastWin8"
11     ${EndIf}
12 FunctionEnd
13
14 !macro SnoreShortcut path exe appID
15     Call SnoreWinVer
16     Pop $0
17     ${If} $0 == "AtLeastWin8"
18         nsExec::ExecToLog '"${SnoreToastExe}" -install "${path}" "${exe}" "${appID}"'
19     ${Else}
20         CreateShortCut "${path}" "${exe}"
21     ${EndIf}
22 !macroend