Old 14th February 2006, 23:18   #1
cowwoc
Member
 
Join Date: Feb 2005
Posts: 51
Setting cmopression method from command-line

Hi,

I need to be able to specify the compression method used from command-line so for example my debug builds will use no compression and build faster and my release builds will use lzma which will add 10 seconds to my build time.

Is this currently possible or should I file a RFE?

Thanks,
Gili
cowwoc is offline   Reply With Quote
Old 14th February 2006, 23:26   #2
dienjd
Senior Member
 
Join Date: Oct 2005
Posts: 189
Put this at the top of your script:
SetCompressor "${comptype}"

When you compile, pass in "... /DCOMPTYPE={zlib,bzip2,lzma} ..."
dienjd is offline   Reply With Quote
Old 14th February 2006, 23:28   #3
cowwoc
Member
 
Join Date: Feb 2005
Posts: 51
Many thanks I am consistently impressed with how flexible NSIS is!

Gili
cowwoc is offline   Reply With Quote
Old 14th February 2006, 23:53   #4
Comperio
Major Dude
 
Comperio's Avatar
 
Join Date: Jan 2005
Location: Oregon Coast
Posts: 737
makensis.exe has a few commands that you might be able to use:
  • Use the /X command to specify a command
    EXAMPLE: /XSetCompress off
  • Use the /D command to !define 'debug'
    EXAMPLE: in command line, use /Ddebug. Then in your script, you can use:
    code:

    !ifdef debug
    SetCompress off
    !else
    SetCompressor zlib
    !endif


For a complete list of makensis commands, see the NSIS help file.

edit: Or dienjd's idea works too!
Comperio 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