几乎完全不懂pascal脚本,只是看过这种安装脚本,搞了三天才搞好,各种测试,各种改,终于做出了一个比较完整的安装包。
要说,还是有很多改进的地方,比如没有使用procedure,inno setup可以依照勾选项进行不同的安装步骤,安装完之后可以也可以进行相应的操作,可定制各种安装方式,
以下是我的安装脚本:
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "appname"
#define MyAppNameEn "appname english"
#define MyAppVersion "2.0.0.0"
#define MyAppPublisher "publisher name, Inc."
#define MyAppExeName "eTMS.exe"
#define MyAppLoggingName "系统登陆"
#define MyAppLoggedName "windows logged name"
#define RegGridPPBatName "注册控件.bat"
#define RegGridPPName "注册控件"
#define DebugSourcePath "..\Main\bin\x86\Debug"
#define ReleaseSourcePath "..\Main\bin\x86\Release"
[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={
{A6A7578-84EC-4006-8226-C87D71FB94}
AppName=" {#MyAppName} [{#MyAppVersion}] "
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
DefaultDirName={pf}\{#MyAppNameEn}
DefaultGroupName=物流云平台
DisableProgramGroupPage=yes
LicenseFile=..\Doc\agreement_chs.txt
InfoBeforeFile=..\Doc\agreement_chs.txt
InfoAfterFile=..\Doc\Readme.txt
OutputDir=..\setup
OutputBaseFilename="{#MyAppName}{#MyAppVersion}"
Compression=lzma
SolidCompression=yes
[Languages]
; 默认安装包打包出来是英文版,并且没有中文视图,需要自己添加
Name: "Chinese"; MessagesFile: "compiler:Languages/Chinese.isl"
[Tasks]