【1】在需要打包的文件中,新建一个文本文件,如License.txt
注意:中文的编码格式需要GB2312,否则显示乱码
【2】读取、显示文本
[Code]
procedure Init_ShowLicense();
var
tmpFont:TFont;
begin
editLicense := TMemo.Create(WizardForm);
with editLicense do
begin
Parent:= WizardForm;
Text := '';
Font.Size:= 10
Font.Color:=$555555
Left:= DpiScale(132);
Top := DpiScale(99);
Width:= DpiScale(311);
Height:= DpiScale(290);
TabStop := false;
edtLicense.Lines.LoadFromFile(ExpandConstant('{tmp}\License.txt'));
end;
注意:在此之前需要在InitializeWizard中调用
ExtractTemporaryFile('License.txt')
来解压此文件到安装运行时的临时目录。