此脚本在Windows 7 64位环境下进行过测试。
-
[Setup]
-
;要打包的文件的源路径。次路径后面可以不带反斜杠(\)
-
SourceDir="The Directory Of Files To Be Packed"
-
-
;程序名称
-
AppName=Application Name
-
AppVersion=1.0
-
AppPublisher=Your Company Name
-
AppId=Application ID
-
DefaultDirName={pf}\Application Installation Directory Name
-
DefaultGroupName=Application Name
-
-
;使用整体压缩
-
Compression=lzma2
-
SolidCompression=yes
-
-
;生成的安装文件的图标。此图标的路径相对于SourceDir的值
-
SetupIconFile="Installer Icon.ico"
-
-
;卸载程序相关信息
-
Uninstallable=yes
-
UninstallDisplayIcon="{app}\Uninstaller Icon.ico"
-
UninstallDisplayName="Uninstall Application Name"
-
-
;打包后生成的安装程序的路径
-
Output=yes
-
OutputBaseFilename=The Setup Application Name To Be Generated
-
;将打包后的安装文件生成到桌面
-
OutputDir="userdocs:..\Desktop"
-
-
[Files]
-
;源所使用的路径为[Setup]中定义的SourceDir的值,递归拷贝所有文件(不包含空文件夹)。
-
Source: "*"; DestDir: "{app}"; Flags: recursesubdirs
-
-
[Dirs]
-
;安装程序时创建的文件夹
-
Name: "{app}\Temp\Whatever You Want"
-
-
[Icons]
-
;桌面快捷方式
-
Name: "{commondesktop}\Application Name"; Filename: "{app}\The Real Executable Application Name.exe"; WorkingDir: "{app}"; IconFilename: "{app}\Application Icon.ico"
-
-
;开始菜单目录
-
Name: "{userstartmenu}\Application Name\Application Desktop Shortcut Name"; Filename: "{app}\The Real Executable Application Name.exe"; WorkingDir: "{app}"; IconFilename: "{app}\Application Icon.ico"
-
Name: "{userstartmenu}\Application Name\Uninstaller Shortcut Name"; Filename: "{app}\unins000.exe"; WorkingDir: "{app}"; IconFilename: "{app}\Uninstaller Icon.ico"
-
-
[UninstallDelete]
-
;卸载时删除程序的安装路径和开始菜单等
-
Type: filesandordirs; Name: "{app}"
-
Type: filesandordirs; Name: "{userstartmenu}\Application Name\*"
-
Type: dirifempty; Name: "{userstartmenu}\Application Name"
-
-
[Languages]
-
Name: "ChineseSimplified"; MessagesFile: "compiler:Languages\ChineseSimplified.isl"
-
-
[LangOptions]
-
DialogFontSize=9
-
WelcomeFontSize=12
-
TitleFontSize=29
-
CopyrightFontSize=9
-
RightToLeft=no
除以上脚本之外还有一个中文语言文件,否则生成的安装程序的界面是英文的。
将此文件放在Inno Setup安装目录下的Languages文件夹中即可
ChineseSimplified.zip
阅读(2632) | 评论(0) | 转发(0) |