; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

[Setup]
AppVerName=Lynx for Win32 Version 2.8.6rel.4TH
OutputBaseFilename=Lynx286rel4TH

#include "lynx-win32-pata_common.inc"

function ShouldSkipPage(PageID: Integer): Boolean; 
begin
    result := False;
    if PageID = SelectDCSPage.ID then
    begin
        CfgSrcName := ExpandConstant('{app}') + '\docs\lynx.cfg';
        CfgDstName := ExpandConstant('{app}') + '\lynx.cfg';
        if (FileExists(CfgDstName)) then result := True
    end
end;

procedure MyAfterInstall();
var
  CRLF: String;
begin
    if (FileCopy(CfgSrcName, CfgDstName, True)) then
    begin
        CRLF := Chr($D) + Chr($A);
        SaveStringToFile(CfgDstName, '# next line is appended in installation process' + CRLF, true);
        SaveStringToFile(CfgDstName, 'CHARACTER_SET:' + DCSComboBox.Items.Strings[DCSComboBox.ItemIndex] + CRLF, true);
    end;
end;
