changeset 4255:ee1ae5d1fd88

installer: dont remove file association if is not for installed octave * tools/makeinst-script.sh.in: check .m file association and remove only if is same as installer set.
author John D
date Thu, 01 Dec 2016 13:44:09 -0500
parents 7f2d5c8c4491
children b5b3f7fcac8f
files tools/makeinst-script.sh.in
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tools/makeinst-script.sh.in	Thu Dec 01 13:44:05 2016 -0500
+++ b/tools/makeinst-script.sh.in	Thu Dec 01 13:44:09 2016 -0500
@@ -359,6 +359,10 @@
   ReadRegDWORD \$0 HKLM "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Octave-$VERSION" "RegisteredFileType"
   IfErrors not_registered_file
 
+  ; only try remove if is set to our version of octave
+  ReadRegStr \$0 HKCR ".m" ""
+  StrCmp \$0 "Octave.Document.$VERSION" 0 not_registered_file
+
   ReadRegStr \$0 HKCR ".m" "backup_val"
   IfErrors not_backup_file