最新消息:

Nsis7z是NSIS支持7z解压缩支持回调函数的插件

nsis 永恒心锁 3306浏览 0评论
/*
Nsis7z是NSIS支持7z解压缩支持回调函数的插件
Nsis7z支持lzma的固实压缩算法
*/
Name "nsis7zsample"
; The file to write
OutFile "nsis7zsample.exe"
; The default installation directory
InstallDir "C:Utils"
; Request application privileges for Windows Vista
RequestExecutionLevel user
!addplugindir "..Release"
!addplugindir "."
Function CallbackTest
 Pop $R8
 Pop $R9
 SetDetailsPrint textonly
 DetailPrint "Installing $R8 / $R9..."
 SetDetailsPrint both
FunctionEnd
; The stuff to install
Section "" ;No components page, name is not important
 ; Set output path to the installation directory.
 SetOutPath $INSTDIR
 SetCompress off
 DetailPrint "Extracting package..."
 SetDetailsPrint listonly
 File Test.7z
 SetCompress auto
; File /nonfatal /oname=$PLUGINSDIRnsis7z.pdb Releasensis7z.pdb
 SetDetailsPrint both
 ; Usual mode - set unpacking prompt using DetailPrint,
 ; plugin will animate progress bar
; DetailPrint "Installing package..."
; Nsis7z::Extract "Test.7z"
 ; Details mode - unpacking promt generated from second param, use
 ; %s to insert unpack details like "10% (5 / 10 MB)"
; Nsis7z::ExtractWithDetails "Test.7z" "Installing package %s..."
 ; Callback mode - plugin will animate progress bar, you can do
 ; anything in callback function
 GetFunctionAddress $R9 CallbackTest
 Nsis7z::ExtractWithCallback "Test.7z" $R9
 Delete "$OUTDIRTest.7z"
SectionEnd ; end the section
永恒心锁,版权所有丨如未注明,均为转载丨本网站采用BY-NC-SA协议进行授权

转载请注明:永恒心锁-分享互联网 » Nsis7z是NSIS支持7z解压缩支持回调函数的插件

您必须 登录 才能发表评论!