mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-02-24 13:59:59 +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 Modern UI
|
||||||
!include "MUI2.nsh"
|
!include "MUI2.nsh"
|
||||||
|
!include "FileFunc.nsh"
|
||||||
|
!insertmacro Locate
|
||||||
|
|
||||||
; MUI Settings
|
; MUI Settings
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
@@ -143,8 +145,15 @@ Section ""
|
|||||||
|
|
||||||
; shortcut on the desktop
|
; shortcut on the desktop
|
||||||
CreateShortCut "$DESKTOP\QElectroTech.lnk" "$INSTDIR\Lancer QET.bat" 0 "$INSTDIR\ico\qelectrotech.ico"
|
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
|
SectionEnd
|
||||||
|
|
||||||
|
Function LocateCallback
|
||||||
|
SetFileAttributes $R9 FILE_ATTRIBUTE_READONLY
|
||||||
|
Push $0
|
||||||
|
FunctionEnd
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
;Installer Functions
|
;Installer Functions
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,8 @@
|
|||||||
;Include Modern UI
|
;Include Modern UI
|
||||||
!include x64.nsh
|
!include x64.nsh
|
||||||
!include "MUI2.nsh"
|
!include "MUI2.nsh"
|
||||||
|
!include "FileFunc.nsh"
|
||||||
|
!insertmacro Locate
|
||||||
!ifndef PROC
|
!ifndef PROC
|
||||||
!define PROC 32 ;
|
!define PROC 32 ;
|
||||||
!endif
|
!endif
|
||||||
@@ -153,8 +155,16 @@ Section ""
|
|||||||
|
|
||||||
; shortcut on the desktop
|
; shortcut on the desktop
|
||||||
CreateShortCut "$DESKTOP\QElectroTech.lnk" "$INSTDIR\Lancer QET.bat" 0 "$INSTDIR\ico\qelectrotech.ico"
|
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
|
SectionEnd
|
||||||
|
|
||||||
|
Function LocateCallback
|
||||||
|
SetFileAttributes $R9 FILE_ATTRIBUTE_READONLY
|
||||||
|
Push $0
|
||||||
|
FunctionEnd
|
||||||
|
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
;Installer Functions
|
;Installer Functions
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user