Arrby
28th March 2005 21:17 UTC
SetCompressor problem
NSIS version 2.05:
From the User Manual:
4.8.2 Compiler Flags
The following commands change how the compiler generates code and compresses data. These commands are valid ANYWHERE in the script, and effect every line below where each one is placed (until overridden by another command).
(my emphasis on ANYWHERE)
Trying to do:
SetCompressor zlib
SetCompress off
in my main section (i.e. where my File commands are)
AFTER some file commands, BEFORE some other File commands
and am getting the following error:
Error: command SetCompressor not valid in section
I have some files that have already been compressed and
dont want to have to wait for the compressor to waste its time trying to compress, how can I accomplish this?
deguix
29th March 2005 00:03 UTC
Put SetCompressor on the beginning of the script, outside Functions or Sections. You can use SetCompress anywhere in the script.
Arrby
29th March 2005 00:45 UTC
Thanks deguix! :up:
Docs say Setcompress off has no affect on solid compression which is used by both bzip2 and lzma.
I tried putting:
SetCompressor zlib
before one section and then:
SetCompressor lzma
BETWEEN that section and a following section but get another error:
Error: can't change compressor after data already got compressed or header already changed!
This seems to mean that if I want to selectively control what gets compressed and what doesn't, I can only use zlib?
:(
Pidgeot
29th March 2005 08:10 UTC
No, it means that you can only use one compression method in your installer. What you're doing is trying to use zlib for one part and LZMA for the rest - this is not possible, as the two formats are different and require seperate methods to unpack.
You CAN, however, use SetCompress to say "this part should be compressed" and "this part should not be compressed".
kichik
29th March 2005 19:15 UTC
Documentation updated to make it a bit clearer.