| | |
| | |
| | |
| | |
| | |
| |
|
| | |
| | |
| |
|
| | Var FCLangName |
| |
|
| | Function InitUser |
| |
|
| | |
| | |
| | ReadRegStr $FCLangName SHELL_CONTEXT "${APP_REGKEY_SETUP}" "FreeCAD Language" |
| | |
| | ${If} $FCLangName != "" |
| | StrCpy $LangName $FCLangName |
| | ${EndIf} |
| | |
| | FunctionEnd |
| |
|
| | |
| | |
| |
|
| | Function PostMultiUserPageInit |
| | |
| | ReadRegStr $0 SHCTX "${APP_UNINST_KEY}" "UninstallString" |
| | ${if} $0 != "" |
| | |
| | |
| | |
| |
|
| | |
| | ${TrimQuotes} $0 $0 |
| | |
| | IfFileExists $0 0 ContinueInstall |
| |
|
| | |
| | |
| | |
| | |
| | MessageBox MB_YESNOCANCEL "$(AlreadyInstalled)" /SD IDCANCEL IDYES ContinueInstall IDNO BackToMuiltUserPage |
| | Quit |
| | BackToMuiltUserPage: |
| | Abort |
| | ContinueInstall: |
| | ${endif} |
| |
|
| | |
| | |
| | IntOp $4 ${APP_VERSION_PATCH} + 20 |
| | ${for} $5 0 $4 |
| | ReadRegStr $0 SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}${APP_VERSION_MAJOR}${APP_VERSION_MINOR}$5" "DisplayVersion" |
| | |
| | ${if} $0 == "" |
| | ReadRegStr $0 SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}${APP_VERSION_MAJOR}${APP_VERSION_MINOR}$51" "DisplayVersion" |
| | ${endif} |
| | ${if} $0 != "" |
| | StrCpy $R5 $0 |
| | StrCpy $OldVersionNumber "${APP_VERSION_MAJOR}${APP_VERSION_MINOR}$5" |
| | |
| | ${endif} |
| | ${next} |
| |
|
| | |
| | StrCpy $1 $OldVersionNumber "" 1 |
| | StrCpy $2 ${APP_SERIES_KEY} "" 1 |
| | ${if} $1 > $2 |
| | |
| | StrCpy $R0 $OldVersionNumber |
| | StrCpy $OldVersionNumber $R5 |
| | MessageBox MB_OK|MB_ICONSTOP "$(NewerInstalled)" /SD IDOK |
| | StrCpy $OldVersionNumber $R0 |
| | Quit |
| | ${endif} |
| | FunctionEnd |
| |
|
| |
|
| | |
| | |
| |
|
| | Section "!${APP_NAME}" SecCore |
| | SectionIn RO |
| | SectionEnd |
| |
|
| | Section "$(SecFileAssocTitle)" SecFileAssoc |
| | StrCpy $CreateFileAssociations "true" |
| | SectionEnd |
| |
|
| | Section "$(SecDesktopTitle)" SecDesktop |
| | StrCpy $CreateDesktopIcon "true" |
| | SectionEnd |
| |
|
| | |
| | !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN |
| | !insertmacro MUI_DESCRIPTION_TEXT ${SecCore} "$(SecCoreDescription)" |
| | !insertmacro MUI_DESCRIPTION_TEXT ${SecFileAssoc} "$(SecFileAssocDescription)" |
| | !insertmacro MUI_DESCRIPTION_TEXT ${SecDesktop} "$(SecDesktopDescription)" |
| | !insertmacro MUI_FUNCTION_DESCRIPTION_END |
| |
|
| |
|
| | |
| | |
| | Function .onInit |
| |
|
| | ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion |
| | ${if} $R0 == "5.0" |
| | ${orif} $R0 == "5.1" |
| | ${orif} $R0 == "5.2" |
| | ${orif} $R0 == "6.0" |
| | ${orif} $R0 == "6.1" |
| | MessageBox MB_OK|MB_ICONSTOP "${APP_NAME} ${APP_VERSION} requires Windows 8 or newer." /SD IDOK |
| | Quit |
| | ${endif} |
| | |
| | |
| | ${if} ${RunningX64} |
| | SetRegView 64 |
| | !define LIBRARY_X64 |
| | ${endif} |
| | |
| | |
| | ${nsProcess::FindProcess} ${BIN_FREECAD} $R0 |
| | |
| | ${if} $R0 == "0" |
| | MessageBox MB_OK|MB_ICONSTOP "$(UnInstallRunning)" /SD IDOK |
| | Abort |
| | ${endif} |
| | |
| | ${nsProcess::Unload} |
| | |
| | |
| | !insertmacro MULTIUSER_INIT |
| |
|
| | |
| | StrCpy $CreateDesktopIcon "false" |
| | StrCpy $CreateFileAssociations "false" |
| | |
| | ${IfNot} ${Silent} |
| | |
| | Banner::show /NOUNLOAD "Checking system" |
| | Banner::destroy |
| | ${EndIf} |
| |
|
| | |
| | ${If} ${Silent} |
| | Call PostMultiUserPageInit |
| | ${endif} |
| |
|
| | FunctionEnd |
| |
|
| | |
| | Function un.onInit |
| |
|
| | |
| | !insertmacro UnAppPreSuff $AppPre $AppSuff |
| |
|
| | !insertmacro MULTIUSER_UNINIT |
| |
|
| | |
| | ${nsProcess::FindProcess} ${BIN_FREECAD} $R0 |
| | |
| | ${if} $R0 == "0" |
| | MessageBox MB_OK|MB_ICONSTOP "$(UnInstallRunning)" /SD IDOK |
| | Abort |
| | ${endif} |
| | |
| | ${nsProcess::Unload} |
| | |
| | |
| | ${if} ${RunningX64} |
| | SetRegView 64 |
| | ${endif} |
| |
|
| | |
| | |
| | ReadRegStr $0 HKLM "${APP_UNINST_KEY}" "DisplayVersion" |
| | ${if} $0 != "" |
| | ${andif} $MultiUser.Privileges != "Admin" |
| | ${andif} $MultiUser.Privileges != "Power" |
| | MessageBox MB_OK|MB_ICONSTOP "$(UnNotAdminLabel)" /SD IDOK |
| | Abort |
| | ${endif} |
| | |
| | ${if} $0 == "" |
| | ReadRegStr $0 HKCU "${APP_UNINST_KEY}" "DisplayVersion" |
| | ${if} $0 == "" |
| | MessageBox MB_OK|MB_ICONEXCLAMATION "$(UnNotInRegistryLabel)" /SD IDOK |
| | ${endif} |
| | ${endif} |
| |
|
| | |
| | MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "$(UnReallyRemoveLabel)" /SD IDYES IDYES +2 |
| | Abort |
| |
|
| | FunctionEnd |
| |
|