Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   Show progress crompressing (http://forums.winamp.com/showthread.php?t=392073)

shirosakichi 18th May 2016 09:02

Show progress crompressing
 
Hi guys, i've searched, here and googled it, but i found nothing to show progress when compressing to a .rar file with 7zip command line. I'd like to know if it's possible or not. Thanks in advance and sorry for my bad english.

LoRd_MuldeR 18th May 2016 10:35

How is compressing files with 7-Zip command-line tool related to NSIS?

Can you elaborate what exactly you are trying to do and why? :confused:

shirosakichi 18th May 2016 10:51

In my installer I include 7zip command-line tool to compress some files on my clients machines, basically is a backup. I'm trying to display instdetails for compression process

code:
File C:\Users\compila\Downloads\7za920\7za.exe
nsExec::Exec '"$INSTDIR\7za.exe" a $INSTDIR\BACKUP\$BName.7z Somefile somefile'
Delete 7za.exe


That's more or less my code. Sorry, cant speak English well.

LoRd_MuldeR 18th May 2016 11:05

It's unusual to let your installer create archives on the client machine. Extraction is more common use case.

Anyway, you could use nsExec::ExecToLog() to forward the 7za.exe outputs to the NSIS log.

But this will really just forward the "raw" outputs of 7za to the NSIS Log, which may not give the desired results.

In theory you could parse 7za's stdout text, in realtime, convert the progress to a number (int) and update the progress bar accordingly. This is pretty doable in C/C++ code (i.e your own plug-in), but I doubt this will be possible with pure NSIS code.

shirosakichi 18th May 2016 11:32

Using ExecToLog is enough for me, thanks for your help.


All times are GMT. The time now is 17:41.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.