ScriptClasses_R.pas 19 KB

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