Browse Source

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".
pull/108/head
Kill Your TV 10 years ago
parent
commit
3cd1281167
  1. 23
      Win32/inno_installer.iss

23
Win32/inno_installer.iss

@ -1,6 +1,6 @@ @@ -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 @@ -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 @@ -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

Loading…
Cancel
Save