FSP plug-in

From NSIS Wiki
Jump to navigationJump to search
Author: Takhir (talk, contrib)


"FSP" stands for "File Size Progress".

Links

Download:
Fsp.zip (26 KB)

Description

Plug-in adds a bit of animation to progress bar during big file extraction. If SetCompress is off and extract percentage not appears above progress bar, plug-in adds percent value to this control. If SetCompress is on and file name is not defined, plug-in takes percentage for progress bar moves from installer dialog. GetFileSize sample added to package for file size parameter automation at the compile time.


Syntax

"track" DLL function

fsp::track /NOUNLOAD [/FN=FILE_NAME]  [/FS=FILE_SIZE] [/INT=INTERVAL] [/PBF=FINAL_POS]
tracks file extraction process.
FN
FILE_NAME is a target file name. If not defined, plug-in attempts to extract '% done' value from installer dialog (works with 'SetCompress on' only).
FS
FILE_SIZE is a total (extracted) file size. Use gfs sample to automate this. Requires /FN defined.
INT
INTERVAL is time interval of file size checkouts, ms. Default is 500.
PBF
FINAL_POS is final position (percents of scale) of progress bar on extraction finish. Default is 100.

"stop" DLL function

fsp::stop
initiates thread to exit.

Example

No file name defined, SetCompress is on:

  SetOutPath "$PLUGINSDIR"
  Delete "vs6sp5.exe"
  fsp::track /nounload /pbf=95
  File "vs6sp5.exe"
  fsp::stop

SetCompress off mode animation :) :

!define FILENAME "vs6sp5.exe"
 
# file size extraction automation, adds FILESIZE definition
!system 'gfs.exe ${FILENAME}'
!include gfs.txt
 
Section
 
  SetOutPath "$PLUGINSDIR"
  Delete "${FILENAME}"
  fsp::track /nounload "/fn=$PLUGINSDIR\${FILENAME}" /fs=${FILESIZE} /int=300 /pbf=95
  File "${FILENAME}"
  fsp::stop

SectionEnd