home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 March / CMCD0304.ISO / Software / Freeware / Programare / nullsoft / nsis20.exe / Source / exehead / config.h < prev    next >
C/C++ Source or Header  |  2004-01-30  |  15KB  |  397 lines

  1. #ifndef NSIS_CONFIG_H
  2. #define NSIS_CONFIG_H
  3.  
  4. #ifndef APSTUDIO_INVOKED // keep msdev's resource editor from mangling the .rc file
  5.  
  6. // Added by Dave Laundon 19th August 2002
  7. // For all internal functions, use of stdcall calling convention moves the
  8. // responsibility for tidying the stack to callee from caller, reducing the code
  9. // involved considerably.  Gives an instant saving of 0.5K.
  10. // NB - the zlib and bzip2 portions have been given the same treatment, but with
  11. // project compiler-options settings and/or project-wide defines.
  12. // NB - safer for NSIS's routines to be defined explicitly to avoid problems
  13. // calling DLL functions.
  14. #if defined(_WIN32) && ((_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED))
  15. #define NSISCALL  __stdcall   // Ordinary functions
  16. #define NSISCALLV __cdecl     // Variable-argument-list functions
  17. #else
  18. #define NSISCALL
  19. #define NSISCALLV
  20. #endif
  21.  
  22. // NSIS_MAX_STRLEN defines the maximum string length for internal variables
  23. // and stack entries. 1024 should be plenty, but if you are doing crazy registry
  24. // shit, you might want to bump it up. Generally it adds about 16-32x the memory,
  25. // so setting this to 4096 from 1024 will add around 64k of memory usage (not
  26. // really a big deal, but not usually needed).
  27. #define NSIS_MAX_STRLEN 1024
  28.  
  29. // NSIS_MAX_INST_TYPES define the maximum install types.
  30. // note that this should not exceed 32, ever.
  31. #define NSIS_MAX_INST_TYPES 32
  32.  
  33. // NSIS_DEFAULT_LANG defines the default language id NSIS will use if nothing
  34. // else is defined in the script. Default value is 1033 which is English.
  35. #define NSIS_DEFAULT_LANG 1033
  36.  
  37. // NSIS_CONFIG_UNINSTALL_SUPPORT enables the uninstaller
  38. // support. Comment it out if your installers don't need
  39. // uninstallers
  40. // adds less than 1kb.
  41. #define NSIS_CONFIG_UNINSTALL_SUPPORT
  42.  
  43. // NSIS_CONFIG_LICENSEPAGE enables support for the installer to
  44. // present a license page.
  45. #define NSIS_CONFIG_LICENSEPAGE
  46.  
  47. // NSIS_CONFIG_LICENSEPAGE enables support for the installer to
  48. // present a page.where you can select what sections are installed.
  49. // with this disabled, all sections are installed.
  50. #define NSIS_CONFIG_COMPONENTPAGE
  51.  
  52. // NSIS_CONFIG_SILENT_SUPPORT enables support for making installers
  53. // that are completely silent.
  54. #define NSIS_CONFIG_SILENT_SUPPORT
  55.  
  56. // NSIS_CONFIG_VISIBLE_SUPPORT enables support for making installers
  57. // that are visible.
  58. #define NSIS_CONFIG_VISIBLE_SUPPORT
  59.  
  60. // NSIS_CONFIG_ENHANCEDUI_SUPPORT enables support for CreateFont, 
  61. // SetCtlColors (used by some UIs), SetBrandingImage, .onGUIInit, etc
  62. #define NSIS_CONFIG_ENHANCEDUI_SUPPORT
  63.  
  64. // NSIS_CONFIG_COMPRESSION_SUPPORT enables support for making installers
  65. // that use compression (recommended).
  66. #define NSIS_CONFIG_COMPRESSION_SUPPORT
  67.   // compression specific options
  68.  
  69.   // NSIS_ZLIB_COMPRESS_WHOLE makes all install data in zlib installers
  70.   // compressed together. Runtime requirements are increased, but potential
  71.   // for compression is as well. Requires that the installer create a 
  72.   // (potentially large) temporary file in the temp directory.
  73.   // not recommended for zlib installers, since bzip2 performs much better
  74.   // than zlib in whole mode usually.
  75.   // #define NSIS_ZLIB_COMPRESS_WHOLE
  76.  
  77.   // NSIS_LZMA_COMPRESS_WHOLE makes all install data in lzma installers
  78.   // compressed together. Runtime requirements are increased, but potential
  79.   // for compression is as well. Requires that the installer create a 
  80.   // (potentially large) temporary file in the temp directory.
  81.   #define NSIS_LZMA_COMPRESS_WHOLE
  82.  
  83.   // NSIS_BZIP2_COMPRESS_WHOLE makes all install data in bzip2 installers
  84.   // compressed together. Runtime requirements are increased, but potential
  85.   // for compression is as well. Requires that the installer create a 
  86.   // (potentially large) temporary file in the temp directory.
  87.   // recommended for bzip2, since bzip2 really shines in this mode
  88.   #define NSIS_BZIP2_COMPRESS_WHOLE
  89.  
  90.   // if NSIS_COMPRESS_BZIP2_SMALLMODE is defined, bzip2's decompressor uses
  91.   // bzip2's alternative decompression method that uses less runtime 
  92.   // memory, at the expense of speed (and executable size). not recommended.
  93.   // #define NSIS_COMPRESS_BZIP2_SMALLMODE
  94.  
  95.   // if NSIS_COMPRESS_BZIP2_LEVEL is defined, it overrides the default bzip2
  96.   // compression window size of 9 (1-9 is valid)
  97.   // 9 uses the most memory, but typically compresses best (recommended).
  98.   // 1 uses the least memory, but typically compresses the worst.
  99.   #define NSIS_COMPRESS_BZIP2_LEVEL 9
  100.  
  101.  
  102. // NSIS_CONFIG_CRC_SUPPORT enables support for installer verification.
  103. // HIGHLY recommended.
  104. #define NSIS_CONFIG_CRC_SUPPORT
  105.  
  106. // NSIS_CONFIG_CRC_ANAL makes the CRC verification extremely careful, meaning
  107. // extra bytes on the end of file, or the first 512 bytes changing, will give
  108. // error. Enable this if you are paranoid, otherwise leaving it off seems safe
  109. // (and is less prone to reporting virii). If you will be digitally signing your
  110. // installers, leave this off (the default).
  111. // #define NSIS_CONFIG_CRC_ANAL
  112.  
  113.  
  114. // NSIS_CONFIG_LOG enables the logging facility.
  115. // turning this on (by uncommenting it) adds about
  116. // 4kb, but can be useful in debugging your installers.
  117. // NOT ENABLED BY DEFAULT.
  118. // #define NSIS_CONFIG_LOG
  119.  
  120. // NSIS_CONFIG_LOG_ODS makes the logging facility
  121. // use OutputDebugString instead of a file.
  122. // NOT ENABLED BY DEFAULT.
  123. // #define NSIS_CONFIG_LOG_ODS
  124.  
  125. // NSIS_SUPPORT_BGBG enables support for the blue (well, whatever
  126. // color you want) gradient background window.
  127. #define NSIS_SUPPORT_BGBG
  128.  
  129.  
  130. // NSIS_SUPPORT_CODECALLBACKS enables support for installer code callbacks.
  131. // recommended, as it uses a minimum of space and allows for neat functionality.
  132. #define NSIS_SUPPORT_CODECALLBACKS
  133.  
  134.  
  135. // NSIS_SUPPORT_MOVEONREBOOT enables support for uninstallers that automatically
  136. // delete themselves from the temp directory, as well as the reboot moving/deleting
  137. // modes of Delete and Rename. Adds about 512 gay bytes..
  138. #define NSIS_SUPPORT_MOVEONREBOOT
  139.  
  140. /////////////// the following are instruction enabling defines ///////////////
  141.  
  142. // NSIS_SUPPORT_ACTIVEXREG enables activeX plug-in registration
  143. // and deregistration, as well as CallInstDLL
  144. #define NSIS_SUPPORT_ACTIVEXREG
  145.  
  146. // NSIS_SUPPORT_INTOPTS enables support for IntCmp, IntCmpU, IntOp, and IntFmt.
  147. #define NSIS_SUPPORT_INTOPTS
  148.  
  149. // NSIS_SUPPORT_STROPTS enables support for StrCmp, StrCpy, and StrLen, as well as Get*Local.
  150. #define NSIS_SUPPORT_STROPTS
  151.  
  152. // NSIS_SUPPORT_STACK enables support for the stack (Push, Pop, Exch)
  153. #define NSIS_SUPPORT_STACK
  154.  
  155. // NSIS_SUPPORT_FILEFUNCTIONS enables support for FileOpen,FileClose, FileSeek, FileRead, and FileWrite.
  156. #define NSIS_SUPPORT_FILEFUNCTIONS
  157.  
  158. // NSIS_SUPPORT_FINDFIRST enables support for FindFirst, FindNext, and FindClose.
  159. #define NSIS_SUPPORT_FINDFIRST
  160.  
  161. // NSIS_SUPPORT_CREATESHORTCUT enables support for CreateShortCut.
  162. #define NSIS_SUPPORT_CREATESHORTCUT
  163.  
  164. // NSIS_SUPPORT_INIFILES enables support for ReadINIStr and WriteINIStr.
  165. #define NSIS_SUPPORT_INIFILES
  166.  
  167. // NSIS_SUPPORT_REGISTRYFUNCTIONS enables support for ReadRegStr, ReadRegDWORD, WriteRegStr, etc etc etc.
  168. #define NSIS_SUPPORT_REGISTRYFUNCTIONS
  169.  
  170. // NSIS_SUPPORT_COPYFILES enables support for CopyFiles
  171. #define NSIS_SUPPORT_COPYFILES
  172.  
  173. // NSIS_SUPPORT_REBOOT enables support for Reboot, IfRebootFlag, SetRebootFlag
  174. #define NSIS_SUPPORT_REBOOT
  175.  
  176. // NSIS_SUPPORT_FNUTIL enables support for GetFullPathName, GetTempFileName, and SearchPath
  177. #define NSIS_SUPPORT_FNUTIL
  178.  
  179. // NSIS_SUPPORT_EXECUTE enables support for Exec and ExecWait
  180. #define NSIS_SUPPORT_EXECUTE
  181.  
  182. // NSIS_SUPPORT_SHELLEXECUTE enables support for ExecShell
  183. #define NSIS_SUPPORT_SHELLEXECUTE
  184.  
  185. // NSIS_SUPPORT_GETDLLVERSION enables support for GetDLLVersion
  186. #define NSIS_SUPPORT_GETDLLVERSION
  187.  
  188. // NSIS_SUPPORT_GETFILETIME enables support for GetFileTime
  189. #define NSIS_SUPPORT_GETFILETIME
  190.  
  191. // NSIS_SUPPORT_HWNDS enables support for FindWindow, SendMessage, and IsWindow
  192. #define NSIS_SUPPORT_HWNDS
  193.  
  194. // NSIS_SUPPORT_ENVIRONMENT enables support for ReadEnvStr and ExpandEnvStrings
  195. #define NSIS_SUPPORT_ENVIRONMENT
  196.  
  197. // NSIS_SUPPORT_RMDIR enables support for RMDir
  198. #define NSIS_SUPPORT_RMDIR
  199.  
  200. // NSIS_SUPPORT_FILE enables support for File (extracting files)
  201. #define NSIS_SUPPORT_FILE
  202.  
  203. // NSIS_SUPPORT_DELETE enables support for Delete (delete files)
  204. #define NSIS_SUPPORT_DELETE
  205.  
  206. // NSIS_SUPPORT_RENAME enables support for Rename (rename files)
  207. #define NSIS_SUPPORT_RENAME
  208.  
  209. // NSIS_SUPPORT_MESSAGEBOX enables support for MessageBox
  210. #define NSIS_SUPPORT_MESSAGEBOX
  211.  
  212. // Added by ramon 5 jun 2003
  213. // NSIS_SUPPORT_VERSION_INFO enables support for version information on final exe
  214. #define NSIS_SUPPORT_VERSION_INFO
  215.  
  216. // NSIS_FIX_DEFINES_IN_STRINGS fixes defines inside defines and handles chars $ perfectly
  217. // #define NSIS_FIX_DEFINES_IN_STRINGS
  218.  
  219. // NSIS_SUPPORT_STANDARD_PREDEFINES enables standard predefines in NSIS.
  220. // The defines enabled are:
  221. //   __FILE__ - current script name
  222. //   __LINE__ - current line number
  223. //   __DATE__ - date according to the current locale
  224. //   __TIME__ - time according to the current locale
  225. //   __TIMESTAMP__ - date & time according to the current locale
  226. #define NSIS_SUPPORT_STANDARD_PREDEFINES
  227.  
  228. #define NSIS_LOCKWINDOW_SUPPORT
  229.  
  230. // Added by Ximon Eighteen 5th August 2002
  231. // If this is uncommented the following changes/new features are
  232. // turned on :-
  233. //   - At the start of compilation a directory called dlls in
  234. //     the directory where makensis.exe is running from will be
  235. //     scanned for .dll files.
  236. //   - Any functions in the detected dll files that are exported
  237. //     by name will be remembered. These names are then legal
  238. //     command keywords in an NSIS script.
  239. //   - Any command that is unrecognised is checked against the
  240. //     list of external dll command names. If matched the dll will
  241. //     be packed into the installer.
  242. //   - On the installer machine (rather than the build machine)
  243. //     on first use of a command that requires a plugin dll that
  244. //     dll will be extracted to the temporary directory with a
  245. //     temporary file name.
  246. //   - Any parameters following the command will be pushed onto
  247. //     the stack in left to right order.
  248. //   - The command will then be invoked in the dll as if
  249. //     "CallInstDLL dll command" had been invoked.
  250. //   - When the installer exits any extracted temporary dlls will
  251. //     be deleted.
  252. #define NSIS_CONFIG_PLUGIN_SUPPORT
  253.  
  254. // fixes - do not edit past here
  255. #ifndef NSIS_CONFIG_VISIBLE_SUPPORT
  256.   #ifdef NSIS_CONFIG_LICENSEPAGE
  257.     #undef NSIS_CONFIG_LICENSEPAGE
  258.   #endif
  259.   #ifdef NSIS_CONFIG_COMPONENTPAGE
  260.     #undef NSIS_CONFIG_COMPONENTPAGE
  261.   #endif
  262.   #ifdef NSIS_SUPPORT_BGBG
  263.     #undef NSIS_SUPPORT_BGBG
  264.   #endif
  265.   #ifdef NSIS_CONFIG_ENHANCEDUI_SUPPORT
  266.     #undef NSIS_CONFIG_ENHANCEDUI_SUPPORT
  267.   #endif
  268. #endif
  269.  
  270. #ifdef NSIS_CONFIG_ENHANCEDUI_SUPPORT
  271.   #ifndef NSIS_SUPPORT_HWNDS
  272.     #define NSIS_SUPPORT_HWNDS
  273.   #endif
  274. #endif
  275.  
  276. #ifdef NSIS_CONFIG_LOG_ODS
  277.   #ifndef NSIS_CONFIG_LOG
  278.     #error NSIS_CONFIG_LOG_ODS relies on NSIS_CONFIG_LOG, but NSIS_CONFIG_LOG is not defined
  279.   #endif
  280. #endif
  281.  
  282. #if defined(NSIS_CONFIG_CRC_SUPPORT) && defined(NSIS_CONFIG_VISIBLE_SUPPORT)
  283.   #define _NSIS_CONFIG_VERIFYDIALOG
  284. #endif
  285.  
  286. #if defined(NSIS_CONFIG_UNINSTALL_SUPPORT) && defined(NSIS_CONFIG_VISIBLE_SUPPORT)
  287.   #define _NSIS_CONFIG_UNINSTDLG
  288. #endif
  289.  
  290. #if defined(NSIS_CONFIG_UNINSTALL_SUPPORT) && defined(NSIS_CONFIG_VISIBLE_SUPPORT)
  291.   #define _NSIS_CONFIG_UNINSTDLG
  292. #endif
  293.  
  294. #ifdef EXEHEAD
  295.   #ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
  296.     #ifndef NSIS_COMPRESS_USE_ZLIB
  297.       #ifndef NSIS_COMPRESS_USE_BZIP2
  298.         #ifndef NSIS_COMPRESS_USE_LZMA
  299.           #error compression is enabled but zlib, bzip2 and lzma are disabled.
  300.         #endif
  301.       #endif
  302.     #endif
  303.   #endif
  304.  
  305.   #ifdef NSIS_COMPRESS_USE_ZLIB
  306.     #ifdef NSIS_COMPRESS_USE_BZIP2
  307.       #error both zlib and bzip2 are enabled.
  308.     #endif
  309.     #ifdef NSIS_COMPRESS_USE_LZMA
  310.       #error both zlib and lzma are enabled.
  311.     #endif
  312.   #endif
  313.   #ifdef NSIS_COMPRESS_USE_BZIP2
  314.     #ifdef NSIS_COMPRESS_USE_LZMA
  315.       #error both bzip2 and lzma are enabled.
  316.     #endif
  317.   #endif
  318.  
  319.   #ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
  320.     #ifdef NSIS_COMPRESS_USE_ZLIB
  321.       #ifdef NSIS_ZLIB_COMPRESS_WHOLE
  322.         #define NSIS_COMPRESS_WHOLE
  323.       #endif
  324.     #endif
  325.  
  326.     #ifdef NSIS_COMPRESS_USE_BZIP2
  327.       #ifdef NSIS_BZIP2_COMPRESS_WHOLE
  328.         #define NSIS_COMPRESS_WHOLE
  329.       #endif
  330.     #endif
  331.  
  332.     #ifdef NSIS_COMPRESS_USE_LZMA
  333.       #ifdef NSIS_LZMA_COMPRESS_WHOLE
  334.         #define NSIS_COMPRESS_WHOLE
  335.       #endif
  336.     #endif
  337.  
  338.     #ifdef NSIS_COMPRESS_WHOLE
  339.       #ifdef NSIS_CONFIG_VISIBLE_SUPPORT
  340.         #ifndef _NSIS_CONFIG_VERIFYDIALOG
  341.           #define _NSIS_CONFIG_VERIFYDIALOG
  342.         #endif
  343.       #endif
  344.     #endif
  345.   #endif
  346. #endif // EXEHEAD
  347.  
  348. #ifdef NSIS_COMPRESS_WHOLE
  349.   #ifndef NSIS_CONFIG_COMPRESSION_SUPPORT
  350.     #error NSIS_COMPRESS_WHOLE defined, NSIS_CONFIG_COMPRESSION_SUPPORT not
  351.   #endif
  352. #endif
  353.  
  354. #ifdef NSIS_CONFIG_CRC_ANAL
  355.   #ifndef NSIS_CONFIG_CRC_SUPPORT
  356.     #error NSIS_CONFIG_CRC_ANAL defined but NSIS_CONFIG_CRC_SUPPORT not
  357.   #endif
  358. #endif
  359.  
  360. #ifndef NSIS_COMPRESS_BZIP2_LEVEL
  361.   #define NSIS_COMPRESS_BZIP2_LEVEL 9
  362. #endif
  363.  
  364. #ifdef NSIS_CONFIG_PLUGIN_SUPPORT
  365.   #ifndef NSIS_SUPPORT_RMDIR
  366.     #error NSIS_CONFIG_PLUGIN_SUPPORT relies on NSIS_SUPPORT_RMDIR, but NSIS_SUPPORT_RMDIR is not defined
  367.   #endif
  368.   #ifndef NSIS_SUPPORT_FILE
  369.     #error NSIS_CONFIG_PLUGIN_SUPPORT relies on NSIS_SUPPORT_FILE, but NSIS_SUPPORT_FILE is not defined
  370.   #endif
  371.   #ifndef NSIS_SUPPORT_ACTIVEXREG
  372.     #error NSIS_CONFIG_PLUGIN_SUPPORT relies on NSIS_SUPPORT_ACTIVEXREG, but NSIS_SUPPORT_ACTIVEXREG is not defined
  373.   #endif
  374.   #ifndef NSIS_SUPPORT_STACK
  375.     #error NSIS_CONFIG_PLUGIN_SUPPORT relies on NSIS_SUPPORT_STACK, but NSIS_SUPPORT_STACK is not defined
  376.   #endif
  377.   #ifndef NSIS_SUPPORT_FNUTIL
  378.     #error NSIS_CONFIG_PLUGIN_SUPPORT relies on NSIS_SUPPORT_FNUTIL, but NSIS_SUPPORT_FNUTIL is not defined
  379.   #endif
  380. #endif
  381.  
  382. #if NSIS_MAX_INST_TYPES > 32
  383.   #error NSIS_MAX_INST_TYPES > 32
  384. #endif
  385.  
  386. #ifndef NSIS_DEFAULT_LANG
  387.   #define NSIS_DEFAULT_LANG 1033
  388. #endif
  389.  
  390. #define VARS_SECTION_NAME ".ndata"
  391.  
  392. typedef char NSIS_STRING[NSIS_MAX_STRLEN];
  393.  
  394. #endif//!APSTUDIO_INVOKED
  395.  
  396. #endif // NSIS_CONFIG_H
  397.