冒险解谜游戏中文网 ChinaAVG

标题: [任务10]安装脚本的制作 [打印本页]

作者: firendless    时间: 2009-3-23 14:02
标题: [任务10]安装脚本的制作
下载了一个月光奏鸣曲的安装包,解包后得到INNO脚本,贴上来,或许有用
+ l  j2 B6 f! S) }9 b' d4 x# `& z, {+ m' R
在发一个私人用的脚本; c2 }% [# {$ ?2 e% w0 N" W; B
  1. ; 脚本由 Inno Setup 脚本向导 生成!
  2. ; 有关创建 Inno Setup 脚本文件的详细资料请查阅帮助文档!
  3. [Setup]
  4. ; 注意: AppId 值用于唯一识别该应用程序。
  5. ; 禁止对其他应用程序的安装器使用相同的 AppId 值!
  6. ; (若要生成一个新的 GUID,请选择“工具 | 生成 GUID”。)
  7. AppId={{E197DE61-1EFE-4468-97C5-167416ACB14E}
  8. AppName=电脑锁定助手
  9. AppVerName=电脑锁定助手 2.2.0.0
  10. AppPublisher=花好月圆[[url]www.promiseforever.com[/url]]
  11. AppPublisherURL=http://www.promiseforever.com/
  12. AppSupportURL=http://www.promiseforever.com/
  13. AppUpdatesURL=http://www.promiseforever.com/
  14. DefaultDirName={pf}\电脑锁定助手
  15. DefaultGroupName=电脑锁定助手
  16. AllowNoIcons=yes
  17. LicenseFile=C:\电脑锁定助手\Docs\license.txt
  18. InfoBeforeFile=C:\电脑锁定助手\Docs\history.txt
  19. InfoAfterFile=C:\电脑锁定助手\Docs\tips.txt
  20. OutputBaseFilename=PcLocker-Setup
  21. SetupIconFile=C:\电脑锁定助手\图标.ico
  22. UninstallDisplayName=电脑锁定助手
  23. UninstallDisplayIcon=C:\电脑锁定助手\卸载.ico
  24. WizardImageFile=C:\电脑锁定助手\b.bmp
  25. WizardSmallImageFile=C:\电脑锁定助手\s.bmp
  26. Compression=lzma
  27. SolidCompression=yes
  28. VersionInfoCompany=http://www.promiseforever.com
  29. VersionInfoDescription=电脑锁定助手安装程序
  30. VersionInfoVersion=2.2.0.0
  31. VersionInfoCopyright=Copyright (C)2009-2012 花好月圆
  32. VersionInfoProductName=电脑锁定助手
  33. VersionInfoProductVersion=2.2.0.0
  34. VersionInfoTextVersion=2.2.0.0
  35. [Languages]
  36. Name: "chinese"; MessagesFile: "compiler:Default.isl"
  37. [Tasks]
  38. Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
  39. Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
  40. [Files]
  41. Source: "C:\电脑锁定助手\电脑锁定助手.EXE"; DestDir: "{app}"; Flags: ignoreversion
  42. Source: "C:\电脑锁定助手\设置工具.EXE"; DestDir: "{app}"; Flags: ignoreversion
  43. Source: "C:\电脑锁定助手\Data\MSVBVM60.DLL"; DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: restartreplace sharedfile regserver
  44. Source: "C:\电脑锁定助手\Data\STDOLE2.TLB"; DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: restartreplace sharedfile
  45. Source: "C:\电脑锁定助手\Data\secur32.dll"; DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: restartreplace sharedfile
  46. Source: "C:\电脑锁定助手\Data\wshom.ocx"; DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: restartreplace sharedfile
  47. [Icons]
  48. Name: "{group}\电脑锁定助手"; Filename: "{app}\电脑锁定助手.EXE"
  49. Name: "{group}\{cm:ProgramOnTheWeb,电脑锁定助手}"; Filename: "http://www.promiseforever.com/";IconFilename: "C:\电脑锁定助手\网址.ico"
  50. Name: "{group}\{cm:UninstallProgram,电脑锁定助手}"; Filename: "{uninstallexe}";IconFilename: "C:\电脑锁定助手\卸载.ico"
  51. Name: "{commondesktop}\电脑锁定助手"; Filename: "{app}\电脑锁定助手.EXE"; Tasks: desktopicon
  52. Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\电脑锁定助手"; Filename: "{app}\电脑锁定助手.EXE"; Tasks: quicklaunchicon
  53. [Messages]
  54. BeveledLabel= 电脑锁定助手 2.2.0.0 制作:花好月圆
  55. ;卸载对话框说明
  56. ConfirmUninstall=您真的想要从电脑中卸载 电脑锁定助手 吗?%n%n卸载后,你将无法在使用本软件锁定电脑。%n%n按 [是] 则完全删除 %1 以及它的所有组件; %n按 [否]则让软件继续留在您的电脑上.
  57. [Run]
  58. Filename: "{app}\电脑锁定助手.EXE"; Description: "{cm:LaunchProgram,电脑锁定助手}"; Flags: nowait postinstall skipifsilent
  59. Filename: "http://www.promiseforever.com"; Description: "访问作者网站"; Flags: postinstall shellexec skipifsilent
  60. [Code]
  61. procedure AboutButtonOnClick(Sender: TObject);
  62. begin
  63. MsgBox('更多信息,请访问我的网站。', mbInformation, mb_Ok);
  64. end;
  65. procedure URLLabelOnClick(Sender: TObject);
  66. var
  67. ErrorCode: Integer;
  68. begin
  69. ShellExec('open', 'http://www.promiseforever.com', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
  70. end;
  71. procedure InitializeWizard();
  72. var
  73. AboutButton, CancelButton: TButton;
  74. URLLabel: TNewStaticText;
  75. BackgroundBitmapImage: TBitmapImage;
  76. BackgroundBitmapText: TNewStaticText;
  77. LabelDate:Tlabel;
  78. begin
  79. CancelButton := WizardForm.CancelButton;
  80. AboutButton := TButton.Create(WizardForm);
  81. AboutButton.Left := WizardForm.ClientWidth - CancelButton.Left - CancelButton.Width;
  82. AboutButton.Top := CancelButton.Top;
  83. AboutButton.Width := CancelButton.Width;
  84. AboutButton.Height := CancelButton.Height;
  85. AboutButton.Caption := '关于';
  86. AboutButton.OnClick := @AboutButtonOnClick;
  87. AboutButton.Parent := WizardForm;
  88. URLLabel := TNewStaticText.Create(WizardForm);
  89. URLLabel.Caption := '访问 作者网站';
  90. URLLabel.Cursor := crHand;
  91. URLLabel.OnClick := @URLLabelOnClick;
  92. URLLabel.Parent := WizardForm;
  93. URLLabel.Font.Style := URLLabel.Font.Style + [fsUnderline];
  94. URLLabel.Font.Color := clBlue;
  95. URLLabel.Top := AboutButton.Top + AboutButton.Height - URLLabel.Height - 2;
  96. URLLabel.Left := AboutButton.Left + AboutButton.Width + ScaleX(20);
  97. WizardForm.WelcomeLabel2.Height:=100
  98. WizardForm.PAGENAMELABEL.Font.Color:= clRed;
  99. WizardForm.PAGEDESCRIPTIONLABEL.Font.Color:= clBlack;
  100. WizardForm.WELCOMELABEL1.Font.Color:= clBlack;
  101. WizardForm.WELCOMELABEL2.Font.Color:= clOlive;
  102. LabelDate:=Tlabel.Create(WizardForm)
  103. LabelDate.Caption:='欢迎使用电脑锁定助手绿色安装包'#10#13' '#10#13'软件对系统绝无副作用'#10#13' '#10#13'所有安装文件在卸载时都可清除'#10#13' '#10#13'如要获取其他信息欢迎访问我的网站'#10#13' '#10#13'PromiseForever.Com';
  104. LabelDate.Left:=WizardForm.WelcomeLabel2.Left;
  105. LabelDate.Top:= WizardForm.WelcomeLabel2.Top + WizardForm.WelcomeLabel2.Height+10;
  106. LabelDate.Parent := WizardForm.WelcomePage;
  107. end;
复制代码





欢迎光临 冒险解谜游戏中文网 ChinaAVG (https://chinaavg.com/) Powered by Discuz! X3.2