Skip to content

Commit

Permalink
fix: installer not interrupted when system version not fit (>=Windows…
Browse files Browse the repository at this point in the history
… 8.1)
  • Loading branch information
fxliang committed Jun 11, 2024
1 parent 3234006 commit 261d2b2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions output/install.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ LangString LNKFORUPDATER ${LANG_TRADCHINESE} "【小狼毫】檢查新版本"
LangString LNKFORSETUP ${LANG_TRADCHINESE} "【小狼毫】安裝選項"
LangString LNKFORUNINSTALL ${LANG_TRADCHINESE} "卸載小狼毫"
LangString CONFIRMATION ${LANG_TRADCHINESE} "安裝前,請先卸載舊版本的小狼毫。$\n$\n按下「確定」移除舊版本,按下「取消」放棄本次安裝。"
LangString SYSTEMVERSIONNOTOK ${LANG_TRADCHINESE} "您的系统不被支持,最低系統要求:Windows 8.1!"

!insertmacro MUI_LANGUAGE "SimpChinese"
LangString DISPLAYNAME ${LANG_SIMPCHINESE} "小狼毫输入法"
Expand All @@ -88,6 +89,7 @@ LangString LNKFORUPDATER ${LANG_SIMPCHINESE} "【小狼毫】检查新版本"
LangString LNKFORSETUP ${LANG_SIMPCHINESE} "【小狼毫】安装选项"
LangString LNKFORUNINSTALL ${LANG_SIMPCHINESE} "卸载小狼毫"
LangString CONFIRMATION ${LANG_SIMPCHINESE} '安装前,请先卸载旧版本的小狼毫。$\n$\n点击 "确定" 移除旧版本,或点击 "取消" 放弃本次安装。'
LangString SYSTEMVERSIONNOTOK ${LANG_SIMPCHINESE} "您的系統不被支持,最低系统要求:Windows 8.1!"

!insertmacro MUI_LANGUAGE "English"
LangString DISPLAYNAME ${LANG_ENGLISH} "Weasel"
Expand All @@ -103,10 +105,19 @@ LangString LNKFORUPDATER ${LANG_ENGLISH} "Weasel Check for Updates"
LangString LNKFORSETUP ${LANG_ENGLISH} "Weasel Installation Preference"
LangString LNKFORUNINSTALL ${LANG_ENGLISH} "Uninstall Weasel"
LangString CONFIRMATION ${LANG_ENGLISH} "Before installation, please uninstall the old version of Weasel.$\n$\nPress 'OK' to remove the old version, or 'Cancel' to abort installation."
LangString SYSTEMVERSIONNOTOK ${LANG_ENGLISH} "Your system not supported, minimium system required: Windows 8.1!"

;--------------------------------

Function .onInit
; if not version >= 8.1, quit and MessageBox(if not silent)
${IfNot} ${AtLeastWin8.1}
IfSilent toquit
MessageBox MB_OK '$(SYSTEMVERSIONNOTOK)'
toquit:
Quit
${EndIf}

ReadRegStr $R0 HKLM "Software\Rime\Weasel" "InstallDir"
StrCmp $R0 "" 0 skip
; The default installation directory
Expand Down

0 comments on commit 261d2b2

Please sign in to comment.