[qet] [4090] Bug fix: NSIS script now set elements files "*.elmt" in read only |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 4090
Author: scorpio810
Date: 2015-08-08 02:45:16 +0200 (Sat, 08 Aug 2015)
Log Message:
-----------
Bug fix: NSIS script now set elements files "*.elmt" in read only
Modified Paths:
--------------
trunk/packaging/windows/QET.nsi
trunk/packaging/windows/QET64.nsi
Modified: trunk/packaging/windows/QET.nsi
===================================================================
--- trunk/packaging/windows/QET.nsi 2015-08-07 19:45:00 UTC (rev 4089)
+++ trunk/packaging/windows/QET.nsi 2015-08-08 00:45:16 UTC (rev 4090)
@@ -6,6 +6,8 @@
;--------------------------------
;Include Modern UI
!include "MUI2.nsh"
+ !include "FileFunc.nsh"
+ !insertmacro Locate
; MUI Settings
;--------------------------------
@@ -143,8 +145,15 @@
; shortcut on the desktop
CreateShortCut "$DESKTOP\QElectroTech.lnk" "$INSTDIR\Lancer QET.bat" 0 "$INSTDIR\ico\qelectrotech.ico"
+ ${Locate} "$INSTDIR\elements\" "/L=FD /M=*.elmt" "LocateCallback"
+ IfErrors 0 +2
+ MessageBox MB_OK "Error"
SectionEnd
+Function LocateCallback
+ SetFileAttributes $R9 FILE_ATTRIBUTE_READONLY
+ Push $0
+FunctionEnd
;--------------------------------
;Installer Functions
Modified: trunk/packaging/windows/QET64.nsi
===================================================================
--- trunk/packaging/windows/QET64.nsi 2015-08-07 19:45:00 UTC (rev 4089)
+++ trunk/packaging/windows/QET64.nsi 2015-08-08 00:45:16 UTC (rev 4090)
@@ -7,6 +7,8 @@
;Include Modern UI
!include x64.nsh
!include "MUI2.nsh"
+ !include "FileFunc.nsh"
+ !insertmacro Locate
!ifndef PROC
!define PROC 32 ;
!endif
@@ -153,8 +155,16 @@
; shortcut on the desktop
CreateShortCut "$DESKTOP\QElectroTech.lnk" "$INSTDIR\Lancer QET.bat" 0 "$INSTDIR\ico\qelectrotech.ico"
+ ${Locate} "$INSTDIR\elements\" "/L=FD /M=*.elmt" "LocateCallback"
+ IfErrors 0 +2
+ MessageBox MB_OK "Error"
SectionEnd
+Function LocateCallback
+ SetFileAttributes $R9 FILE_ATTRIBUTE_READONLY
+ Push $0
+FunctionEnd
+
;--------------------------------
;Installer Functions