Setup.ScriptClasses.pas 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474
  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, 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 RegisterBitmapImage_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(TBitmapImage);
  124. end;
  125. procedure RegisterBidiCtrls_R(Cl: TPSRuntimeClassImporter);
  126. begin
  127. Cl.Add(TNewEdit);
  128. Cl.Add(TNewMemo);
  129. Cl.Add(TNewComboBox);
  130. Cl.Add(TNewListBox);
  131. Cl.Add(TNewButton);
  132. Cl.Add(TNewCheckBox);
  133. Cl.Add(TNewRadioButton);
  134. with Cl.Add(TNewLinkLabel) do
  135. begin
  136. RegisterMethod(@TNewLinkLabel.AdjustHeight, 'AdjustHeight');
  137. end;
  138. end;
  139. procedure TNewNotebookPages_R(Self: TNewNotebook; var T: TNewNotebookPage; const t1: Integer); begin T := Self.Pages[t1]; end;
  140. procedure TNewNotebookPageCount_R(Self: TNewNotebook; var T: Integer); begin T := Self.PageCount; end;
  141. procedure RegisterNewNotebook_R(CL: TPSRuntimeClassImporter);
  142. begin
  143. with CL.Add(TNewNotebook) do
  144. begin
  145. RegisterMethod(@TNewNotebook.FindNextPage, 'FindNextPage');
  146. RegisterPropertyHelper(@TNewNotebookPageCount_R,nil,'PageCount');
  147. RegisterPropertyHelper(@TNewNotebookPages_R,nil,'Pages');
  148. end;
  149. end;
  150. procedure TNewNotebookPageNotebook_W(Self: TNewNotebookPage; const T: TNewNotebook); begin Self.Notebook := T; end;
  151. procedure TNewNotebookPageNotebook_R(Self: TNewNotebookPage; var T: TNewNotebook); begin T := Self.Notebook; end;
  152. procedure RegisterNewNotebookPage_R(CL: TPSRuntimeClassImporter);
  153. begin
  154. with CL.Add(TNewNotebookPage) do
  155. begin
  156. RegisterPropertyHelper(@TNewNotebookPageNotebook_R,@TNewNotebookPageNotebook_W,'Notebook');
  157. end;
  158. end;
  159. procedure RegisterUIStateForm_R(Cl: TPSRuntimeClassImporter);
  160. begin
  161. Cl.Add(TUIStateForm);
  162. end;
  163. procedure RegisterSetupForm_R(Cl: TPSRuntimeClassImporter);
  164. begin
  165. with Cl.Add(TSetupForm) do
  166. begin
  167. RegisterMethod(@TSetupForm.CalculateButtonWidth, 'CalculateButtonWidth');
  168. RegisterMethod(@TSetupForm.ShouldSizeX, 'ShouldSizeX');
  169. RegisterMethod(@TSetupForm.ShouldSizeY, 'ShouldSizeY');
  170. RegisterMethod(@TSetupForm.FlipSizeAndCenterIfNeeded, 'FlipSizeAndCenterIfNeeded');
  171. end;
  172. end;
  173. procedure RegisterWizardForm_R(Cl: TPSRuntimeClassImporter);
  174. begin
  175. with Cl.Add(TWizardForm) do
  176. begin
  177. RegisterMethod(@TWizardForm.AdjustLabelHeight, 'AdjustLabelHeight');
  178. RegisterMethod(@TWizardForm.AdjustLinkLabelHeight, 'AdjustLinkLabelHeight');
  179. RegisterMethod(@TWizardForm.IncTopDecHeight, 'IncTopDecHeight');
  180. end;
  181. end;
  182. procedure RegisterUninstallProgressForm_R(Cl: TPSRuntimeClassImporter);
  183. begin
  184. Cl.Add(TUninstallProgressForm);
  185. end;
  186. procedure RegisterWizardPage_R(Cl: TIFPSRuntimeClassImporter);
  187. begin
  188. Cl.Add(TWizardPage);
  189. end;
  190. procedure TInputQueryWizardPageEdits_R(Self: TInputQueryWizardPage; var T: TPasswordEdit; const t1: Integer); begin T := Self.Edits[t1]; end;
  191. procedure TInputQueryWizardPagePromptLabels_R(Self: TInputQueryWizardPage; var T: TNewStaticText; const t1: Integer); begin T := Self.PromptLabels[t1]; end;
  192. procedure TInputQueryWizardPageValues_R(Self: TInputQueryWizardPage; var T: String; const t1: Integer); begin T := Self.Values[t1]; end;
  193. procedure TInputQueryWizardPageValues_W(Self: TInputQueryWizardPage; const T: String; const t1: Integer); begin Self.Values[t1] := T; end;
  194. procedure RegisterInputQueryWizardPage_R(CL: TPSRuntimeClassImporter);
  195. begin
  196. with CL.Add(TInputQueryWizardPage) do
  197. begin
  198. RegisterMethod(@TInputQueryWizardPage.Add, 'Add');
  199. RegisterPropertyHelper(@TInputQueryWizardPageEdits_R,nil,'Edits');
  200. RegisterPropertyHelper(@TInputQueryWizardPagePromptLabels_R,nil,'PromptLabels');
  201. RegisterPropertyHelper(@TInputQueryWizardPageValues_R,@TInputQueryWizardPageValues_W,'Values');
  202. end;
  203. end;
  204. procedure TInputOptionWizardPageSelectedValueIndex_R(Self: TInputOptionWizardPage; var T: Integer); begin T := Self.SelectedValueIndex; end;
  205. procedure TInputOptionWizardPageSelectedValueIndex_W(Self: TInputOptionWizardPage; const T: Integer); begin Self.SelectedValueIndex := T; end;
  206. procedure TInputOptionWizardPageValues_W(Self: TInputOptionWizardPage; const T: Boolean; const t1: Integer); begin Self.Values[t1] := T; end;
  207. procedure TInputOptionWizardPageValues_R(Self: TInputOptionWizardPage; var T: Boolean; const t1: Integer); begin T := Self.Values[t1]; end;
  208. procedure RegisterInputOptionWizardPage_R(CL: TPSRuntimeClassImporter);
  209. begin
  210. with CL.Add(TInputOptionWizardPage) do
  211. begin
  212. RegisterMethod(@TInputOptionWizardPage.Add, 'Add');
  213. RegisterMethod(@TInputOptionWizardPage.AddEx, 'AddEx');
  214. RegisterPropertyHelper(@TInputOptionWizardPageSelectedValueIndex_R,@TInputOptionWizardPageSelectedValueIndex_W,'SelectedValueIndex');
  215. RegisterPropertyHelper(@TInputOptionWizardPageValues_R,@TInputOptionWizardPageValues_W,'Values');
  216. end;
  217. end;
  218. procedure TInputDirWizardPageButtons_R(Self: TInputDirWizardPage; var T: TNewButton; const t1: Integer); begin T := Self.Buttons[t1]; end;
  219. procedure TInputDirWizardPageEdits_R(Self: TInputDirWizardPage; var T: TEdit; const t1: Integer); begin T := Self.Edits[t1]; end;
  220. procedure TInputDirWizardPagePromptLabels_R(Self: TInputDirWizardPage; var T: TNewStaticText; const t1: Integer); begin T := Self.PromptLabels[t1]; end;
  221. procedure TInputDirWizardPageValues_W(Self: TInputDirWizardPage; const T: String; const t1: Integer); begin Self.Values[t1] := T; end;
  222. procedure TInputDirWizardPageValues_R(Self: TInputDirWizardPage; var T: String; const t1: Integer); begin T := Self.Values[t1]; end;
  223. procedure RegisterInputDirWizardPage_R(CL: TPSRuntimeClassImporter);
  224. begin
  225. with CL.Add(TInputDirWizardPage) do
  226. begin
  227. RegisterMethod(@TInputDirWizardPage.Add, 'Add');
  228. RegisterPropertyHelper(@TInputDirWizardPageButtons_R,nil,'Buttons');
  229. RegisterPropertyHelper(@TInputDirWizardPageEdits_R,nil,'Edits');
  230. RegisterPropertyHelper(@TInputDirWizardPagePromptLabels_R,nil,'PromptLabels');
  231. RegisterPropertyHelper(@TInputDirWizardPageValues_R,@TInputDirWizardPageValues_W,'Values');
  232. end;
  233. end;
  234. procedure TInputFileWizardPageButtons_R(Self: TInputFileWizardPage; var T: TNewButton; const t1: Integer); begin T := Self.Buttons[t1]; end;
  235. procedure TInputFileWizardPagePromptLabels_R(Self: TInputFileWizardPage; var T: TNewStaticText; const t1: Integer); begin T := Self.PromptLabels[t1]; end;
  236. procedure TInputFileWizardPageEdits_R(Self: TInputFileWizardPage; var T: TEdit; const t1: Integer); begin T := Self.Edits[t1]; end;
  237. procedure TInputFileWizardPageValues_W(Self: TInputFileWizardPage; const T: String; const t1: Integer); begin Self.Values[t1] := T; end;
  238. procedure TInputFileWizardPageValues_R(Self: TInputFileWizardPage; var T: String; const t1: Integer); begin T := Self.Values[t1]; end;
  239. procedure TInputFileWizardPageIsSaveButton_W(Self: TInputFileWizardPage; const T: Boolean; const t1: Integer); begin Self.IsSaveButton[t1] := T; end;
  240. procedure TInputFileWizardPageIsSaveButton_R(Self: TInputFileWizardPage; var T: Boolean; const t1: Integer); begin T := Self.IsSaveButton[t1]; end;
  241. procedure RegisterInputFileWizardPage_R(CL: TPSRuntimeClassImporter);
  242. begin
  243. with CL.Add(TInputFileWizardPage) do
  244. begin
  245. RegisterMethod(@TInputFileWizardPage.Add, 'Add');
  246. RegisterPropertyHelper(@TInputFileWizardPageButtons_R,nil,'Buttons');
  247. RegisterPropertyHelper(@TInputFileWizardPageEdits_R,nil,'Edits');
  248. RegisterPropertyHelper(@TInputFileWizardPagePromptLabels_R,nil,'PromptLabels');
  249. RegisterPropertyHelper(@TInputFileWizardPageValues_R,@TInputFileWizardPageValues_W,'Values');
  250. RegisterPropertyHelper(@TInputFileWizardPageIsSaveButton_R,@TInputFileWizardPageIsSaveButton_W,'IsSaveButton');
  251. end;
  252. end;
  253. procedure RegisterOutputMsgWizardPage_R(CL: TPSRuntimeClassImporter);
  254. begin
  255. CL.Add(TOutputMsgWizardPage);
  256. end;
  257. procedure RegisterOutputMsgMemoWizardPage_R(CL: TPSRuntimeClassImporter);
  258. begin
  259. CL.Add(TOutputMsgMemoWizardPage);
  260. end;
  261. procedure RegisterOutputProgressWizardPage_R(CL: TPSRuntimeClassImporter);
  262. begin
  263. with CL.Add(TOutputProgressWizardPage) do
  264. begin
  265. RegisterMethod(@TOutputProgressWizardPage.Hide, 'Hide');
  266. RegisterMethod(@TOutputProgressWizardPage.SetProgress, 'SetProgress');
  267. RegisterMethod(@TOutputProgressWizardPage.SetText, 'SetText');
  268. RegisterMethod(@TOutputProgressWizardPage.Show, 'Show');
  269. end;
  270. end;
  271. procedure RegisterOutputMarqueeProgressWizardPage_R(CL: TPSRuntimeClassImporter);
  272. begin
  273. with CL.Add(TOutputMarqueeProgressWizardPage) do
  274. begin
  275. RegisterMethod(@TOutputMarqueeProgressWizardPage.Animate, 'Animate');
  276. RegisterMethod(@TOutputMarqueeProgressWizardPage.SetProgress, 'SetProgress');
  277. end;
  278. end;
  279. procedure RegisterDownloadWizardPage_R(CL: TPSRuntimeClassImporter);
  280. begin
  281. with CL.Add(TDownloadWizardPage) do
  282. begin
  283. RegisterMethod(@TDownloadWizardPage.Add, 'Add');
  284. RegisterMethod(@TDownloadWizardPage.AddWithISSigVerify, 'AddWithISSigVerify');
  285. RegisterMethod(@TDownloadWizardPage.AddEx, 'AddEx');
  286. RegisterMethod(@TDownloadWizardPage.AddExWithISSigVerify, 'AddExWithISSigVerify');
  287. RegisterMethod(@TDownloadWizardPage.Clear, 'Clear');
  288. RegisterMethod(@TDownloadWizardPage.Download, 'Download');
  289. RegisterMethod(@TDownloadWizardPage.Show, 'Show');
  290. end;
  291. end;
  292. procedure RegisterExtractionWizardPage_R(CL: TPSRuntimeClassImporter);
  293. begin
  294. with CL.Add(TExtractionWizardPage) do
  295. begin
  296. RegisterMethod(@TExtractionWizardPage.Add, 'Add');
  297. RegisterMethod(@TExtractionWizardPage.AddEx, 'AddEx');
  298. RegisterMethod(@TExtractionWizardPage.Clear, 'Clear');
  299. RegisterMethod(@TExtractionWizardPage.Extract, 'Extract');
  300. RegisterMethod(@TExtractionWizardPage.Show, 'Show');
  301. end;
  302. end;
  303. procedure RegisterHandCursor_R(Cl: TPSRuntimeClassImporter);
  304. const
  305. IDC_HAND = MakeIntResource(32649);
  306. begin
  307. Screen.Cursors[crHand] := LoadCursor(0, IDC_HAND);
  308. end;
  309. function ScriptClassesLibraryRegister_R(ScriptInterpreter: TPSExec): TPSRuntimeClassImporter;
  310. var
  311. Cl: TPSRuntimeClassImporter;
  312. begin
  313. Cl := TPSRuntimeClassImporter.Create();
  314. try
  315. { Std }
  316. RIRegisterTObject(Cl);
  317. RIRegisterTPersistent(Cl);
  318. RIRegisterTComponent(Cl);
  319. { Classes }
  320. RIRegisterTStream(Cl);
  321. RIRegisterTStrings(Cl, True);
  322. RIRegisterTStringList(Cl);
  323. RIRegisterTHandleStream(Cl);
  324. RIRegisterTFileStream(Cl);
  325. RIRegisterTStringStream(Cl);
  326. { Graphics }
  327. RIRegisterTGraphicsObject(Cl);
  328. RIRegisterTFont(Cl);
  329. RIRegisterTCanvas(Cl);
  330. RIRegisterTPen(Cl);
  331. RIRegisterTBrush(Cl);
  332. RIRegisterTGraphic(Cl);
  333. RIRegisterTBitmap(Cl, True);
  334. { Controls }
  335. RIRegisterTControl(Cl);
  336. RegisterWinControl_R(Cl);
  337. RIRegisterTGraphicControl(Cl);
  338. RIRegisterTCustomControl(Cl);
  339. RIRegister_TDragObject(Cl);
  340. RIRegisterTSizeConstraints(cl);
  341. { Forms }
  342. RIRegisterTScrollingWinControl(Cl);
  343. RIRegisterTForm(Cl);
  344. { StdCtrls }
  345. RIRegisterTCustomLabel(Cl);
  346. RIRegisterTLabel(Cl);
  347. RIRegisterTCustomEdit(Cl);
  348. RIRegisterTEdit(Cl);
  349. RIRegisterTCustomMemo(Cl);
  350. RIRegisterTMemo(Cl);
  351. RIRegisterTCustomComboBox(Cl);
  352. RIRegisterTComboBox(Cl);
  353. RIRegisterTButtonControl(Cl);
  354. RIRegisterTButton(Cl);
  355. RIRegisterTCustomCheckBox(Cl);
  356. RIRegisterTCheckBox(Cl);
  357. RIRegisterTRadioButton(Cl);
  358. RIRegisterTCustomListBox(Cl);
  359. RIRegisterTListBox(Cl);
  360. { ExtCtrls }
  361. RIRegisterTBevel(Cl);
  362. RIRegisterTCustomPanel(Cl);
  363. RIRegisterTPanel(Cl);
  364. RIRegisterTCustomLinkLabel(Cl);
  365. RIRegisterTLinkLabel(Cl);
  366. { ComObj }
  367. RIRegister_ComObj(ScriptInterpreter);
  368. RegisterNewStaticText_R(Cl);
  369. RegisterNewCheckListBox_R(Cl);
  370. RegisterNewProgressBar_R(Cl);
  371. RegisterRichEditViewer_R(Cl);
  372. RegisterPasswordEdit_R(Cl);
  373. RegisterCustomFolderTreeView_R(Cl);
  374. RegisterFolderTreeView_R(Cl);
  375. RegisterStartMenuFolderTreeView_R(Cl);
  376. RegisterBitmapImage_R(Cl);
  377. RegisterBidiCtrls_R(Cl);
  378. RegisterNewNotebook_R(Cl);
  379. RegisterNewNotebookPage_R(Cl);
  380. RegisterUIStateForm_R(Cl);
  381. RegisterSetupForm_R(Cl);
  382. RegisterWizardForm_R(Cl);
  383. RegisterUninstallProgressForm_R(Cl);
  384. RegisterWizardPage_R(Cl);
  385. RegisterInputQueryWizardPage_R(Cl);
  386. RegisterInputOptionWizardPage_R(Cl);
  387. RegisterInputDirWizardPage_R(Cl);
  388. RegisterInputFileWizardPage_R(Cl);
  389. RegisterOutputMsgWizardPage_R(Cl);
  390. RegisterOutputMsgMemoWizardPage_R(Cl);
  391. RegisterOutputProgressWizardPage_R(Cl);
  392. RegisterOutputMarqueeProgressWizardPage_R(Cl);
  393. RegisterDownloadWizardPage_R(Cl);
  394. RegisterExtractionWizardPage_R(Cl);
  395. RegisterHandCursor_R(Cl);
  396. RegisterClassLibraryRuntime(ScriptInterpreter, Cl);
  397. except
  398. Cl.Free;
  399. raise;
  400. end;
  401. Result := Cl;
  402. end;
  403. procedure ScriptClassesLibraryUpdateVars(ScriptInterpreter: TIFPSExec);
  404. begin
  405. SetVariantToClass(ScriptInterpreter.GetVarNo(ScriptInterpreter.GetVar('WIZARDFORM')), WizardForm);
  406. SetVariantToClass(ScriptInterpreter.GetVarNo(ScriptInterpreter.GetVar('UNINSTALLPROGRESSFORM')), UninstallProgressForm);
  407. end;
  408. end.