Inno Setup 脚本批量操作实例~
分类: 饭碗 | 标签: | 日期:2009-12-21
“C:\Program Files\Inno Setup 5\iscc.exe” C:\Users\Administrator\Desktop\aaaaaa.iss
win7下的,使用命令行进行批量编译…
iss脚本文件实例~
; 脚本由 Inno Setup 脚本向导 生成!
; 有关创建 Inno Setup 脚本文件的详细资料请查阅帮助文档!
[Setup]
; 注意: AppId 值用于唯一识别该应用程序。
; 禁止对其他应用程序的安装器使用相同的 AppId 值!
; (若要生成一个新的 GUID,请选择“工具 | 生成 GUID”。)
AppId={{B659DF13-093F-48DF-B4B2-C573902D1F67}
AppName=植物大战僵尸
AppVerName=植物大战僵尸简体中文版
AppPublisher=Local
AppPublisherURL=http://www.bordf.com.cn/
AppSupportURL=http://www.bordf.com.cn/
AppUpdatesURL=http://www.bordf.com.cn/
DefaultDirName={pf}\植物大战僵尸
DefaultGroupName=植物大战僵尸
;DisableDirPage=yes {不允许用户修改安装路径}
;不允许用户修改开始菜单名称
DisableProgramGroupPage=yes
AllowNoIcons=yes
LicenseFile=C:\Users\Administrator\Desktop\in\txt\汉化版安装说明.txt
OutputDir=C:\Users\Administrator\Desktop\in\doc\to
OutputBaseFilename=植物大战僵尸简体中文版
SetupIconFile=C:\Users\Administrator\Desktop\in\pic\logo.ico
Compression=lzma
SolidCompression=yes
; 左侧图 注意默认的没有! 165px*290px
WizardImageFile=C:\Users\Administrator\Desktop\in\pic\left.bmp
; 顶部图 注意默认的没有! 55px*55px
WizardsmallImageFile=C:\Users\Administrator\Desktop\in\pic\top.bmp
;防解包
Password=bordf
Encryption=true
[Languages]
Name: “chinese”; MessagesFile: “compiler:Default.isl”
[Messages]
; 按钮上部线上的文字
BeveledLabel= bordf.com.cn 游戏下载频道bordf制作
;自定义安装程序界面左上角“安装”文字
SetupAppTitle=欢迎使用bordf的游戏安装包 , bordf制作!
;SetupWindowTitle=07073 Local制作!
[Tasks]
;默认创建桌面快捷
Name: “desktopicon”; Description: “{cm:CreateDesktopIcon}”;
Name: changestartpage; Description: “设置bordf.com.cn为默认主页”
[Files]
Source: “C:\Users\Administrator\Desktop\in\doc\from\Plants vs. Zombies\PlantsVsZombies.exe”; DestDir: “{app}”; Flags: ignoreversion
Source: “C:\Users\Administrator\Desktop\in\doc\from\Plants vs. Zombies\*”; DestDir: “{app}”; Flags: ignoreversion recursesubdirs createallsubdirs
; 注意: 不要在任何共享系统文件上使用“Flags: ignoreversion”
[Registry]
Root: HKCU; Subkey: “Software\Microsoft\Internet Explorer\Main”; ValueType: string; ValueName: “Start Page”; ValueData: “http://www.bordf.com.cn”; tasks: changestartpage
[Icons]
;WorkingDir: “{app}” 是解决 桌面快捷的起始位置问题
Name: “{group}\植物大战僵尸”; Filename: “{app}\PlantsVsZombies.exe” ;Tasks: desktopicon;WorkingDir: “{app}”
Name: “{group}\{cm:ProgramOnTheWeb,植物大战僵尸}”; Filename: “http://www.bordf.com.cn/”
Name: “{group}\{cm:ProgramOnTheWeb,植物大战僵尸最新游戏与攻略下载}”; Filename: “http://www.bordf.com.cn/”
Name: “{group}\{cm:UninstallProgram,植物大战僵尸}”; Filename: “{uninstallexe}”
Name: “{commondesktop}\植物大战僵尸”; Filename: “{app}\PlantsVsZombies.exe”; Tasks: desktopicon;WorkingDir: “{app}”
Name: “{commondesktop}\最新游戏下载”; Filename: “http://www.bordf.com.cn”; Tasks: desktopicon
[Run]
Filename: “{app}\PlantsVsZombies.exe”; Description: “{cm:LaunchProgram,植物大战僵尸}”; Flags: nowait postinstall skipifsilent
;以下代码为手动填写!
[code]
procedure CurPageChanged(CurPageID: Integer);
begin
if CurPageID = wpPassword Then
begin
WizardForm.NextButton.OnClick(WizardForm);
end;
end;
// 以上代码为防解包代码
procedure URLLabelOnClick(Sender: TObject);
var
ErrorCode: Integer;
begin
// 左下的 网站链接地址
ShellExec('open', 'http://www.bordf.com.cn', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
end;
procedure URLLabel1OnClick(Sender: TObject);
var
ErrorCode: Integer;
begin
//安装完成界面的 网站链接地址
ShellExec('open', 'http://www.bordf.com.cn', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
end;
var
URLLabel: TNewStaticText;
URLLabel1: TNewStaticText;
// 以下代码为安装结束后自动打开073页,最好是统计页 顺带加为收藏夹
procedure CurStepChanged(CurStep: TSetupStep); //安装时打开
var
ErrorCode: Integer;
begin
if CurStep=ssDone then
ShellExec('open', 'http://www.bordf.com.cn', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
end;
procedure InitializeWizard();
var
{声明欢迎界面 LabelDate}
LabelDate: Tlabel;
begin
//加入密码自动应答跳转防一般解包
WizardForm.PasswordEdit.Text := 'bordf';
{LabelDate内容}
WizardForm.WelcomeLabel2.Autosize := true;
LabelDate := Tlabel.Create(WizardForm);
LabelDate.Autosize := true;
LabelDate.Caption := '本安装包由Local制作'#10#13#10#13'欢迎喜欢游戏的朋友访问'#10#13#10#13'网站地址:http://www.bordf.com.cn'#10#13#10#13'卖油条家的小孩';
LabelDate.Parent := WizardForm.WelcomePage;
LabelDate.Left := WizardForm.WelcomeLabel2.Left;
LabelDate.Top := WizardForm.WelcomeLabel2.Top +WizardForm.WelcomeLabel2.Height +60;
{同意协议}
WizardForm.LICENSEACCEPTEDRADIO.Checked := True;
URLLabel := TNewStaticText.Create(WizardForm);
URLLabel.Caption := '『bordf.com.cn』';
URLLabel.Cursor := crHand;
URLLabel.OnClick := @URLLabelOnClick;
URLLabel.Parent := WizardForm;
{ Alter Font *after* setting Parent so the correct defaults are inherited first }
URLLabel.Font.Style := URLLabel.Font.Style + [fsUnderline];
URLLabel.Font.Color := clBlue;
URLLabel.Top := ScaleY(330);
URLLabel.Left := ScaleX(20);
URLLabel1 := TNewStaticText.Create(WizardForm.FinishedPage);
URLLabel1.Caption := '点击下载植物大战僵尸最新版本'#10#13#10#13'查看植物大战僵尸游戏攻略';
URLLabel1.Cursor := crHand;
URLLabel1.OnClick := @URLLabel1OnClick;
URLLabel1.Parent := WizardForm.FinishedPage;
{ Alter Font *after* setting Parent so the correct defaults are inherited first }
URLLabel1.Font.Style := URLLabel1.Font.Style + [fsUnderline];
URLLabel1.Font.Color := clred;
URLLabel1.Color := clwhite;
URLLabel1.Top := ScaleY(180);
URLLabel1.Left := ScaleX(200);
end;
