Updated nsis script.
--HG-- branch : develop
This commit is contained in:
parent
5210f757ee
commit
b579bdf180
30
dist/nsis/headers/fileversion.nsh
vendored
Normal file
30
dist/nsis/headers/fileversion.nsh
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
; fileversion.nsh
|
||||
; Source http://nsis.sourceforge.net/GetDLLVersionLocal_as_define
|
||||
;
|
||||
; GetDLLVersionLocal only gives you two packed 32bit numbers, but
|
||||
; sometimes you might need the unpacked numbers at compile time. This is
|
||||
; where this ugly thing comes in.
|
||||
;
|
||||
; Example usage
|
||||
; !insertmacro GetPEVersionLocal "$%windir%\system32\kernel32.dll" myver
|
||||
; Outfile "$%temp%\hello ${myver_1}.${myver_2}.${myver_3}.${myver_4}.exe"
|
||||
|
||||
!macro GetPEVersionLocal file defbase
|
||||
!verbose push
|
||||
!verbose 2
|
||||
!tempfile GetPEVersionLocal_nsi
|
||||
!tempfile GetPEVersionLocal_exe
|
||||
!define GetPEVersionLocal_doll "$"
|
||||
!appendfile "${GetPEVersionLocal_nsi}" 'SilentInstall silent$\nRequestExecutionLevel user$\nOutFile "${GetPEVersionLocal_exe}"$\nPage instfiles$\nSection'
|
||||
!appendfile "${GetPEVersionLocal_nsi}" '$\nFileOpen $0 "${GetPEVersionLocal_nsi}" w$\nGetDllVersion "${file}" $R0 $R1$\nIntOp $R2 $R0 / 0x00010000$\nIntOp $R3 $R0 & 0x0000FFFF$\nIntOp $R4 $R1 / 0x00010000$\nIntOp $R5 $R1 & 0x0000FFFF'
|
||||
!appendfile "${GetPEVersionLocal_nsi}" '$\nFileWrite $0 "!define ${defbase}_1 $R2${GetPEVersionLocal_doll}\n"$\nFileWrite $0 "!define ${defbase}_2 $R3${GetPEVersionLocal_doll}\n"$\nFileWrite $0 "!define ${defbase}_3 $R4${GetPEVersionLocal_doll}\n"$\nFileWrite $0 "!define ${defbase}_4 $R5${GetPEVersionLocal_doll}\n"$\nFileClose $0$\nSectionEnd'
|
||||
!system '"${NSISDIR}\makensis" /V2 "${GetPEVersionLocal_nsi}"' = 0
|
||||
!system '"${GetPEVersionLocal_exe}"' = 0
|
||||
!include "${GetPEVersionLocal_nsi}"
|
||||
!delfile "${GetPEVersionLocal_nsi}"
|
||||
!delfile "${GetPEVersionLocal_exe}"
|
||||
!undef GetPEVersionLocal_nsi
|
||||
!undef GetPEVersionLocal_exe
|
||||
!undef GetPEVersionLocal_doll
|
||||
!verbose pop
|
||||
!macroend
|
11
dist/nsis/valentina.nsi
vendored
11
dist/nsis/valentina.nsi
vendored
|
@ -2,6 +2,7 @@
|
|||
; --------------- Headers --------------
|
||||
!include "MUI2.nsh"
|
||||
!include "headers\fileassoc.nsh"
|
||||
!include "headers\fileversion.nsh"
|
||||
!include "FileFunc.nsh"
|
||||
|
||||
; --------------- General --------------
|
||||
|
@ -11,7 +12,10 @@ SetCompressor /FINAL /SOLID lzma
|
|||
|
||||
!define MUI_PRODUCT "Valentina"
|
||||
!define MUI_FILE "valentina"
|
||||
!define MUI_VERSION "0.2.8-alpha"
|
||||
|
||||
!insertmacro GetPEVersionLocal "c:\pack\valentina\valentina.exe" ver
|
||||
!define MUI_VERSION "${ver_1}.${ver_2}.${ver_3}-alpha"
|
||||
|
||||
!define MUI_BRANDINGTEXT "Valentina ${MUI_VERSION}"
|
||||
!define WEBSITE_LINK "http://www.valentina-project.org/"
|
||||
!define PUBLISHER "Roman Telezhynskyi"
|
||||
|
@ -20,7 +24,10 @@ InstallDir "$LOCALAPPDATA\${MUI_PRODUCT}" ; Default installation
|
|||
Name "${MUI_BRANDINGTEXT}" ; Name displayed on installer
|
||||
Icon "valentina\${MUI_FILE}.ico"
|
||||
Caption "${MUI_BRANDINGTEXT}"
|
||||
OutFile "${MUI_FILE}-install-v.${MUI_VERSION}_32bit.exe" ; Resulting installer filename
|
||||
|
||||
!define /date MYTIMESTAMP "%Y%m%d%H%M%S"
|
||||
OutFile "${MUI_FILE}_${MUI_VERSION}-${MYTIMESTAMP}_i386.exe" ; Resulting installer filename
|
||||
|
||||
InstallDirRegKey HKCU "$LOCALAPPDATA\${MUI_PRODUCT}" "" ; Get installation folder from registry if available
|
||||
LicenseData "valentina\LICENSE_GPL.txt"
|
||||
RequestExecutionLevel user ; Request application privileges for Windows Vista
|
||||
|
|
Loading…
Reference in New Issue
Block a user