Old 18th May 2016, 09:02   #1
shirosakichi
Junior Member
 
Join Date: Apr 2016
Posts: 8
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.
shirosakichi is offline   Reply With Quote
Old 18th May 2016, 10:35   #2
LoRd_MuldeR
Major Dude
 
LoRd_MuldeR's Avatar
 
Join Date: Sep 2005
Location: Somewhere over the Slaughterhouse
Posts: 797
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?

My Plugins: StdUtils | NSISList | CPUFeatures | ExecTimeout | KillProc
My source of inspiration: http://youtu.be/lCwY4_0W1YI
LoRd_MuldeR is offline   Reply With Quote
Old 18th May 2016, 10:51   #3
shirosakichi
Junior Member
 
Join Date: Apr 2016
Posts: 8
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.
shirosakichi is offline   Reply With Quote
Old 18th May 2016, 11:05   #4
LoRd_MuldeR
Major Dude
 
LoRd_MuldeR's Avatar
 
Join Date: Sep 2005
Location: Somewhere over the Slaughterhouse
Posts: 797
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.

My Plugins: StdUtils | NSISList | CPUFeatures | ExecTimeout | KillProc
My source of inspiration: http://youtu.be/lCwY4_0W1YI
LoRd_MuldeR is offline   Reply With Quote
Old 18th May 2016, 11:32   #5
shirosakichi
Junior Member
 
Join Date: Apr 2016
Posts: 8
Using ExecToLog is enough for me, thanks for your help.
shirosakichi is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump