Inno Setup制作安装包范例

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
end;
end;
界面
பைடு நூலகம்
Inno Setup制作安装包范例
INNOSETUP制作软件安装包的范例,程序的版本是5.2.3
[Setup]
AppId={{26714394-7EF5-4068-B5D9-5F34D6E772E2}
AppName=Inno Setup5.2.3
AppVerName=Inno Setup5.2.3
[Code]
{关于按钮单击后执行的过程
注意:一定要写在InitializeWizard()过程之前}
procedure ButtonAboutOnClick(Sender: TObject);
begin
MsgBox('Inno Setup5.2.3纯净版。'+#13#10+' xiaofeng制作', mbInformation, MB_OK);//显示对话框
DefaultDirName={pf}\Inno Setup5.2.3
DefaultGroupName=Inno Setup5.2.3
AllowNoIcons=yes
LicenseFile=C:\Program Files\Inno Setup 5.2.3\license.txt
InfoBeforeFile=C:\Program Files\Inno Setup 5.2.3\汉化说明.txt
Source: "C:\Program Files\Inno Setup 5.2.3\Setup.e32"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Program Files\Inno Setup 5.2.3\SetupLdr.e32"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Program Files\Inno Setup 5.2.3\whatsnew.htm"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Program Files\Inno Setup 5.2.3\WizModernImage.bmp"; DestDir: "{app}"; Flags: ignoreversion
[Icons]
Name: "{group}\Inno Setup5.2.3"; Filename: "{app}\Compil32.exe"
Name: "{group}\{cm:UninstallProgram,Inno Setup5.2.3}"; Filename: "{uninstallexe}"
[Registry]
;设置图标
;注册文件类型
Root: HKCR; Subkey: ".iss"; ValueType: String; ValueData: "InnoSetupScriptFile"; Flags: uninsdeletekey
;设置双击时用什么程序打开
Root: HKCR; Subkey: "InnoSetupScriptFile\shell\open\command"; ValueType: String; ValueData: "{app}\Compil32.exe %1"; Flags:uninsdeletekey
;设置右键菜单项
Root: HKCR; Subkey: "InnoSetupScriptFile\shell\用 InnoSetup 打开(&O)\command"; ValueType: String; ValueData: "{app}\Compil32.exe %1"; Flags: uninsdeletekey
Source: "C:\Program Files\Inno Setup 5.2.3\汉化说明.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Program Files\Inno Setup 5.2.3\Compil32.exe"; DestDir: "{app}"; Flags: ignoreversion
AppPublisher=xiaofeng'studio
AppPublisherURL=/talent21
AppSupportURL=/talent21
AppUpdatesURL=/talent21
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
Source: "C:\Program Files\Inno Setup 5.2.3\Compil32.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Program Files\Inno Setup 5.2.3\ISCmplr.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Program Files\Inno Setup 5.2.3\ISCrypt.dll"; DestDir: "{app}"; Flags: ignoreversion
Name: "{commondesktop}\Inno Setup5.2.3"; Filename: "{app}\Compil32.exe"; Tasks: desktopicon
[Run]
Filename: "{app}\Compil32.exe"; Description: "{cm:LaunchProgram,Inno Setup5.2.3}"; Flags: nowait postinstall skipifsilent
Source: "C:\Program Files\Inno Setup 5.2.3\WizModernImage-IS.bmp"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Program Files\Inno Setup 5.2.3\WizModernSmallImage.bmp"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Program Files\Inno Setup 5.2.3\ISetup.chm"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Program Files\Inno Setup 5.2.3\isfaq.htm"; DestDir: "{app}"; Flags: ignoreversion
end;
{初始化安装向导时会触发的过程,这个过程的名字是INNO内部定义的,不能修改}
procedure InitializeWizard();
begin
with TButton.Create(WizardForm) do//在WizardForm上面创建一个按钮
begin
Left := 25;//按钮距WizardForm左边的距离
Top := 300;//按钮距WizardForm上边的距离
Width := WizardForm.CancelButton.Width;//按钮的宽度,这里定义跟'取消'按钮等宽
Height := WizardForm.CancelButton.Height;//按钮的高度
Caption := '关于(&A)...';//按钮上的文字
Source: "C:\Program Files\Inno Setup 5.2.3\iszlib.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Program Files\Inno Setup 5.2.3\license.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Program Files\Inno Setup 5.2.3\islzma.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Program Files\Inno Setup 5.2.3\isunzlib.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Program Files\Inno Setup 5.2.3\Languages\*"; DestDir: "{app}\Languages"; Flags: ignoreversion recursesubdirs createallsubdirs
; 注意: 不要在任何共享系统文件上使用“Flags: ignoreversion”
Source: "C:\Program Files\Inno Setup 5.2.3\WizModernSmallImage-IS.bmp"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Program Files\Inno Setup 5.2.3\Examples\*"; DestDir: "{app}\Examples"; Flags: ignoreversion recursesubdirs createallsubdirs
:='宋体';//按钮文字的字体
Font.Size:=9;//9号字体
OnClick := @ButtonAboutOnClick;//单击按钮触发的过程,就是前面的'ButtonAboutOnClick'过程,注意前面不要漏掉'@'
Parent := WizardForm;//按钮的父组件,也就是按钮'载体',这里是WizardForm(安装向导窗体)
OutputDir=C:\Documents and Settings\xiaofeng\桌面
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes
VersionInfoVersion=5.2.3
[Languages]
Name: "chinese"; MessagesFile: "compiler:Default.isl"
Source: "C:\Program Files\Inno Setup 5.2.3\Default.isl"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Program Files\Inno Setup 5.2.3\isbunzip.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Program Files\Inno Setup 5.2.3\isbzip.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Program Files\Inno Setup 5.2.3\ISCC.exe"; DestDir: "{app}"; Flags: ignoreversion
相关文档
最新文档