Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   Setting cmopression method from command-line (http://forums.winamp.com/showthread.php?t=238068)

cowwoc 14th February 2006 23:18

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

dienjd 14th February 2006 23:26

Put this at the top of your script:
SetCompressor "${comptype}"

When you compile, pass in "... /DCOMPTYPE={zlib,bzip2,lzma} ..."

cowwoc 14th February 2006 23:28

Many thanks ;) I am consistently impressed with how flexible NSIS is!

Gili

Comperio 14th February 2006 23:53

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!


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

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.