Setup.ScriptClasses.pas 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494
  1. unit Setup.ScriptClasses;
  2. {
  3. Inno Setup
  4. Copyright (C) 1997-2025 Jordan Russell
  5. Portions by Martijn Laan
  6. For conditions of distribution and use, see LICENSE.TXT.
  7. Script support classes (run time)
  8. }
  9. interface
  10. uses
  11. uPSRuntime;
  12. function ScriptClassesLibraryRegister_R(ScriptInterpreter: TPSExec): TPSRuntimeClassImporter;
  13. procedure ScriptClassesLibraryUpdateVars(ScriptInterpreter: TIFPSExec);
  14. implementation
  15. uses
  16. Windows, Controls, Forms, StdCtrls, Graphics, Imaging.pngimage,
  17. uPSR_std, uPSR_classes, uPSR_graphics, uPSR_controls, uPSR_forms,
  18. uPSR_stdctrls, uPSR_extctrls, uPSR_comobj,
  19. NewStaticText, NewCheckListBox, NewProgressBar, RichEditViewer,
  20. ExtCtrls, UIStateForm, Setup.SetupForm, Setup.MainForm, Setup.WizardForm, Shared.SetupTypes, PasswordEdit,
  21. FolderTreeView, BitmapButton, BitmapImage, NewNotebook, Setup.ScriptDlg, BidiCtrls,
  22. Setup.UninstallProgressForm;
  23. type
  24. TWinControlAccess = class(TWinControl);
  25. procedure TWinControlParentBackground_R(Self: TWinControl; var T: Boolean); begin T := TWinControlAccess(Self).ParentBackground; end;
  26. procedure TWinControlParentBackground_W(Self: TWinControl; const T: Boolean); begin TWinControlAccess(Self).ParentBackground := T; end;
  27. procedure RegisterWinControl_R(Cl: TPSRuntimeClassImporter);
  28. begin
  29. RIRegisterTWinControl(Cl);
  30. with Cl.FindClass(AnsiString(TWinControl.ClassName)) do
  31. begin
  32. RegisterPropertyHelper(@TWinControlParentBackground_R, @TWinControlParentBackground_W, 'ParentBackground');
  33. end;
  34. end;
  35. procedure TPngImageCanvas_R(Self: TPngImage; var T: TCanvas); begin T := Self.Canvas; end;
  36. procedure RegisterPngImage_R(Cl: TPSRuntimeClassImporter);
  37. begin
  38. with Cl.Add(TPngImage) do
  39. begin
  40. RegisterMethod(@TPngImage.LoadFromStream, 'LoadFromStream');
  41. RegisterMethod(@TPngImage.SaveToStream, 'SaveToStream');
  42. RegisterPropertyHelper(@TPngImageCanvas_R,nil,'Canvas');
  43. end;
  44. end;
  45. procedure RegisterNewStaticText_R(Cl: TPSRuntimeClassImporter);
  46. begin
  47. with Cl.Add(TNewStaticText) do
  48. begin
  49. RegisterMethod(@TNewStaticText.AdjustHeight, 'AdjustHeight');
  50. end;
  51. end;
  52. procedure TNewCheckListBoxChecked_R(Self: TNewCheckListBox; var T: Boolean; t1: Integer); begin T := Self.Checked[t1]; end;
  53. procedure TNewCheckListBoxChecked_W(Self: TNewCheckListBox; const T: Boolean; t1: Integer); begin Self.Checked[t1] := T; end;
  54. procedure TNewCheckListBoxState_R(Self: TNewCheckListBox; var T: TCheckBoxState; t1: Integer); begin T := Self.State[t1]; end;
  55. procedure TNewCheckListBoxItemCaption_R(Self: TNewCheckListBox; var T: String; t1: Integer); begin T := Self.ItemCaption[t1]; end;
  56. procedure TNewCheckListBoxItemCaption_W(Self: TNewCheckListBox; const T: String; t1: Integer); begin Self.ItemCaption[t1] := T; end;
  57. procedure TNewCheckListBoxItemEnabled_R(Self: TNewCheckListBox; var T: Boolean; t1: Integer); begin T := Self.ItemEnabled[t1]; end;
  58. procedure TNewCheckListBoxItemEnabled_W(Self: TNewCheckListBox; const T: Boolean; t1: Integer); begin Self.ItemEnabled[t1] := T; end;
  59. procedure TNewCheckListBoxItemLevel_R(Self: TNewCheckListBox; var T: Byte; t1: Integer); begin T := Self.ItemLevel[t1]; end;
  60. procedure TNewCheckListBoxItemObject_R(Self: TNewCheckListBox; var T: TObject; t1: Integer); begin T := Self.ItemObject[t1]; end;
  61. procedure TNewCheckListBoxItemObject_W(Self: TNewCheckListBox; const T: TObject; t1: Integer); begin Self.ItemObject[t1] := T; end;
  62. procedure TNewCheckListBoxItemSubItem_R(Self: TNewCheckListBox; var T: String; t1: Integer); begin T := Self.ItemSubItem[t1]; end;
  63. procedure TNewCheckListBoxItemSubItem_W(Self: TNewCheckListBox; const T: String; t1: Integer); begin Self.ItemSubItem[t1] := T; end;
  64. procedure TNewCheckListBoxItemFontStyle_R(Self: TNewCheckListBox; var T: TFontStyles; const t1: Integer); begin T := Self.ItemFontStyle[t1]; end;
  65. procedure TNewCheckListBoxItemFontStyle_W(Self: TNewCheckListBox; const T: TFontStyles; const t1: Integer); begin Self.ItemFontStyle[t1] := T; end;
  66. procedure TNewCheckListBoxSubItemFontStyle_R(Self: TNewCheckListBox; var T: TFontStyles; const t1: Integer); begin T := Self.SubItemFontStyle[t1]; end;
  67. procedure TNewCheckListBoxSubItemFontStyle_W(Self: TNewCheckListBox; const T: TFontStyles; const t1: Integer); begin Self.SubItemFontStyle[t1] := T; end;
  68. procedure RegisterNewCheckListBox_R(Cl: TPSRuntimeClassImporter);
  69. begin
  70. with Cl.Add(TNewCheckListBox) do
  71. begin
  72. RegisterMethod(@TNewCheckListBox.AddCheckBox, 'AddCheckBox');
  73. RegisterMethod(@TNewCheckListBox.AddGroup, 'AddGroup');
  74. RegisterMethod(@TNewCheckListBox.AddRadioButton, 'AddRadioButton');
  75. RegisterMethod(@TNewCheckListBox.CheckItem, 'CheckItem');
  76. RegisterPropertyHelper(@TNewCheckListBoxChecked_R, @TNewCheckListBoxChecked_W, 'Checked');
  77. RegisterPropertyHelper(@TNewCheckListBoxState_R, nil, 'State');
  78. RegisterPropertyHelper(@TNewCheckListBoxItemCaption_R, @TNewCheckListBoxItemCaption_W, 'ItemCaption');
  79. RegisterPropertyHelper(@TNewCheckListBoxItemEnabled_R, @TNewCheckListBoxItemEnabled_W, 'ItemEnabled');
  80. RegisterPropertyHelper(@TNewCheckListBoxItemLevel_R, nil, 'ItemLevel');
  81. RegisterPropertyHelper(@TNewCheckListBoxItemObject_R, @TNewCheckListBoxItemObject_W, 'ItemObject');
  82. RegisterPropertyHelper(@TNewCheckListBoxItemSubItem_R, @TNewCheckListBoxItemSubItem_W, 'ItemSubItem');
  83. RegisterPropertyHelper(@TNewCheckListBoxItemFontStyle_R, @TNewCheckListBoxItemFontStyle_W, 'ItemFontStyle');
  84. RegisterPropertyHelper(@TNewCheckListBoxSubItemFontStyle_R, @TNewCheckListBoxSubItemFontStyle_W, 'SubItemFontStyle');
  85. end;
  86. end;
  87. procedure RegisterNewProgressBar_R(Cl: TPSRuntimeClassImporter);
  88. begin
  89. Cl.Add(TNewProgressBar);
  90. end;
  91. procedure TRichEditViewerRTFText_W(Self: TRichEditViewer; const T: AnsiString); begin Self.RTFText := T; end;
  92. procedure RegisterRichEditViewer_R(Cl: TPSRuntimeClassImporter);
  93. begin
  94. with Cl.Add(TRichEditViewer) do
  95. begin
  96. RegisterPropertyHelper(nil, @TRichEditViewerRTFText_W, 'RTFText');
  97. end;
  98. end;
  99. procedure RegisterPasswordEdit_R(Cl: TPSRuntimeClassImporter);
  100. begin
  101. Cl.Add(TPasswordEdit);
  102. end;
  103. procedure TCustomFolderTreeViewDirectory_W(Self: TCustomFolderTreeView; const T: String); begin Self.Directory := T; end;
  104. procedure TCustomFolderTreeViewDirectory_R(Self: TCustomFolderTreeView; var T: String); begin T := Self.Directory; end;
  105. procedure RegisterCustomFolderTreeView_R(Cl: TPSRuntimeClassImporter);
  106. begin
  107. with Cl.Add(TCustomFolderTreeView) do
  108. begin
  109. RegisterMethod(@TCustomFolderTreeView.ChangeDirectory, 'ChangeDirectory');
  110. RegisterMethod(@TCustomFolderTreeView.CreateNewDirectory, 'CreateNewDirectory');
  111. RegisterPropertyHelper(@TCustomFolderTreeViewDirectory_R,@TCustomFolderTreeViewDirectory_W,'Directory');
  112. end;
  113. end;
  114. procedure RegisterStartMenuFolderTreeView_R(Cl: TPSRuntimeClassImporter);
  115. begin
  116. with Cl.Add(TStartMenuFolderTreeView) do
  117. begin
  118. RegisterMethod(@TStartMenuFolderTreeView.SetPaths, 'SetPaths');
  119. end;
  120. end;
  121. procedure RegisterFolderTreeView_R(Cl: TPSRuntimeClassImporter);
  122. begin
  123. Cl.Add(TFolderTreeView);
  124. end;
  125. procedure TBitmapAlphaFormat_W(Self: TBitmap; const T: TAlphaFormat); begin Self.AlphaFormat := T; end;
  126. procedure TBitmapAlphaFormat_R(Self: TBitmap; var T: TAlphaFormat); begin T := Self.AlphaFormat; end;
  127. procedure RegisterBitmapButton_R(Cl: TPSRuntimeClassImporter);
  128. begin
  129. with Cl.FindClass('TBitmap') do
  130. begin
  131. RegisterPropertyHelper(@TBitmapAlphaFormat_R, @TBitmapAlphaFormat_W, 'AlphaFormat');
  132. end;
  133. Cl.Add(TBitmapButton);
  134. end;
  135. procedure RegisterBitmapImage_R(Cl: TPSRuntimeClassImporter);
  136. begin
  137. Cl.Add(TBitmapImage);
  138. end;
  139. procedure RegisterBidiCtrls_R(Cl: TPSRuntimeClassImporter);
  140. begin
  141. Cl.Add(TNewEdit);
  142. Cl.Add(TNewMemo);
  143. Cl.Add(TNewComboBox);
  144. Cl.Add(TNewListBox);
  145. Cl.Add(TNewButton);
  146. Cl.Add(TNewCheckBox);
  147. Cl.Add(TNewRadioButton);
  148. with Cl.Add(TNewLinkLabel) do
  149. begin
  150. RegisterMethod(@TNewLinkLabel.AdjustHeight, 'AdjustHeight');
  151. end;
  152. end;
  153. procedure TNewNotebookPages_R(Self: TNewNotebook; var T: TNewNotebookPage; const t1: Integer); begin T := Self.Pages[t1]; end;
  154. procedure TNewNotebookPageCount_R(Self: TNewNotebook; var T: Integer); begin T := Self.PageCount; end;
  155. procedure RegisterNewNotebook_R(CL: TPSRuntimeClassImporter);
  156. begin
  157. with CL.Add(TNewNotebook) do
  158. begin
  159. RegisterMethod(@TNewNotebook.FindNextPage, 'FindNextPage');
  160. RegisterPropertyHelper(@TNewNotebookPageCount_R,nil,'PageCount');
  161. RegisterPropertyHelper(@TNewNotebookPages_R,nil,'Pages');
  162. end;
  163. end;
  164. procedure TNewNotebookPageNotebook_W(Self: TNewNotebookPage; const T: TNewNotebook); begin Self.Notebook := T; end;
  165. procedure TNewNotebookPageNotebook_R(Self: TNewNotebookPage; var T: TNewNotebook); begin T := Self.Notebook; end;
  166. procedure RegisterNewNotebookPage_R(CL: TPSRuntimeClassImporter);
  167. begin
  168. with CL.Add(TNewNotebookPage) do
  169. begin
  170. RegisterPropertyHelper(@TNewNotebookPageNotebook_R,@TNewNotebookPageNotebook_W,'Notebook');
  171. end;
  172. end;
  173. procedure RegisterUIStateForm_R(Cl: TPSRuntimeClassImporter);
  174. begin
  175. Cl.Add(TUIStateForm);
  176. end;
  177. procedure RegisterSetupForm_R(Cl: TPSRuntimeClassImporter);
  178. begin
  179. with Cl.Add(TSetupForm) do
  180. begin
  181. RegisterMethod(@TSetupForm.CalculateButtonWidth, 'CalculateButtonWidth');
  182. RegisterMethod(@TSetupForm.ShouldSizeX, 'ShouldSizeX');
  183. RegisterMethod(@TSetupForm.ShouldSizeY, 'ShouldSizeY');
  184. RegisterMethod(@TSetupForm.FlipSizeAndCenterIfNeeded, 'FlipSizeAndCenterIfNeeded');
  185. end;
  186. end;
  187. procedure RegisterWizardForm_R(Cl: TPSRuntimeClassImporter);
  188. begin
  189. with Cl.Add(TWizardForm) do
  190. begin
  191. RegisterMethod(@TWizardForm.AdjustLabelHeight, 'AdjustLabelHeight');
  192. RegisterMethod(@TWizardForm.AdjustLinkLabelHeight, 'AdjustLinkLabelHeight');
  193. RegisterMethod(@TWizardForm.IncTopDecHeight, 'IncTopDecHeight');
  194. end;
  195. end;
  196. procedure RegisterUninstallProgressForm_R(Cl: TPSRuntimeClassImporter);
  197. begin
  198. Cl.Add(TUninstallProgressForm);
  199. end;
  200. procedure RegisterWizardPage_R(Cl: TIFPSRuntimeClassImporter);
  201. begin
  202. Cl.Add(TWizardPage);
  203. end;
  204. procedure TInputQueryWizardPageEdits_R(Self: TInputQueryWizardPage; var T: TPasswordEdit; const t1: Integer); begin T := Self.Edits[t1]; end;
  205. procedure TInputQueryWizardPagePromptLabels_R(Self: TInputQueryWizardPage; var T: TNewStaticText; const t1: Integer); begin T := Self.PromptLabels[t1]; end;
  206. procedure TInputQueryWizardPageValues_R(Self: TInputQueryWizardPage; var T: String; const t1: Integer); begin T := Self.Values[t1]; end;
  207. procedure TInputQueryWizardPageValues_W(Self: TInputQueryWizardPage; const T: String; const t1: Integer); begin Self.Values[t1] := T; end;
  208. procedure RegisterInputQueryWizardPage_R(CL: TPSRuntimeClassImporter);
  209. begin
  210. with CL.Add(TInputQueryWizardPage) do
  211. begin
  212. RegisterMethod(@TInputQueryWizardPage.Add, 'Add');
  213. RegisterPropertyHelper(@TInputQueryWizardPageEdits_R,nil,'Edits');
  214. RegisterPropertyHelper(@TInputQueryWizardPagePromptLabels_R,nil,'PromptLabels');
  215. RegisterPropertyHelper(@TInputQueryWizardPageValues_R,@TInputQueryWizardPageValues_W,'Values');
  216. end;
  217. end;
  218. procedure TInputOptionWizardPageSelectedValueIndex_R(Self: TInputOptionWizardPage; var T: Integer); begin T := Self.SelectedValueIndex; end;
  219. procedure TInputOptionWizardPageSelectedValueIndex_W(Self: TInputOptionWizardPage; const T: Integer); begin Self.SelectedValueIndex := T; end;
  220. procedure TInputOptionWizardPageValues_W(Self: TInputOptionWizardPage; const T: Boolean; const t1: Integer); begin Self.Values[t1] := T; end;
  221. procedure TInputOptionWizardPageValues_R(Self: TInputOptionWizardPage; var T: Boolean; const t1: Integer); begin T := Self.Values[t1]; end;
  222. procedure RegisterInputOptionWizardPage_R(CL: TPSRuntimeClassImporter);
  223. begin
  224. with CL.Add(TInputOptionWizardPage) do
  225. begin
  226. RegisterMethod(@TInputOptionWizardPage.Add, 'Add');
  227. RegisterMethod(@TInputOptionWizardPage.AddEx, 'AddEx');
  228. RegisterPropertyHelper(@TInputOptionWizardPageSelectedValueIndex_R,@TInputOptionWizardPageSelectedValueIndex_W,'SelectedValueIndex');
  229. RegisterPropertyHelper(@TInputOptionWizardPageValues_R,@TInputOptionWizardPageValues_W,'Values');
  230. end;
  231. end;
  232. procedure TInputDirWizardPageButtons_R(Self: TInputDirWizardPage; var T: TNewButton; const t1: Integer); begin T := Self.Buttons[t1]; end;
  233. procedure TInputDirWizardPageEdits_R(Self: TInputDirWizardPage; var T: TEdit; const t1: Integer); begin T := Self.Edits[t1]; end;
  234. procedure TInputDirWizardPagePromptLabels_R(Self: TInputDirWizardPage; var T: TNewStaticText; const t1: Integer); begin T := Self.PromptLabels[t1]; end;
  235. procedure TInputDirWizardPageValues_W(Self: TInputDirWizardPage; const T: String; const t1: Integer); begin Self.Values[t1] := T; end;
  236. procedure TInputDirWizardPageValues_R(Self: TInputDirWizardPage; var T: String; const t1: Integer); begin T := Self.Values[t1]; end;
  237. procedure RegisterInputDirWizardPage_R(CL: TPSRuntimeClassImporter);
  238. begin
  239. with CL.Add(TInputDirWizardPage) do
  240. begin
  241. RegisterMethod(@TInputDirWizardPage.Add, 'Add');
  242. RegisterPropertyHelper(@TInputDirWizardPageButtons_R,nil,'Buttons');
  243. RegisterPropertyHelper(@TInputDirWizardPageEdits_R,nil,'Edits');
  244. RegisterPropertyHelper(@TInputDirWizardPagePromptLabels_R,nil,'PromptLabels');
  245. RegisterPropertyHelper(@TInputDirWizardPageValues_R,@TInputDirWizardPageValues_W,'Values');
  246. end;
  247. end;
  248. procedure TInputFileWizardPageButtons_R(Self: TInputFileWizardPage; var T: TNewButton; const t1: Integer); begin T := Self.Buttons[t1]; end;
  249. procedure TInputFileWizardPagePromptLabels_R(Self: TInputFileWizardPage; var T: TNewStaticText; const t1: Integer); begin T := Self.PromptLabels[t1]; end;
  250. procedure TInputFileWizardPageEdits_R(Self: TInputFileWizardPage; var T: TEdit; const t1: Integer); begin T := Self.Edits[t1]; end;
  251. procedure TInputFileWizardPageValues_W(Self: TInputFileWizardPage; const T: String; const t1: Integer); begin Self.Values[t1] := T; end;
  252. procedure TInputFileWizardPageValues_R(Self: TInputFileWizardPage; var T: String; const t1: Integer); begin T := Self.Values[t1]; end;
  253. procedure TInputFileWizardPageIsSaveButton_W(Self: TInputFileWizardPage; const T: Boolean; const t1: Integer); begin Self.IsSaveButton[t1] := T; end;
  254. procedure TInputFileWizardPageIsSaveButton_R(Self: TInputFileWizardPage; var T: Boolean; const t1: Integer); begin T := Self.IsSaveButton[t1]; end;
  255. procedure RegisterInputFileWizardPage_R(CL: TPSRuntimeClassImporter);
  256. begin
  257. with CL.Add(TInputFileWizardPage) do
  258. begin
  259. RegisterMethod(@TInputFileWizardPage.Add, 'Add');
  260. RegisterPropertyHelper(@TInputFileWizardPageButtons_R,nil,'Buttons');
  261. RegisterPropertyHelper(@TInputFileWizardPageEdits_R,nil,'Edits');
  262. RegisterPropertyHelper(@TInputFileWizardPagePromptLabels_R,nil,'PromptLabels');
  263. RegisterPropertyHelper(@TInputFileWizardPageValues_R,@TInputFileWizardPageValues_W,'Values');
  264. RegisterPropertyHelper(@TInputFileWizardPageIsSaveButton_R,@TInputFileWizardPageIsSaveButton_W,'IsSaveButton');
  265. end;
  266. end;
  267. procedure RegisterOutputMsgWizardPage_R(CL: TPSRuntimeClassImporter);
  268. begin
  269. CL.Add(TOutputMsgWizardPage);
  270. end;
  271. procedure RegisterOutputMsgMemoWizardPage_R(CL: TPSRuntimeClassImporter);
  272. begin
  273. CL.Add(TOutputMsgMemoWizardPage);
  274. end;
  275. procedure RegisterOutputProgressWizardPage_R(CL: TPSRuntimeClassImporter);
  276. begin
  277. with CL.Add(TOutputProgressWizardPage) do
  278. begin
  279. RegisterMethod(@TOutputProgressWizardPage.Hide, 'Hide');
  280. RegisterMethod(@TOutputProgressWizardPage.SetProgress, 'SetProgress');
  281. RegisterMethod(@TOutputProgressWizardPage.SetText, 'SetText');
  282. RegisterMethod(@TOutputProgressWizardPage.Show, 'Show');
  283. end;
  284. end;
  285. procedure RegisterOutputMarqueeProgressWizardPage_R(CL: TPSRuntimeClassImporter);
  286. begin
  287. with CL.Add(TOutputMarqueeProgressWizardPage) do
  288. begin
  289. RegisterMethod(@TOutputMarqueeProgressWizardPage.Animate, 'Animate');
  290. RegisterMethod(@TOutputMarqueeProgressWizardPage.SetProgress, 'SetProgress');
  291. end;
  292. end;
  293. procedure RegisterDownloadWizardPage_R(CL: TPSRuntimeClassImporter);
  294. begin
  295. with CL.Add(TDownloadWizardPage) do
  296. begin
  297. RegisterMethod(@TDownloadWizardPage.Add, 'Add');
  298. RegisterMethod(@TDownloadWizardPage.AddWithISSigVerify, 'AddWithISSigVerify');
  299. RegisterMethod(@TDownloadWizardPage.AddEx, 'AddEx');
  300. RegisterMethod(@TDownloadWizardPage.AddExWithISSigVerify, 'AddExWithISSigVerify');
  301. RegisterMethod(@TDownloadWizardPage.Clear, 'Clear');
  302. RegisterMethod(@TDownloadWizardPage.Download, 'Download');
  303. RegisterMethod(@TDownloadWizardPage.Show, 'Show');
  304. end;
  305. end;
  306. procedure RegisterExtractionWizardPage_R(CL: TPSRuntimeClassImporter);
  307. begin
  308. with CL.Add(TExtractionWizardPage) do
  309. begin
  310. RegisterMethod(@TExtractionWizardPage.Add, 'Add');
  311. RegisterMethod(@TExtractionWizardPage.AddEx, 'AddEx');
  312. RegisterMethod(@TExtractionWizardPage.Clear, 'Clear');
  313. RegisterMethod(@TExtractionWizardPage.Extract, 'Extract');
  314. RegisterMethod(@TExtractionWizardPage.Show, 'Show');
  315. end;
  316. end;
  317. procedure RegisterHandCursor_R(Cl: TPSRuntimeClassImporter);
  318. const
  319. IDC_HAND = MakeIntResource(32649);
  320. begin
  321. Screen.Cursors[crHand] := LoadCursor(0, IDC_HAND);
  322. end;
  323. function ScriptClassesLibraryRegister_R(ScriptInterpreter: TPSExec): TPSRuntimeClassImporter;
  324. var
  325. Cl: TPSRuntimeClassImporter;
  326. begin
  327. Cl := TPSRuntimeClassImporter.Create();
  328. try
  329. { Std }
  330. RIRegisterTObject(Cl);
  331. RIRegisterTPersistent(Cl);
  332. RIRegisterTComponent(Cl);
  333. { Classes }
  334. RIRegisterTStream(Cl);
  335. RIRegisterTStrings(Cl, True);
  336. RIRegisterTStringList(Cl);
  337. RIRegisterTHandleStream(Cl);
  338. RIRegisterTFileStream(Cl);
  339. RIRegisterTStringStream(Cl);
  340. { Graphics }
  341. RIRegisterTGraphicsObject(Cl);
  342. RIRegisterTFont(Cl);
  343. RIRegisterTCanvas(Cl);
  344. RIRegisterTPen(Cl);
  345. RIRegisterTBrush(Cl);
  346. RIRegisterTGraphic(Cl);
  347. RIRegisterTBitmap(Cl, True);
  348. { Controls }
  349. RIRegisterTControl(Cl);
  350. RegisterWinControl_R(Cl);
  351. RIRegisterTGraphicControl(Cl);
  352. RIRegisterTCustomControl(Cl);
  353. RIRegister_TDragObject(Cl);
  354. RIRegisterTSizeConstraints(cl);
  355. { Forms }
  356. RIRegisterTScrollingWinControl(Cl);
  357. RIRegisterTForm(Cl);
  358. { StdCtrls }
  359. RIRegisterTCustomLabel(Cl);
  360. RIRegisterTLabel(Cl);
  361. RIRegisterTCustomEdit(Cl);
  362. RIRegisterTEdit(Cl);
  363. RIRegisterTCustomMemo(Cl);
  364. RIRegisterTMemo(Cl);
  365. RIRegisterTCustomComboBox(Cl);
  366. RIRegisterTComboBox(Cl);
  367. RIRegisterTButtonControl(Cl);
  368. RIRegisterTButton(Cl);
  369. RIRegisterTCustomCheckBox(Cl);
  370. RIRegisterTCheckBox(Cl);
  371. RIRegisterTRadioButton(Cl);
  372. RIRegisterTCustomListBox(Cl);
  373. RIRegisterTListBox(Cl);
  374. { ExtCtrls }
  375. RIRegisterTBevel(Cl);
  376. RIRegisterTCustomPanel(Cl);
  377. RIRegisterTPanel(Cl);
  378. RIRegisterTCustomLinkLabel(Cl);
  379. RIRegisterTLinkLabel(Cl);
  380. { ComObj }
  381. RIRegister_ComObj(ScriptInterpreter);
  382. RegisterPngImage_R(Cl);
  383. RegisterNewStaticText_R(Cl);
  384. RegisterNewCheckListBox_R(Cl);
  385. RegisterNewProgressBar_R(Cl);
  386. RegisterRichEditViewer_R(Cl);
  387. RegisterPasswordEdit_R(Cl);
  388. RegisterCustomFolderTreeView_R(Cl);
  389. RegisterFolderTreeView_R(Cl);
  390. RegisterStartMenuFolderTreeView_R(Cl);
  391. RegisterBitmapButton_R(Cl);
  392. RegisterBitmapImage_R(Cl);
  393. RegisterBidiCtrls_R(Cl);
  394. RegisterNewNotebook_R(Cl);
  395. RegisterNewNotebookPage_R(Cl);
  396. RegisterUIStateForm_R(Cl);
  397. RegisterSetupForm_R(Cl);
  398. RegisterWizardForm_R(Cl);
  399. RegisterUninstallProgressForm_R(Cl);
  400. RegisterWizardPage_R(Cl);
  401. RegisterInputQueryWizardPage_R(Cl);
  402. RegisterInputOptionWizardPage_R(Cl);
  403. RegisterInputDirWizardPage_R(Cl);
  404. RegisterInputFileWizardPage_R(Cl);
  405. RegisterOutputMsgWizardPage_R(Cl);
  406. RegisterOutputMsgMemoWizardPage_R(Cl);
  407. RegisterOutputProgressWizardPage_R(Cl);
  408. RegisterOutputMarqueeProgressWizardPage_R(Cl);
  409. RegisterDownloadWizardPage_R(Cl);
  410. RegisterExtractionWizardPage_R(Cl);
  411. RegisterHandCursor_R(Cl);
  412. RegisterClassLibraryRuntime(ScriptInterpreter, Cl);
  413. except
  414. Cl.Free;
  415. raise;
  416. end;
  417. Result := Cl;
  418. end;
  419. procedure ScriptClassesLibraryUpdateVars(ScriptInterpreter: TIFPSExec);
  420. begin
  421. SetVariantToClass(ScriptInterpreter.GetVarNo(ScriptInterpreter.GetVar('WIZARDFORM')), WizardForm);
  422. SetVariantToClass(ScriptInterpreter.GetVarNo(ScriptInterpreter.GetVar('UNINSTALLPROGRESSFORM')), UninstallProgressForm);
  423. end;
  424. end.