Setup.ScriptClasses.pas 20 KB

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