!define VERSION_NUM "v1.0.0" !define PACK_DIR "G:\0516\pack\2" !define INSTALL_NAME "sx-calendar" !define INSTALL_DIR "$PROFILE\AppData\Local" Unicode True InstallDir "${INSTALL_DIR}" LoadLanguageFile "${NSISDIR}\Contrib\Language files\SimpChinese.nlf" LangString Name ${LANG_SIMPCHINESE} "Simplified Chinese" Name "${INSTALL_NAME}" OutFile "${INSTALL_NAME}_installer_${VERSION_NUM}_x64.exe" RequestExecutionLevel user !include "${NSISDIR}\Contrib\Modern UI\System.nsh" Page license Page components Page directory Page instfiles UninstPage uninstConfirm UninstPage instfiles Section "Uninstaller" SectionIn RO WriteUninstaller "$INSTDIR\sx-calendar\Uninstall.exe" SectionEnd ; 设定许可协议文本 LicenseData "${PACK_DIR}\license\LICENSE" Section "sx-calendar" SetOutPath "$INSTDIR\sx-calendar" File /nonfatal /r "${PACK_DIR}\*.*" CreateShortCut "$DESKTOP\sx-calendar.lnk" $INSTDIR\sx-calendar\sx-calendar.exe "" \ "$INSTDIR\sx-calendar\sx-calendar.exe" 0 SW_SHOWNORMAL "" "sx-calendar" SectionEnd Section "Uninstall" Delete "$DESKTOP\sx-calendar.lnk" RMDir /r /REBOOTOK "$INSTDIR" Delete "$INSTDIR\Uninstall.exe" SectionEnd