aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-11-23 17:31:47 +0000
committerlloyd <[email protected]>2009-11-23 17:31:47 +0000
commit97e63a94db0e2252d2fcf8b221910a69396ebc13 (patch)
tree5ee2b5a2c83c2de7eb9a26b583d679063bc854a6 /src
parent2dd1b6bcf060ebdfadd9f040a72a2a13cb55e7cd (diff)
Use a little Pascal script (hey, my first Pascal program!) in InnoSetup
to conver the line endings of text files (.txt, .h) to Win32's CRLF.
Diffstat (limited to 'src')
-rw-r--r--src/build-data/innosetup.in26
1 files changed, 21 insertions, 5 deletions
diff --git a/src/build-data/innosetup.in b/src/build-data/innosetup.in
index 81482d53d..fa3a5e656 100644
--- a/src/build-data/innosetup.in
+++ b/src/build-data/innosetup.in
@@ -31,12 +31,28 @@ name: "docs"; Description: "Developer Documentation"; Types: devel
; License file is always included
Source: "..\botan.dll"; DestDir: "{app}"; Components: dll
Source: "..\botan.dll.manifest"; DestDir: "{app}"; Components: dll
-Source: "..\doc\license.txt"; DestDir: "{app}"; Components: dll
+Source: "..\doc\license.txt"; DestDir: "{app}"; Components: dll; AfterInstall: ConvertLineEndings
Source: "..\botan.exp"; DestDir: "{app}"; Components: implib
Source: "..\botan.lib"; DestDir: "{app}"; Components: implib
-Source: "include\botan\*"; DestDir: "{app}\include\botan"; Components: includes
-
-Source: "..\readme.txt"; DestDir: "{app}\doc"; Components: docs
-Source: "..\doc\log.txt"; DestDir: "{app}\doc"; Components: docs
+Source: "include\botan\*"; DestDir: "{app}\include\botan"; Components: includes; AfterInstall: ConvertLineEndings
+
+Source: "..\readme.txt"; DestDir: "{app}\doc"; Components: docs; AfterInstall: ConvertLineEndings
+Source: "..\doc\log.txt"; DestDir: "{app}\doc"; Components: docs; AfterInstall: ConvertLineEndings
+
+[Code]
+procedure ConvertLineEndings();
+ var
+ FileContents : String;
+ CR : String;
+ LF : String;
+ CRLF : String;
+begin
+ LF := #10;
+ CR := #13;
+ CRLF := CR + LF;
+ LoadStringFromFile(ExpandConstant(CurrentFileName), FileContents);
+ StringChangeEx(FileContents, LF, CRLF, False);
+ SaveStringToFile(ExpandConstant(CurrentFileName), FileContents, False);
+end;