Innosetup5打包exe代码

本文详细解释了如何使用InnoSetupScriptWizard生成一个应用程序的安装脚本,包括定义应用名称、版本、发布者等信息,以及文件复制、图标设置和启动程序等安装过程关键步骤。
摘要由CSDN通过智能技术生成

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

#define MyAppName "WITIAI_ASR"
#define MyAppVersion "1.5"
#define MyAppPublisher "WITIAI.CN版权所有"
#define MyAppURL "http://witiai.cn/"
#define MyAppExeName "WITIAI_ASR.exe"

[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{47689375-C6ED-41E2-AD05-0F3332CC61F5}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName=C:\{#MyAppName}
DefaultGroupName={#MyAppName}
OutputDir=D:\2-LearningCode\902-ASR\WITIAI_ASR\Innosetup
OutputBaseFilename=WITIAI_ASR
SetupIconFile=D:\2-LearningCode\902-ASR\WITIAI_ASR\WITIAI_ASR\bin\x64\Release\WITIAI.ico
Compression=lzma
SolidCompression=yes
UninstallDisplayIcon="{app}\WITIAI.ico"

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: checkablealone
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1

[Code]
var
  myLabel: TNewStaticText;

procedure InitializeWizard();
begin
  WizardForm.FilenameLabel.Visible := false;
  MyLabel := TNewStaticText.Create(WizardForm.InstallingPage);
  MyLabel.Parent := WizardForm.InstallingPage;
  MyLabel.Top := WizardForm.FilenameLabel.Top;
  MyLabel.Left := WizardForm.FilenameLabel.Left;
  MyLabel.Width := WizardForm.FilenameLabel.Width;
  MyLabel.Visible := True;
  MyLabel.Caption := '';
end;

procedure DisplayFileName();
begin
  MyLabel.Caption := ExtractFileName(CurrentFileName);
end;

[Files]
Source: "D:\2-LearningCode\902-ASR\WITIAI_ASR\WITIAI_ASR\bin\x64\Release\WITIAI_ASR.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\2-LearningCode\902-ASR\WITIAI_ASR\WITIAI_ASR\bin\x64\Release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}";IconFilename:"{app}\WITIAI.ico"
Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon;IconFilename:"{app}\WITIAI.ico"
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon

[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, "&", "&&")}}"; Flags: nowait postinstall skipifsilent

  • 13
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值