updates
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4181 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
7140aeede2
commit
7e2442e17e
4 changed files with 64 additions and 66 deletions
|
@ -65,7 +65,7 @@ Call functions:
|
||||||
\c ; /B=0 - Banner isn't used (default)
|
\c ; /B=0 - Banner isn't used (default)
|
||||||
\c ; /B=1 - Banner is used. Callback when function
|
\c ; /B=1 - Banner is used. Callback when function
|
||||||
\c ; start to search in new directory
|
\c ; start to search in new directory
|
||||||
\c "Function" ; Callback function then found
|
\c "Function" ; Callback function when found
|
||||||
\c
|
\c
|
||||||
\c Function "Function"
|
\c Function "Function"
|
||||||
\c ; $R9 "path\name"
|
\c ; $R9 "path\name"
|
||||||
|
@ -420,7 +420,7 @@ Call functions:
|
||||||
\c ; [ALL]
|
\c ; [ALL]
|
||||||
\c ; Find all drives by letter (default)
|
\c ; Find all drives by letter (default)
|
||||||
\c ;
|
\c ;
|
||||||
\c "Function" ; Callback function then found
|
\c "Function" ; Callback function when found
|
||||||
\c
|
\c
|
||||||
\c Function "Function"
|
\c Function "Function"
|
||||||
\c ; $9 "drive letter" (a:\ c:\ ...)
|
\c ; $9 "drive letter" (a:\ c:\ ...)
|
||||||
|
@ -611,7 +611,7 @@ Call functions:
|
||||||
|
|
||||||
\S1{} GetExeName
|
\S1{} GetExeName
|
||||||
|
|
||||||
\b Get installer filename (also valid case for Windows 9X).
|
\b Get installer filename (with valid case for Windows 9X/Me).
|
||||||
|
|
||||||
\\<b\\>Syntax:\\</b\\>
|
\\<b\\>Syntax:\\</b\\>
|
||||||
|
|
||||||
|
@ -626,7 +626,7 @@ Call functions:
|
||||||
|
|
||||||
\S1{} GetExePath
|
\S1{} GetExePath
|
||||||
|
|
||||||
\b Get installer pathname ($EXEDIR with valid case for Windows 9X).
|
\b Get installer pathname ($EXEDIR with valid case for Windows 9X/Me).
|
||||||
|
|
||||||
\\<b\\>Syntax:\\</b\\>
|
\\<b\\>Syntax:\\</b\\>
|
||||||
|
|
||||||
|
@ -792,18 +792,20 @@ Call functions:
|
||||||
|
|
||||||
\c "[PathString]" ;
|
\c "[PathString]" ;
|
||||||
\c ;
|
\c ;
|
||||||
\c "[Option]" ; [Lenght][A|B|C]
|
\c "[Option]" ; [Length][A|B|C|D]
|
||||||
\c ;
|
\c ;
|
||||||
\c ; Lenght -Maximum string lenght
|
\c ; Length -Maximum string length
|
||||||
\c ; A -Trim center path (default)
|
\c ; A -Trim center path (default)
|
||||||
\c ; (C:\root\...\third path)
|
\c ; (C:\root\...\third path)
|
||||||
\c ; If A mode not possible Then will be used B mode
|
\c ; If A mode not possible Then will be used B mode
|
||||||
\c ; If B mode not possible Then will be used C mode
|
|
||||||
\c ; B -Trim right path
|
\c ; B -Trim right path
|
||||||
\c ; (C:\root\second path\...)
|
\c ; (C:\root\second path\...)
|
||||||
\c ; If B mode not possible Then will be used C mode
|
\c ; If B mode not possible Then will be used C mode
|
||||||
\c ; C -Trim right string
|
\c ; C -Trim right string
|
||||||
\c ; (C:\root\second path\third p...)
|
\c ; (C:\root\second path\third p...)
|
||||||
|
\c ; D -Trim right string + filename
|
||||||
|
\c ; (C:\root\second p...\third path)
|
||||||
|
\c ; If D mode not possible Then will be used C mode
|
||||||
\c ;
|
\c ;
|
||||||
\c $var ; Result: Trimmed path
|
\c $var ; Result: Trimmed path
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,7 @@ Function ShowCustom
|
||||||
StrCpy $GETBASENAME1 'C:\path\file.dll'
|
StrCpy $GETBASENAME1 'C:\path\file.dll'
|
||||||
StrCpy $GETFILEEXT1 'C:\path\file.dll'
|
StrCpy $GETFILEEXT1 'C:\path\file.dll'
|
||||||
StrCpy $BANNERTRIMPATH1 'C:\Server\Documents\Terminal\license.htm'
|
StrCpy $BANNERTRIMPATH1 'C:\Server\Documents\Terminal\license.htm'
|
||||||
StrCpy $BANNERTRIMPATH2 '35A'
|
StrCpy $BANNERTRIMPATH2 '34A'
|
||||||
StrCpy $DIRSTATE1 '$TEMP'
|
StrCpy $DIRSTATE1 '$TEMP'
|
||||||
|
|
||||||
GetDlgItem $1 $HWND 1203
|
GetDlgItem $1 $HWND 1203
|
||||||
|
|
|
@ -451,6 +451,18 @@ Section BannerTrimPath
|
||||||
${BannerTrimPath} 'C:\12\3456\789' '11C' $OUT1
|
${BannerTrimPath} 'C:\12\3456\789' '11C' $OUT1
|
||||||
StrCmp $OUT1 'C:\12\34...' 0 error
|
StrCmp $OUT1 'C:\12\34...' 0 error
|
||||||
|
|
||||||
|
${BannerTrimPath} 'C:\12\3456\789' '9D' $OUT1
|
||||||
|
StrCmp $OUT1 'C:\12\...' 0 error
|
||||||
|
|
||||||
|
${BannerTrimPath} 'C:\12\3456\789' '10D' $OUT1
|
||||||
|
StrCmp $OUT1 'C:\...\789' 0 error
|
||||||
|
|
||||||
|
${BannerTrimPath} 'C:\12\3456\789' '11D' $OUT1
|
||||||
|
StrCmp $OUT1 'C:\1...\789' 0 error
|
||||||
|
|
||||||
|
${BannerTrimPath} '123456789' '5D' $OUT1
|
||||||
|
StrCmp $OUT1 '12...' 0 error
|
||||||
|
|
||||||
goto +2
|
goto +2
|
||||||
error:
|
error:
|
||||||
SetErrors
|
SetErrors
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
_____________________________________________________________________________
|
_____________________________________________________________________________
|
||||||
|
|
||||||
File Functions Header v2.5
|
File Functions Header v2.6
|
||||||
_____________________________________________________________________________
|
_____________________________________________________________________________
|
||||||
|
|
||||||
2005 Shengalts Aleksander aka Instructor (Shengalts@mail.ru)
|
2005 Shengalts Aleksander aka Instructor (Shengalts@mail.ru)
|
||||||
|
@ -1063,34 +1063,41 @@ RefreshShellIcons
|
||||||
Push $4
|
Push $4
|
||||||
Push $5
|
Push $5
|
||||||
Push $6
|
Push $6
|
||||||
|
Push $7
|
||||||
ClearErrors
|
ClearErrors
|
||||||
|
|
||||||
StrCmp $1 'L' gettime
|
StrCmp $1 'L' gettime
|
||||||
System::Call '*(i,l,l,l,i,i,i,i,&t260,&t14) i .r2'
|
StrCmp $1 'A' getfile
|
||||||
System::Call 'kernel32::FindFirstFileA(t,i)i(r0,r2) .r3'
|
StrCmp $1 'C' getfile
|
||||||
IntCmp $3 -1 error
|
StrCmp $1 'M' getfile
|
||||||
System::Call 'kernel32::FindClose(i)i(r3)'
|
goto error
|
||||||
|
|
||||||
|
getfile:
|
||||||
|
IfFileExists $0 0 error
|
||||||
|
System::Call '*(i,l,l,l,i,i,i,i,&t260,&t14) i .r6'
|
||||||
|
System::Call 'kernel32::FindFirstFileA(t,i)i(r0,r6) .r2'
|
||||||
|
System::Call 'kernel32::FindClose(i)i(r2)'
|
||||||
|
|
||||||
gettime:
|
gettime:
|
||||||
System::Call '*(&i2,&i2,&i2,&i2,&i2,&i2,&i2,&i2) i .r0'
|
System::Call '*(&i2,&i2,&i2,&i2,&i2,&i2,&i2,&i2) i .r7'
|
||||||
StrCmp $1 'L' 0 filetime
|
StrCmp $1 'L' 0 filetime
|
||||||
System::Call 'kernel32::GetLocalTime(i)i(r0)'
|
System::Call 'kernel32::GetLocalTime(i)i(r7)'
|
||||||
goto convert
|
goto convert
|
||||||
|
|
||||||
filetime:
|
filetime:
|
||||||
System::Call '*$2(i,l,l,l,i,i,i,i,&t260,&t14)i(,.r6,.r5,.r4)'
|
System::Call '*$6(i,l,l,l,i,i,i,i,&t260,&t14)i(,.r4,.r3,.r2)'
|
||||||
|
System::Free $6
|
||||||
StrCmp $1 'A' 0 +3
|
StrCmp $1 'A' 0 +3
|
||||||
StrCpy $4 $5
|
StrCpy $2 $3
|
||||||
goto +5
|
goto +3
|
||||||
StrCmp $1 'C' 0 +3
|
StrCmp $1 'C' 0 +2
|
||||||
StrCpy $4 $6
|
StrCpy $2 $4
|
||||||
goto +2
|
System::Call 'kernel32::FileTimeToLocalFileTime(*l,*l)i(r2,.r3)'
|
||||||
StrCmp $1 'M' 0 error
|
System::Call 'kernel32::FileTimeToSystemTime(*l,i)i(r3,r7)'
|
||||||
System::Call 'kernel32::FileTimeToLocalFileTime(*l,*l)i(r4,.r3)'
|
|
||||||
System::Call 'kernel32::FileTimeToSystemTime(*l,i)i(r3,r0)'
|
|
||||||
|
|
||||||
convert:
|
convert:
|
||||||
System::Call '*$0(&i2,&i2,&i2,&i2,&i2,&i2,&i2,&i2)i(.r5,.r6,.r4,.r0,.r3,.r2,.r1,)'
|
System::Call '*$7(&i2,&i2,&i2,&i2,&i2,&i2,&i2,&i2)i(.r5,.r6,.r4,.r0,.r3,.r2,.r1,)'
|
||||||
|
System::Free $7
|
||||||
|
|
||||||
IntCmp $0 9 0 0 +2
|
IntCmp $0 9 0 0 +2
|
||||||
StrCpy $0 '0$0'
|
StrCpy $0 '0$0'
|
||||||
|
@ -1134,6 +1141,7 @@ RefreshShellIcons
|
||||||
StrCpy $6 ''
|
StrCpy $6 ''
|
||||||
|
|
||||||
end:
|
end:
|
||||||
|
Pop $7
|
||||||
Exch $6
|
Exch $6
|
||||||
Exch
|
Exch
|
||||||
Exch $5
|
Exch $5
|
||||||
|
@ -1357,23 +1365,8 @@ RefreshShellIcons
|
||||||
|
|
||||||
Function ${_FILEFUNC_UN}GetExeName
|
Function ${_FILEFUNC_UN}GetExeName
|
||||||
Push $0
|
Push $0
|
||||||
Push $1
|
System::Call 'kernel32::GetModuleFileNameA(i 0, t .r0, i 1024)'
|
||||||
|
System::Call 'kernel32::GetLongPathNameA(t r0, t .r0, i 1024)'
|
||||||
StrCpy $1 $CMDLINE 1
|
|
||||||
StrCmp $1 '"' 0 kernel
|
|
||||||
StrCpy $1 0
|
|
||||||
IntOp $1 $1 + 1
|
|
||||||
StrCpy $0 $CMDLINE 1 $1
|
|
||||||
StrCmp $0 '"' 0 -2
|
|
||||||
IntOp $1 $1 - 1
|
|
||||||
StrCpy $0 $CMDLINE $1 1
|
|
||||||
goto end
|
|
||||||
|
|
||||||
kernel:
|
|
||||||
System::Call 'kernel32::GetModuleFileNameA(i 0, t .r0, i 1024) i r1'
|
|
||||||
|
|
||||||
end:
|
|
||||||
Pop $1
|
|
||||||
Exch $0
|
Exch $0
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
|
@ -1391,31 +1384,8 @@ RefreshShellIcons
|
||||||
|
|
||||||
Function ${_FILEFUNC_UN}GetExePath
|
Function ${_FILEFUNC_UN}GetExePath
|
||||||
Push $0
|
Push $0
|
||||||
Push $1
|
|
||||||
Push $2
|
|
||||||
|
|
||||||
StrCpy $1 $CMDLINE 1
|
|
||||||
StrCmp $1 '"' 0 exedir
|
|
||||||
StrCpy $1 0
|
|
||||||
IntOp $1 $1 + 1
|
|
||||||
StrCpy $0 $CMDLINE 1 $1
|
|
||||||
StrCmp $0 '"' 0 -2
|
|
||||||
IntOp $1 $1 - 1
|
|
||||||
StrCpy $0 $CMDLINE $1 1
|
|
||||||
|
|
||||||
StrCpy $1 0
|
|
||||||
IntOp $1 $1 - 1
|
|
||||||
StrCpy $2 $0 1 $1
|
|
||||||
StrCmp $2 '\' 0 -2
|
|
||||||
StrCpy $0 $0 $1
|
|
||||||
goto end
|
|
||||||
|
|
||||||
exedir:
|
|
||||||
StrCpy $0 $EXEDIR
|
StrCpy $0 $EXEDIR
|
||||||
|
System::Call 'kernel32::GetLongPathNameA(t r0, t .r0, i 1024)'
|
||||||
end:
|
|
||||||
Pop $2
|
|
||||||
Pop $1
|
|
||||||
Exch $0
|
Exch $0
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
|
@ -1814,6 +1784,7 @@ RefreshShellIcons
|
||||||
StrCmp $3 'A' A-trim
|
StrCmp $3 'A' A-trim
|
||||||
StrCmp $3 'B' B-trim
|
StrCmp $3 'B' B-trim
|
||||||
StrCmp $3 'C' C-trim
|
StrCmp $3 'C' C-trim
|
||||||
|
StrCmp $3 'D' D-trim
|
||||||
|
|
||||||
A-trim:
|
A-trim:
|
||||||
StrCpy $3 $0 1 1
|
StrCpy $3 $0 1 1
|
||||||
|
@ -1854,6 +1825,19 @@ RefreshShellIcons
|
||||||
StrCpy $0 '$0...'
|
StrCpy $0 '$0...'
|
||||||
goto end
|
goto end
|
||||||
|
|
||||||
|
D-trim:
|
||||||
|
StrCpy $3 -1
|
||||||
|
IntOp $3 $3 - 1
|
||||||
|
StrCmp $3 -$2 C-trim
|
||||||
|
StrCpy $4 $0 1 $3
|
||||||
|
StrCmp $4 '\' 0 -3
|
||||||
|
StrCpy $4 $0 '' $3
|
||||||
|
IntOp $3 $1 + $3
|
||||||
|
IntCmp $3 2 C-trim C-trim
|
||||||
|
StrCpy $0 $0 $3
|
||||||
|
StrCpy $0 '$0...$4'
|
||||||
|
goto end
|
||||||
|
|
||||||
empty:
|
empty:
|
||||||
StrCpy $0 ''
|
StrCpy $0 ''
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue