本文主要是介绍Inno Setup 深入浅出-文件的显示,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
【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')
来解压此文件到安装运行时的临时目录。
这篇关于Inno Setup 深入浅出-文件的显示的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!