SetFileTypeEOL
Previous Topic  Next Topic 

::InstallAPI::SetFileTypeEOL


The the end-of-line character for a given filetype that is to be used when files of that type are installed.  This API modifies the behavior of the installer such that each file that matches a given file type will be installed with the specified EOL characters instead of the platform default.  This is useful for translating EOL characters from Windows to UNIX or vice-versa when installing files.



Supported Platforms

All



Returns

Empy string


Options


-eol <eol>

The EOL string to use.  Can be: auto, binary, crlf, lf, unix or windows.  In most cases, this value must be a list of two EOL characters: the character the file is currently using and the character to translate to.


-extension <file extension>

A file extension or a list of file extensions separated by ; that are to be translated with the given EOL.



Example:


This would translate all .txt files that are installed from a Windows (CRLF) EOL to unix (LF) EOL.  This assumes that the .txt files stored in your installer already have the Windows EOL.


::InstallAPI::SetFileTypeEOL -eol {windows unix} -extension .txt


This would translate all .ini files that are installed from a unix (LF) EOL to a Windows (CRLF) EOL.


::InstallAPI::SetFileTypeEOL -eol {unix windows} -extension .ini