mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-26 21:40:52 +01:00
Bug fix: NSIS script now set elements files "*.elmt" in read only
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4090 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
;--------------------------------
|
||||
;Include Modern UI
|
||||
!include "MUI2.nsh"
|
||||
!include "FileFunc.nsh"
|
||||
!insertmacro Locate
|
||||
|
||||
; MUI Settings
|
||||
;--------------------------------
|
||||
@@ -143,8 +145,15 @@ Section ""
|
||||
|
||||
; 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
|
||||
|
||||
|
||||
@@ -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 @@ Section ""
|
||||
|
||||
; 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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user