From 3cd12811675e32b81b9e14a55898e2f4126a28e7 Mon Sep 17 00:00:00 2001 From: Kill Your TV Date: Tue, 4 Nov 2014 00:52:08 +0000 Subject: [PATCH] updates to innosetup script * support installation of both x64 and x86 binaries * add readme * add function to convert line endings. The README.md file currently has Windows line endings, but if that ever changes this function will automatically make the file "Windows friendly". --- Win32/inno_installer.iss | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/Win32/inno_installer.iss b/Win32/inno_installer.iss index 12d69b38..64ca2972 100644 --- a/Win32/inno_installer.iss +++ b/Win32/inno_installer.iss @@ -1,6 +1,6 @@ #define I2Pd_AppName "i2pd" -#define I2Pd_ver "0.1" +#define I2Pd_ver "0.2" [Setup] AppName={#I2Pd_AppName} @@ -13,12 +13,17 @@ SolidCompression=yes OutputDir=. LicenseFile=.\..\LICENSE OutputBaseFilename=setup_{#I2Pd_AppName}_v{#I2Pd_ver} +ArchitecturesInstallIn64BitMode=x64 + [Files] -Source: "i2pd.exe"; DestDir: "{app}" +Source: "x64\Release\i2pd.exe"; DestDir: "{app}"; DestName: "i2pd.exe"; Check: Is64BitInstallMode +Source: "Release\i2pd.exe"; DestDir: "{app}"; Check: not Is64BitInstallMode +Source: "..\README.md"; DestDir: "{app}"; DestName: "Readme.txt"; AfterInstall: ConvertLineEndings [Icons] Name: "{group}\I2Pd"; Filename: "{app}\i2pd.exe" +Name: "{group}\Readme"; Filename: "{app}\Readme.txt" [Code] @@ -34,6 +39,20 @@ var const LicenseHeight = 400; + LF = #10; + CR = #13; + CRLF = CR + LF; + +procedure ConvertLineEndings(); + var + FilePath : String; + FileContents : String; +begin + FilePath := ExpandConstant(CurrentFileName) + LoadStringFromFile(FilePath, FileContents); + StringChangeEx(FileContents, LF, CRLF, False); + SaveStringToFile(FilePath, FileContents, False); +end; procedure InitializeWizard(); begin