mirror of
https://github.com/moparisthebest/Simba
synced 2024-12-24 16:28:53 -05:00
Fixed dependancies and hopefully merged them into the iomanager branch...
git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@443 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
parent
a7f37bd6f4
commit
325c61374d
@ -36,7 +36,7 @@
|
||||
<PackageName Value="LCL"/>
|
||||
</Item2>
|
||||
</RequiredPackages>
|
||||
<Units Count="282">
|
||||
<Units Count="284">
|
||||
<Unit0>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
@ -137,8 +137,9 @@
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="TestUnit"/>
|
||||
<CursorPos X="11" Y="42"/>
|
||||
<TopLine Value="27"/>
|
||||
<ComponentState Value="1"/>
|
||||
<CursorPos X="12" Y="312"/>
|
||||
<TopLine Value="290"/>
|
||||
<EditorIndex Value="0"/>
|
||||
<UsageCount Value="202"/>
|
||||
<Loaded Value="True"/>
|
||||
@ -195,9 +196,11 @@
|
||||
<Filename Value="../../Units/MMLCore/mufasatypes.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="MufasaTypes"/>
|
||||
<CursorPos X="58" Y="108"/>
|
||||
<TopLine Value="92"/>
|
||||
<CursorPos X="39" Y="120"/>
|
||||
<TopLine Value="98"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<UsageCount Value="201"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit21>
|
||||
<Unit22>
|
||||
<Filename Value="../../Units/MMLCore/files.pas"/>
|
||||
@ -242,7 +245,7 @@
|
||||
<UnitName Value="finder"/>
|
||||
<CursorPos X="9" Y="90"/>
|
||||
<TopLine Value="86"/>
|
||||
<EditorIndex Value="6"/>
|
||||
<EditorIndex Value="10"/>
|
||||
<UsageCount Value="201"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit27>
|
||||
@ -264,9 +267,11 @@
|
||||
<Filename Value="../../Units/MMLAddon/mmlpsthread.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="mmlpsthread"/>
|
||||
<CursorPos X="5" Y="70"/>
|
||||
<TopLine Value="470"/>
|
||||
<CursorPos X="25" Y="34"/>
|
||||
<TopLine Value="23"/>
|
||||
<EditorIndex Value="4"/>
|
||||
<UsageCount Value="202"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit30>
|
||||
<Unit31>
|
||||
<Filename Value="../../Units/PascalScript/uPSComponent.pas"/>
|
||||
@ -346,7 +351,7 @@
|
||||
<UnitName Value="bitmaps"/>
|
||||
<CursorPos X="50" Y="119"/>
|
||||
<TopLine Value="113"/>
|
||||
<EditorIndex Value="5"/>
|
||||
<EditorIndex Value="9"/>
|
||||
<UsageCount Value="200"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit42>
|
||||
@ -361,7 +366,7 @@
|
||||
<Filename Value="../../Units/MMLAddon/PSInc/Wrappers/colour.inc"/>
|
||||
<CursorPos X="47" Y="47"/>
|
||||
<TopLine Value="47"/>
|
||||
<EditorIndex Value="4"/>
|
||||
<EditorIndex Value="8"/>
|
||||
<UsageCount Value="30"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit44>
|
||||
@ -483,7 +488,7 @@
|
||||
<UnitName Value="colour_conv"/>
|
||||
<CursorPos X="1" Y="332"/>
|
||||
<TopLine Value="302"/>
|
||||
<EditorIndex Value="7"/>
|
||||
<EditorIndex Value="11"/>
|
||||
<UsageCount Value="201"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit62>
|
||||
@ -497,7 +502,7 @@
|
||||
<Filename Value="../../Units/MMLAddon/PSInc/Wrappers/other.inc"/>
|
||||
<CursorPos X="53" Y="13"/>
|
||||
<TopLine Value="75"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<EditorIndex Value="6"/>
|
||||
<UsageCount Value="41"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit64>
|
||||
@ -537,9 +542,11 @@
|
||||
<Filename Value="../../Units/MMLAddon/plugins.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="plugins"/>
|
||||
<CursorPos X="40" Y="49"/>
|
||||
<TopLine Value="55"/>
|
||||
<CursorPos X="12" Y="54"/>
|
||||
<TopLine Value="34"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<UsageCount Value="200"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit70>
|
||||
<Unit71>
|
||||
<Filename Value="../../Units/MMLAddon/PSInc/psdefines.inc"/>
|
||||
@ -1704,7 +1711,7 @@
|
||||
<Filename Value="../../Units/MMLAddon/PSInc/psexportedmethods.inc"/>
|
||||
<CursorPos X="30" Y="109"/>
|
||||
<TopLine Value="98"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<EditorIndex Value="7"/>
|
||||
<UsageCount Value="19"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit240>
|
||||
@ -1731,7 +1738,7 @@
|
||||
<UnitName Value="updateform"/>
|
||||
<CursorPos X="111" Y="102"/>
|
||||
<TopLine Value="81"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<EditorIndex Value="5"/>
|
||||
<UsageCount Value="96"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit243>
|
||||
@ -2000,124 +2007,144 @@
|
||||
<TopLine Value="511"/>
|
||||
<UsageCount Value="15"/>
|
||||
</Unit281>
|
||||
<Unit282>
|
||||
<Filename Value="../../Units/MMLCore/libloader.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="libloader"/>
|
||||
<CursorPos X="20" Y="3"/>
|
||||
<TopLine Value="1"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<UsageCount Value="20"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit282>
|
||||
<Unit283>
|
||||
<Filename Value="../../../../../custom-installs/freepascal/rtl/objpas/classes/classesh.inc"/>
|
||||
<CursorPos X="15" Y="1506"/>
|
||||
<TopLine Value="1478"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit283>
|
||||
</Units>
|
||||
<JumpHistory Count="29" HistoryIndex="28">
|
||||
<JumpHistory Count="30" HistoryIndex="29">
|
||||
<Position1>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="205" Column="33" TopLine="28"/>
|
||||
<Caret Line="1452" Column="33" TopLine="1439"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="196" Column="74" TopLine="45"/>
|
||||
<Filename Value="../../Units/MMLAddon/PSInc/psexportedmethods.inc"/>
|
||||
<Caret Line="115" Column="17" TopLine="80"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="195" Column="74" TopLine="170"/>
|
||||
<Filename Value="../../Units/MMLCore/colour_conv.pas"/>
|
||||
<Caret Line="48" Column="1" TopLine="4"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="231" Column="15" TopLine="218"/>
|
||||
<Filename Value="../../Units/MMLCore/colour_conv.pas"/>
|
||||
<Caret Line="351" Column="52" TopLine="346"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="336" Column="24" TopLine="318"/>
|
||||
<Filename Value="../../Units/MMLCore/colour_conv.pas"/>
|
||||
<Caret Line="374" Column="5" TopLine="345"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="474" Column="16" TopLine="459"/>
|
||||
<Filename Value="../../Units/MMLCore/colour_conv.pas"/>
|
||||
<Caret Line="364" Column="35" TopLine="345"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="486" Column="22" TopLine="459"/>
|
||||
<Filename Value="../../Units/MMLAddon/PSInc/psexportedmethods.inc"/>
|
||||
<Caret Line="119" Column="77" TopLine="80"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="../../Units/MMLCore/finder.pas"/>
|
||||
<Caret Line="61" Column="25" TopLine="61"/>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="1449" Column="100" TopLine="1439"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="../../Units/MMLCore/finder.pas"/>
|
||||
<Caret Line="289" Column="82" TopLine="270"/>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="1489" Column="3" TopLine="1487"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="../../Units/MMLAddon/PSInc/psexportedmethods.inc"/>
|
||||
<Caret Line="114" Column="1" TopLine="103"/>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="474" Column="10" TopLine="459"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="../../Units/MMLAddon/PSInc/psexportedmethods.inc"/>
|
||||
<Caret Line="110" Column="27" TopLine="96"/>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="434" Column="20" TopLine="391"/>
|
||||
</Position11>
|
||||
<Position12>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="487" Column="95" TopLine="275"/>
|
||||
<Caret Line="533" Column="40" TopLine="508"/>
|
||||
</Position12>
|
||||
<Position13>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="1439" Column="38" TopLine="1407"/>
|
||||
<Caret Line="58" Column="21" TopLine="38"/>
|
||||
</Position13>
|
||||
<Position14>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="1452" Column="33" TopLine="1439"/>
|
||||
<Filename Value="../../Units/MMLCore/bitmaps.pas"/>
|
||||
<Caret Line="128" Column="27" TopLine="111"/>
|
||||
</Position14>
|
||||
<Position15>
|
||||
<Filename Value="../../Units/MMLAddon/PSInc/psexportedmethods.inc"/>
|
||||
<Caret Line="115" Column="17" TopLine="80"/>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="468" Column="17" TopLine="418"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="../../Units/MMLCore/colour_conv.pas"/>
|
||||
<Caret Line="48" Column="1" TopLine="4"/>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="1017" Column="63" TopLine="1010"/>
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="../../Units/MMLCore/colour_conv.pas"/>
|
||||
<Caret Line="351" Column="52" TopLine="346"/>
|
||||
<Filename Value="../../Units/MMLCore/libloader.pas"/>
|
||||
<Caret Line="21" Column="6" TopLine="1"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
<Filename Value="../../Units/MMLCore/colour_conv.pas"/>
|
||||
<Caret Line="374" Column="5" TopLine="345"/>
|
||||
<Filename Value="../../Units/MMLCore/mufasatypes.pas"/>
|
||||
<Caret Line="32" Column="31" TopLine="1"/>
|
||||
</Position18>
|
||||
<Position19>
|
||||
<Filename Value="../../Units/MMLCore/colour_conv.pas"/>
|
||||
<Caret Line="364" Column="35" TopLine="345"/>
|
||||
<Filename Value="../../Units/MMLAddon/mmlpsthread.pas"/>
|
||||
<Caret Line="291" Column="29" TopLine="274"/>
|
||||
</Position19>
|
||||
<Position20>
|
||||
<Filename Value="../../Units/MMLAddon/PSInc/psexportedmethods.inc"/>
|
||||
<Caret Line="119" Column="77" TopLine="80"/>
|
||||
<Filename Value="../../Units/MMLAddon/mmlpsthread.pas"/>
|
||||
<Caret Line="329" Column="31" TopLine="312"/>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="1449" Column="100" TopLine="1439"/>
|
||||
<Filename Value="../../Units/MMLAddon/mmlpsthread.pas"/>
|
||||
<Caret Line="330" Column="41" TopLine="313"/>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="1489" Column="3" TopLine="1487"/>
|
||||
<Caret Line="308" Column="33" TopLine="292"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="474" Column="10" TopLine="459"/>
|
||||
<Caret Line="604" Column="21" TopLine="581"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="434" Column="20" TopLine="391"/>
|
||||
<Filename Value="../../Units/MMLAddon/mmlpsthread.pas"/>
|
||||
<Caret Line="10" Column="18" TopLine="67"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="533" Column="40" TopLine="508"/>
|
||||
<Filename Value="../../Units/MMLAddon/mmlpsthread.pas"/>
|
||||
<Caret Line="122" Column="11" TopLine="109"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="58" Column="21" TopLine="38"/>
|
||||
<Filename Value="../../Units/MMLAddon/mmlpsthread.pas"/>
|
||||
<Caret Line="89" Column="30" TopLine="77"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="../../Units/MMLCore/bitmaps.pas"/>
|
||||
<Caret Line="128" Column="27" TopLine="111"/>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="604" Column="21" TopLine="537"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="468" Column="17" TopLine="418"/>
|
||||
<Caret Line="36" Column="24" TopLine="300"/>
|
||||
</Position28>
|
||||
<Position29>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="1017" Column="63" TopLine="1010"/>
|
||||
<Caret Line="312" Column="27" TopLine="289"/>
|
||||
</Position29>
|
||||
<Position30>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="355" Column="12" TopLine="338"/>
|
||||
</Position30>
|
||||
</JumpHistory>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
@ -2128,7 +2155,7 @@
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)/;$(ProjPath)../../Units/MMLAddon/PSInc/"/>
|
||||
<OtherUnitFiles Value="$(ProjPath)../../Units/MMLCore/;$(ProjPath)../../Units/MMLAddon/;$(ProjPath)../../Units/PascalScript/;$(ProjPath)../../Units/Misc/;$(ProjPath)../../Units/MMLAddon/PSInc/;$(ProjPath)../../Units/Linux/;$(ProjPath)../../Units/Synapse/;$(LazarusDir)/components/mouseandkeyinput/"/>
|
||||
<UnitOutputDirectory Value="../../build/$(TargetOS)/"/>
|
||||
<UnitOutputDirectory Value="../../build/$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<CodeGeneration>
|
||||
<Optimizations>
|
||||
|
@ -31,7 +31,8 @@ uses
|
||||
{$ENDIF}{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
LResources, Forms, testunit, colourhistory, About, internets, debugimage,
|
||||
framefunctionlist, simpleanalyzer, updater, updateform, simbasettings;
|
||||
framefunctionlist, simpleanalyzer, updater, updateform, simbasettings,
|
||||
libloader;
|
||||
{$IFDEF WINDOWS}{$R project1.rc}{$ENDIF}
|
||||
|
||||
begin
|
||||
|
@ -1,7 +1,7 @@
|
||||
object Form1: TForm1
|
||||
Left = 316
|
||||
Left = 593
|
||||
Height = 557
|
||||
Top = 105
|
||||
Top = 321
|
||||
Width = 734
|
||||
ActiveControl = ScriptPanel
|
||||
Caption = 'THA FUKING SIMBA'
|
||||
@ -202,7 +202,7 @@ object Form1: TForm1
|
||||
object StatusBar: TStatusBar
|
||||
Left = 0
|
||||
Height = 21
|
||||
Top = 536
|
||||
Top = 511
|
||||
Width = 734
|
||||
Panels = <
|
||||
item
|
||||
@ -220,7 +220,7 @@ object Form1: TForm1
|
||||
object PanelMemo: TPanel
|
||||
Left = 0
|
||||
Height = 154
|
||||
Top = 382
|
||||
Top = 357
|
||||
Width = 734
|
||||
Align = alBottom
|
||||
ClientHeight = 154
|
||||
@ -240,19 +240,19 @@ object Form1: TForm1
|
||||
Cursor = crVSplit
|
||||
Left = 0
|
||||
Height = 5
|
||||
Top = 377
|
||||
Top = 352
|
||||
Width = 734
|
||||
Align = alBottom
|
||||
ResizeAnchor = akBottom
|
||||
end
|
||||
object ScriptPanel: TPanel
|
||||
Left = 0
|
||||
Height = 353
|
||||
Height = 328
|
||||
Top = 24
|
||||
Width = 734
|
||||
Align = alClient
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 353
|
||||
ClientHeight = 328
|
||||
ClientWidth = 734
|
||||
DockSite = True
|
||||
TabOrder = 4
|
||||
@ -260,7 +260,7 @@ object Form1: TForm1
|
||||
OnDockOver = ScriptPanelDockOver
|
||||
object PageControl1: TPageControl
|
||||
Left = 155
|
||||
Height = 318
|
||||
Height = 293
|
||||
Top = 0
|
||||
Width = 579
|
||||
Align = alClient
|
||||
@ -279,7 +279,7 @@ object Form1: TForm1
|
||||
object SearchPanel: TPanel
|
||||
Left = 0
|
||||
Height = 35
|
||||
Top = 318
|
||||
Top = 293
|
||||
Width = 734
|
||||
Align = alBottom
|
||||
BevelOuter = bvSpace
|
||||
@ -409,21 +409,21 @@ object Form1: TForm1
|
||||
end
|
||||
object SplitterFunctionList: TSplitter
|
||||
Left = 150
|
||||
Height = 318
|
||||
Height = 293
|
||||
Top = 0
|
||||
Width = 5
|
||||
OnCanResize = SplitterFunctionListCanResize
|
||||
Visible = False
|
||||
end
|
||||
inline frmFunctionList: TFunctionListFrame
|
||||
Height = 318
|
||||
Height = 293
|
||||
Width = 150
|
||||
ClientHeight = 318
|
||||
ClientHeight = 293
|
||||
ClientWidth = 150
|
||||
OnEndDock = nil
|
||||
TabOrder = 3
|
||||
inherited FunctionList: TTreeView
|
||||
Height = 269
|
||||
Height = 244
|
||||
Top = 22
|
||||
Width = 150
|
||||
DefaultItemHeight = 19
|
||||
@ -434,7 +434,7 @@ object Form1: TForm1
|
||||
end
|
||||
inherited editSearchList: TEdit
|
||||
Height = 27
|
||||
Top = 291
|
||||
Top = 266
|
||||
Width = 150
|
||||
OnExit = editSearchListExit
|
||||
OnKeyDown = editSearchListKeyDown
|
||||
|
@ -1,22 +1,22 @@
|
||||
{ This is an automatically generated lazarus resource file }
|
||||
|
||||
LazarusResources.Add('TForm1','FORMDATA',[
|
||||
'TPF0'#6'TForm1'#5'Form1'#4'Left'#3'<'#1#6'Height'#3'-'#2#3'Top'#2'i'#5'Width'
|
||||
+#3#222#2#13'ActiveControl'#7#11'ScriptPanel'#7'Caption'#6#16'THA FUKING SIMB'
|
||||
+'A'#12'ClientHeight'#3#20#2#11'ClientWidth'#3#222#2#10'KeyPreview'#9#4'Menu'
|
||||
+#7#8'MainMenu'#7'OnClose'#7#9'FormClose'#8'OnCreate'#7#10'FormCreate'#9'OnDe'
|
||||
+'stroy'#7#11'FormDestroy'#10'OnShortCut'#7#13'FormShortCuts'#8'Position'#7#14
|
||||
+'poScreenCenter'#10'LCLVersion'#6#6'0.9.29'#7'Visible'#9#0#8'TToolBar'#8'Too'
|
||||
+'lBar1'#4'Left'#2#0#6'Height'#2#24#3'Top'#2#0#5'Width'#3#222#2#7'Caption'#6#8
|
||||
+'ToolBar1'#6'Images'#7#17'Mufasa_Image_List'#14'ParentShowHint'#8#8'ShowHint'
|
||||
+#9#8'TabOrder'#2#0#0#11'TToolButton'#6'TB_Run'#4'Left'#3#168#0#4'Hint'#6#3'R'
|
||||
+'un'#3'Top'#2#2#6'Action'#7#15'ActionRunScript'#10'ImageIndex'#2#6#0#0#11'TT'
|
||||
+'oolButton'#8'TB_Pause'#4'Left'#3#191#0#4'Hint'#6#5'Pause'#3'Top'#2#2#6'Acti'
|
||||
+'on'#7#17'ActionPauseScript'#7'Enabled'#8#10'ImageIndex'#2#5#0#0#11'TToolBut'
|
||||
+'ton'#7'TB_Stop'#4'Left'#3#214#0#4'Hint'#6#4'Stop'#3'Top'#2#2#6'Action'#7#16
|
||||
+'ActionStopScript'#7'Enabled'#8#10'ImageIndex'#2#7#0#0#11'TToolButton'#11'To'
|
||||
+'olButton1'#4'Left'#3#237#0#3'Top'#2#2#5'Width'#2#3#7'Caption'#6#11'ToolButt'
|
||||
+'on1'#5'Style'#7#10'tbsDivider'#0#0#11'TToolButton'#9'TB_NewTab'#4'Left'#3
|
||||
'TPF0'#6'TForm1'#5'Form1'#4'Left'#3'Q'#2#6'Height'#3'-'#2#3'Top'#3'A'#1#5'Wid'
|
||||
+'th'#3#222#2#13'ActiveControl'#7#11'ScriptPanel'#7'Caption'#6#16'THA FUKING '
|
||||
+'SIMBA'#12'ClientHeight'#3#20#2#11'ClientWidth'#3#222#2#10'KeyPreview'#9#4'M'
|
||||
+'enu'#7#8'MainMenu'#7'OnClose'#7#9'FormClose'#8'OnCreate'#7#10'FormCreate'#9
|
||||
+'OnDestroy'#7#11'FormDestroy'#10'OnShortCut'#7#13'FormShortCuts'#8'Position'
|
||||
+#7#14'poScreenCenter'#10'LCLVersion'#6#6'0.9.29'#7'Visible'#9#0#8'TToolBar'#8
|
||||
+'ToolBar1'#4'Left'#2#0#6'Height'#2#24#3'Top'#2#0#5'Width'#3#222#2#7'Caption'
|
||||
+#6#8'ToolBar1'#6'Images'#7#17'Mufasa_Image_List'#14'ParentShowHint'#8#8'Show'
|
||||
+'Hint'#9#8'TabOrder'#2#0#0#11'TToolButton'#6'TB_Run'#4'Left'#3#168#0#4'Hint'
|
||||
+#6#3'Run'#3'Top'#2#2#6'Action'#7#15'ActionRunScript'#10'ImageIndex'#2#6#0#0
|
||||
+#11'TToolButton'#8'TB_Pause'#4'Left'#3#191#0#4'Hint'#6#5'Pause'#3'Top'#2#2#6
|
||||
+'Action'#7#17'ActionPauseScript'#7'Enabled'#8#10'ImageIndex'#2#5#0#0#11'TToo'
|
||||
+'lButton'#7'TB_Stop'#4'Left'#3#214#0#4'Hint'#6#4'Stop'#3'Top'#2#2#6'Action'#7
|
||||
+#16'ActionStopScript'#7'Enabled'#8#10'ImageIndex'#2#7#0#0#11'TToolButton'#11
|
||||
+'ToolButton1'#4'Left'#3#237#0#3'Top'#2#2#5'Width'#2#3#7'Caption'#6#11'ToolBu'
|
||||
+'tton1'#5'Style'#7#10'tbsDivider'#0#0#11'TToolButton'#9'TB_NewTab'#4'Left'#3
|
||||
+#240#0#4'Hint'#6#7'Add tab'#3'Top'#2#2#6'Action'#7#12'ActionNewTab'#0#0#11'T'
|
||||
+'ToolButton'#11'TB_CloseTab'#4'Left'#3#7#1#4'Hint'#6#9'Close tab'#3'Top'#2#2
|
||||
+#6'Action'#7#14'ActionCloseTab'#0#0#11'TToolButton'#11'ToolButton4'#4'Left'#3
|
||||
@ -53,27 +53,27 @@ LazarusResources.Add('TForm1','FORMDATA',[
|
||||
+'T_Paste'#4'Left'#3#142#0#3'Top'#2#2#6'Action'#7#11'ActionPaste'#0#0#11'TToo'
|
||||
+'lButton'#11'ToolButton9'#4'Left'#3#165#0#3'Top'#2#2#5'Width'#2#3#7'Caption'
|
||||
+#6#11'ToolButton9'#5'Style'#7#10'tbsDivider'#0#0#0#10'TStatusBar'#9'StatusBa'
|
||||
+'r'#4'Left'#2#0#6'Height'#2#21#3'Top'#3#24#2#5'Width'#3#222#2#6'Panels'#14#1
|
||||
+'r'#4'Left'#2#0#6'Height'#2#21#3'Top'#3#255#1#5'Width'#3#222#2#6'Panels'#14#1
|
||||
+#5'Width'#2'<'#0#1#4'Text'#6#8'Untitled'#5'Width'#3#150#0#0#1#5'Width'#2'2'#0
|
||||
+#0#11'SimplePanel'#8#0#0#6'TPanel'#9'PanelMemo'#4'Left'#2#0#6'Height'#3#154#0
|
||||
+#3'Top'#3'~'#1#5'Width'#3#222#2#5'Align'#7#8'alBottom'#12'ClientHeight'#3#154
|
||||
+#3'Top'#3'e'#1#5'Width'#3#222#2#5'Align'#7#8'alBottom'#12'ClientHeight'#3#154
|
||||
+#0#11'ClientWidth'#3#222#2#8'TabOrder'#2#2#0#5'TMemo'#5'Memo1'#4'Left'#2#1#6
|
||||
+'Height'#3#152#0#3'Top'#2#1#5'Width'#3#220#2#5'Align'#7#8'alClient'#10'Scrol'
|
||||
+'lBars'#7#10'ssAutoBoth'#8'TabOrder'#2#0#0#0#0#9'TSplitter'#19'SplitterMemoS'
|
||||
+'ynedit'#6'Cursor'#7#8'crVSplit'#4'Left'#2#0#6'Height'#2#5#3'Top'#3'y'#1#5'W'
|
||||
+'ynedit'#6'Cursor'#7#8'crVSplit'#4'Left'#2#0#6'Height'#2#5#3'Top'#3'`'#1#5'W'
|
||||
+'idth'#3#222#2#5'Align'#7#8'alBottom'#12'ResizeAnchor'#7#8'akBottom'#0#0#6'T'
|
||||
+'Panel'#11'ScriptPanel'#4'Left'#2#0#6'Height'#3'a'#1#3'Top'#2#24#5'Width'#3
|
||||
+'Panel'#11'ScriptPanel'#4'Left'#2#0#6'Height'#3'H'#1#3'Top'#2#24#5'Width'#3
|
||||
+#222#2#5'Align'#7#8'alClient'#10'BevelOuter'#7#6'bvNone'#12'ClientHeight'#3
|
||||
+'a'#1#11'ClientWidth'#3#222#2#8'DockSite'#9#8'TabOrder'#2#4#10'OnDockDrop'#7
|
||||
+'H'#1#11'ClientWidth'#3#222#2#8'DockSite'#9#8'TabOrder'#2#4#10'OnDockDrop'#7
|
||||
,#19'ScriptPanelDockDrop'#10'OnDockOver'#7#19'ScriptPanelDockOver'#0#12'TPage'
|
||||
+'Control'#12'PageControl1'#4'Left'#3#155#0#6'Height'#3'>'#1#3'Top'#2#0#5'Wid'
|
||||
+'Control'#12'PageControl1'#4'Left'#3#155#0#6'Height'#3'%'#1#3'Top'#2#0#5'Wid'
|
||||
+'th'#3'C'#2#5'Align'#7#8'alClient'#6'Images'#7#17'Mufasa_Image_List'#9'Popup'
|
||||
+'Menu'#7#8'TabPopup'#8'TabOrder'#2#0#8'OnChange'#7#18'PageControl1Change'#10
|
||||
+'OnChanging'#7#20'PageControl1Changing'#14'OnContextPopup'#7#24'PageControl1'
|
||||
+'ContextPopup'#10'OnDragDrop'#7#20'PageControl1DragDrop'#10'OnDragOver'#7#20
|
||||
+'PageControl1DragOver'#11'OnMouseDown'#7#21'PageControl1MouseDown'#9'OnMouse'
|
||||
+'Up'#7#19'PageControl1MouseUp'#13'OnPageChanged'#7#18'PageControl1Change'#0#0
|
||||
+#6'TPanel'#11'SearchPanel'#4'Left'#2#0#6'Height'#2'#'#3'Top'#3'>'#1#5'Width'
|
||||
+#6'TPanel'#11'SearchPanel'#4'Left'#2#0#6'Height'#2'#'#3'Top'#3'%'#1#5'Width'
|
||||
+#3#222#2#5'Align'#7#8'alBottom'#10'BevelOuter'#7#7'bvSpace'#12'ClientHeight'
|
||||
+#2'#'#11'ClientWidth'#3#222#2#8'TabOrder'#2#1#7'Visible'#8#0#12'TSpeedButton'
|
||||
+#17'SpeedButtonSearch'#4'Left'#2' '#6'Height'#2#19#3'Top'#2#7#5'Width'#2#16#5
|
||||
@ -155,14 +155,14 @@ LazarusResources.Add('TForm1','FORMDATA',[
|
||||
+#25'LabeledEditSearchKeyPress'#0#0#9'TCheckBox'#17'CheckBoxMatchCase'#4'Left'
|
||||
+#3'@'#1#6'Height'#2#22#3'Top'#2#7#5'Width'#2'b'#7'Caption'#6#10'Match case'#7
|
||||
+'OnClick'#7#22'CheckBoxMatchCaseClick'#8'TabOrder'#2#1#0#0#0#9'TSplitter'#20
|
||||
+'SplitterFunctionList'#4'Left'#3#150#0#6'Height'#3'>'#1#3'Top'#2#0#5'Width'#2
|
||||
+'SplitterFunctionList'#4'Left'#3#150#0#6'Height'#3'%'#1#3'Top'#2#0#5'Width'#2
|
||||
+#5#11'OnCanResize'#7#29'SplitterFunctionListCanResize'#7'Visible'#8#0#0#244
|
||||
+#18'TFunctionListFrame'#15'frmFunctionList'#6'Height'#3'>'#1#5'Width'#3#150#0
|
||||
+#12'ClientHeight'#3'>'#1#11'ClientWidth'#3#150#0#9'OnEndDock'#13#8'TabOrder'
|
||||
+#2#3#0#241#9'TTreeView'#12'FunctionList'#6'Height'#3#13#1#3'Top'#2#22#5'Widt'
|
||||
+'h'#3#150#0#17'DefaultItemHeight'#2#19#8'OnChange'#7#18'FunctionListChange'
|
||||
+#18'TFunctionListFrame'#15'frmFunctionList'#6'Height'#3'%'#1#5'Width'#3#150#0
|
||||
+#12'ClientHeight'#3'%'#1#11'ClientWidth'#3#150#0#9'OnEndDock'#13#8'TabOrder'
|
||||
+#2#3#0#241#9'TTreeView'#12'FunctionList'#6'Height'#3#244#0#3'Top'#2#22#5'Wid'
|
||||
+'th'#3#150#0#17'DefaultItemHeight'#2#19#8'OnChange'#7#18'FunctionListChange'
|
||||
+#10'OnDeletion'#13#7'OnEnter'#7#17'FunctionListEnter'#6'OnExit'#7#16'Functio'
|
||||
+'nListExit'#0#0#241#5'TEdit'#14'editSearchList'#6'Height'#2#27#3'Top'#3'#'#1
|
||||
+'nListExit'#0#0#241#5'TEdit'#14'editSearchList'#6'Height'#2#27#3'Top'#3#10#1
|
||||
+#5'Width'#3#150#0#6'OnExit'#7#18'editSearchListExit'#9'OnKeyDown'#7#21'editS'
|
||||
+'earchListKeyDown'#10'OnKeyPress'#7#22'editSearchListKeyPress'#0#0#241#6'TLa'
|
||||
+'bel'#17'FunctionListLabel'#6'Height'#2#18#5'Width'#3#146#0#0#0#0#0#9'TMainM'
|
||||
|
@ -33,7 +33,7 @@ uses
|
||||
{$ifdef linux}cthreads,{$endif}Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
|
||||
StdCtrls, Menus, ComCtrls, ExtCtrls, SynEdit, SynHighlighterPas, SynMemo,
|
||||
//Client,
|
||||
MufasaTypes,
|
||||
MufasaTypes, plugins,
|
||||
mmlpsthread,synedittypes,
|
||||
window, // for the comp picker and selector
|
||||
colourpicker, framescript, windowselector, lcltype, ActnList, StdActns,
|
||||
@ -309,6 +309,7 @@ type
|
||||
OCR_Fonts: TMOCR;
|
||||
Picker: TMColorPicker;
|
||||
Selector: TMWindowSelector;
|
||||
PluginsGlob: TMPlugins;
|
||||
procedure FunctionListShown( ShowIt : boolean);
|
||||
property ScriptState : TScriptState read GetScriptState write SetScriptState;
|
||||
procedure SafeCallThread;
|
||||
@ -351,7 +352,7 @@ var
|
||||
|
||||
implementation
|
||||
uses
|
||||
lclintf,plugins,
|
||||
lclintf,
|
||||
syncobjs, // for the critical sections
|
||||
debugimage,
|
||||
bitmaps,
|
||||
|
@ -29,7 +29,9 @@ unit mmlpsthread;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, client, uPSComponent,uPSCompiler,uPSRuntime,stdCtrls, uPSPreProcessor,MufasaTypes, web,bitmaps;
|
||||
Classes, SysUtils, client, uPSComponent, uPSCompiler,
|
||||
uPSRuntime, stdCtrls, uPSPreProcessor, MufasaTypes,
|
||||
web, bitmaps, plugins;
|
||||
|
||||
type
|
||||
{ TMMLPSThread }
|
||||
@ -86,6 +88,7 @@ type
|
||||
//DebugTo : TMemo;
|
||||
DebugTo: TWritelnProc;
|
||||
DebugImg : TDbgImgInfo;
|
||||
PluginsGlob: TMPlugins;
|
||||
PluginsToload : Array of integer;
|
||||
FOnError : TOnError;
|
||||
procedure OnCompile(Sender: TPSScript);
|
||||
|
@ -34,7 +34,7 @@ unit plugins;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, dynlibs;
|
||||
Classes, SysUtils, dynlibs, LibLoader;
|
||||
|
||||
type
|
||||
TMPluginMethod = record
|
||||
@ -48,28 +48,6 @@ type
|
||||
end;
|
||||
TMPluginArray = array of TMPlugin;
|
||||
|
||||
TGenericLib = record
|
||||
filename: string;
|
||||
handle: TLibHandle;
|
||||
end;
|
||||
TGenericLibArray = array of TGenericLib;
|
||||
|
||||
TGenericLoader = class(TObject)
|
||||
private
|
||||
PluginLen : integer;
|
||||
Loaded: TGenericLibArray;
|
||||
procedure FreePlugins;
|
||||
protected
|
||||
function InitPlugin(plugin: TLibHandle): boolean; virtual; abstract;
|
||||
public
|
||||
PluginDirs : TStringList;
|
||||
constructor Create;
|
||||
destructor Destroy; override;
|
||||
procedure ValidateDirs;
|
||||
procedure LoadPluginsDir(DirIndex : integer);
|
||||
function LoadPlugin(PluginName : string) : integer;
|
||||
end;
|
||||
|
||||
|
||||
{ TMPlugins }
|
||||
|
||||
@ -91,115 +69,6 @@ uses
|
||||
|
||||
{ TMPlugins }
|
||||
|
||||
procedure TGenericLoader.FreePlugins;
|
||||
var
|
||||
I : integer;
|
||||
begin
|
||||
for i := 0 to PluginLen - 1 do
|
||||
begin;
|
||||
if (Loaded[i].handle > 0) then
|
||||
try
|
||||
Writeln(inttostr(I));
|
||||
FreeLibrary(Loaded[i].handle);
|
||||
except
|
||||
end;
|
||||
end;
|
||||
SetLength(Loaded,0);
|
||||
PluginLen:= 0;
|
||||
end;
|
||||
|
||||
procedure TGenericLoader.ValidateDirs;
|
||||
var
|
||||
i : integer;
|
||||
TempStr : string;
|
||||
begin
|
||||
for i := 0 to PluginDirs.Count - 1 do
|
||||
begin;
|
||||
if DirectoryExists(PluginDirs.Strings[i]) = false then
|
||||
raise Exception.createFMT('Directory(%s) does not exist',[PluginDirs[i]]);
|
||||
TempStr := PluginDirs.Strings[i];
|
||||
if (TempStr[Length(TempStr)] <> DS) then
|
||||
begin;
|
||||
if (TempStr[Length(TempStr)] = '\') or (TempStr[Length(TempStr)] = '/') then
|
||||
TempStr[Length(TempStr)] := DS
|
||||
else
|
||||
TempStr := TempStr + DS;
|
||||
PluginDirs.Strings[i] := TempStr;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TGenericLoader.LoadPluginsDir(DirIndex: integer);
|
||||
var
|
||||
PlugExt: String = {$IFDEF LINUX}'*.so';{$ELSE}'*.dll';{$ENDIF}
|
||||
FileSearcher : TSearchRec;
|
||||
begin
|
||||
if (DirIndex < 0) or (DirIndex >= PluginDirs.Count) then
|
||||
Exit;
|
||||
if FindFirst(PluginDirs.Strings[DirIndex] + PlugExt, faAnyFile, FileSearcher) <> 0 then
|
||||
begin;
|
||||
FindClose(FileSearcher);
|
||||
Exit;
|
||||
end;
|
||||
repeat
|
||||
LoadPlugin(FileSearcher.Name);
|
||||
until FindNext(FileSearcher) <> 0;
|
||||
FindClose(FileSearcher);
|
||||
end;
|
||||
|
||||
|
||||
function TGenericLoader.LoadPlugin(PluginName: string): Integer;
|
||||
var
|
||||
i, ii : integer;
|
||||
Status : LongInt;
|
||||
PlugExt: String = {$IFDEF LINUX}'.so';{$ELSE}'.dll';{$ENDIF}
|
||||
begin
|
||||
ii := -1;
|
||||
result := -1;
|
||||
if PluginDirs.Count = 0 then
|
||||
Exit;
|
||||
ValidateDirs;
|
||||
PluginName := ExtractFileNameWithoutExt(PluginName);
|
||||
for i := 0 to PluginDirs.Count - 1 do
|
||||
if FileExists(PluginDirs.Strings[i] + Pluginname + PlugExt) then
|
||||
begin;
|
||||
if ii <> -1 then
|
||||
Raise Exception.CreateFmt('Plugin(%s) has been found multiple times',[PluginName]);
|
||||
ii := i;
|
||||
end;
|
||||
if ii = -1 then
|
||||
raise Exception.CreateFMT('Plugins(%s) has not been found',[PluginName]);
|
||||
for i := 0 to PluginLen - 1 do
|
||||
if Loaded[i].filename = (PluginDirs.Strings[ii] + PluginName + PlugExt) then
|
||||
Exit(i);
|
||||
SetLength(Loaded,PluginLen + 1);
|
||||
Writeln(Format('Loading plugin %s at %s',[PluginName,PluginDirs.Strings[ii]]));
|
||||
Loaded[PluginLen].filename:= PluginDirs.Strings[ii] + Pluginname + PlugExt;
|
||||
Loaded[PluginLen].handle:= LoadLibrary(PChar(Loaded[PluginLen].filename));
|
||||
if Loaded[PluginLen].handle = 0 then
|
||||
Raise Exception.CreateFMT('Error loading plugin %s',[Loaded[PluginLen].filename]);
|
||||
if InitPlugin(Loaded[PluginLen].handle) then
|
||||
inc(PluginLen)
|
||||
else
|
||||
FreeLibrary(Loaded[PluginLen].handle);
|
||||
Result := PluginLen;
|
||||
end;
|
||||
|
||||
|
||||
constructor TGenericLoader.Create;
|
||||
begin
|
||||
inherited Create;
|
||||
PluginLen := 0;
|
||||
PluginDirs := TStringList.Create;
|
||||
end;
|
||||
|
||||
destructor TGenericLoader.Destroy;
|
||||
begin
|
||||
FreePlugins;
|
||||
PluginDirs.Free;
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
function TMPlugins.InitPlugin(plugin: TLibHandle): boolean;
|
||||
var
|
||||
pntrArrc : function : integer; stdcall;
|
||||
|
171
trunk/Units/MMLCore/libloader.pas
Normal file
171
trunk/Units/MMLCore/libloader.pas
Normal file
@ -0,0 +1,171 @@
|
||||
{
|
||||
This file is part of the Mufasa Macro Library (MML)
|
||||
Copyright (c) 2009 by Raymond van Venetië and Merlijn Wajer
|
||||
|
||||
MML is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
MML is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with MML. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
See the file COPYING, included in this distribution,
|
||||
for details about the copyright.
|
||||
|
||||
Super unit for loading libraries for the Mufasa Macro Library
|
||||
}
|
||||
|
||||
unit libloader;
|
||||
|
||||
{$mode objfpc}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, dynlibs;
|
||||
|
||||
type
|
||||
TGenericLib = record
|
||||
filename: string;
|
||||
handle: TLibHandle;
|
||||
end;
|
||||
TGenericLibArray = array of TGenericLib;
|
||||
|
||||
TGenericLoader = class(TObject)
|
||||
private
|
||||
PluginLen : integer;
|
||||
Loaded: TGenericLibArray;
|
||||
procedure FreePlugins;
|
||||
protected
|
||||
function InitPlugin(plugin: TLibHandle): boolean; virtual; abstract;
|
||||
public
|
||||
PluginDirs : TStringList;
|
||||
constructor Create;
|
||||
destructor Destroy; override;
|
||||
procedure ValidateDirs;
|
||||
procedure LoadPluginsDir(DirIndex : integer);
|
||||
function LoadPlugin(PluginName : string) : integer;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
MufasaTypes,FileUtil;
|
||||
|
||||
procedure TGenericLoader.FreePlugins;
|
||||
var
|
||||
I : integer;
|
||||
begin
|
||||
for i := 0 to PluginLen - 1 do
|
||||
begin;
|
||||
if (Loaded[i].handle > 0) then
|
||||
try
|
||||
Writeln(inttostr(I));
|
||||
FreeLibrary(Loaded[i].handle);
|
||||
except
|
||||
end;
|
||||
end;
|
||||
SetLength(Loaded,0);
|
||||
PluginLen:= 0;
|
||||
end;
|
||||
|
||||
procedure TGenericLoader.ValidateDirs;
|
||||
var
|
||||
i : integer;
|
||||
TempStr : string;
|
||||
begin
|
||||
for i := 0 to PluginDirs.Count - 1 do
|
||||
begin;
|
||||
if DirectoryExists(PluginDirs.Strings[i]) = false then
|
||||
raise Exception.createFMT('Directory(%s) does not exist',[PluginDirs[i]]);
|
||||
TempStr := PluginDirs.Strings[i];
|
||||
if (TempStr[Length(TempStr)] <> DS) then
|
||||
begin;
|
||||
if (TempStr[Length(TempStr)] = '\') or (TempStr[Length(TempStr)] = '/') then
|
||||
TempStr[Length(TempStr)] := DS
|
||||
else
|
||||
TempStr := TempStr + DS;
|
||||
PluginDirs.Strings[i] := TempStr;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TGenericLoader.LoadPluginsDir(DirIndex: integer);
|
||||
var
|
||||
PlugExt: String = {$IFDEF LINUX}'*.so';{$ELSE}'*.dll';{$ENDIF}
|
||||
FileSearcher : TSearchRec;
|
||||
begin
|
||||
if (DirIndex < 0) or (DirIndex >= PluginDirs.Count) then
|
||||
Exit;
|
||||
if FindFirst(PluginDirs.Strings[DirIndex] + PlugExt, faAnyFile, FileSearcher) <> 0 then
|
||||
begin;
|
||||
FindClose(FileSearcher);
|
||||
Exit;
|
||||
end;
|
||||
repeat
|
||||
LoadPlugin(FileSearcher.Name);
|
||||
until FindNext(FileSearcher) <> 0;
|
||||
FindClose(FileSearcher);
|
||||
end;
|
||||
|
||||
|
||||
function TGenericLoader.LoadPlugin(PluginName: string): Integer;
|
||||
var
|
||||
i, ii : integer;
|
||||
Status : LongInt;
|
||||
PlugExt: String = {$IFDEF LINUX}'.so';{$ELSE}'.dll';{$ENDIF}
|
||||
begin
|
||||
ii := -1;
|
||||
result := -1;
|
||||
if PluginDirs.Count = 0 then
|
||||
Exit;
|
||||
ValidateDirs;
|
||||
PluginName := ExtractFileNameWithoutExt(PluginName);
|
||||
for i := 0 to PluginDirs.Count - 1 do
|
||||
if FileExists(PluginDirs.Strings[i] + Pluginname + PlugExt) then
|
||||
begin;
|
||||
if ii <> -1 then
|
||||
Raise Exception.CreateFmt('Plugin(%s) has been found multiple times',[PluginName]);
|
||||
ii := i;
|
||||
end;
|
||||
if ii = -1 then
|
||||
raise Exception.CreateFMT('Plugins(%s) has not been found',[PluginName]);
|
||||
for i := 0 to PluginLen - 1 do
|
||||
if Loaded[i].filename = (PluginDirs.Strings[ii] + PluginName + PlugExt) then
|
||||
Exit(i);
|
||||
SetLength(Loaded,PluginLen + 1);
|
||||
Writeln(Format('Loading plugin %s at %s',[PluginName,PluginDirs.Strings[ii]]));
|
||||
Loaded[PluginLen].filename:= PluginDirs.Strings[ii] + Pluginname + PlugExt;
|
||||
Loaded[PluginLen].handle:= LoadLibrary(PChar(@Loaded[PluginLen].filename));
|
||||
if Loaded[PluginLen].handle = 0 then
|
||||
Raise Exception.CreateFMT('Error loading plugin %s',[Loaded[PluginLen].filename]);
|
||||
if InitPlugin(Loaded[PluginLen].handle) then
|
||||
inc(PluginLen)
|
||||
else
|
||||
FreeLibrary(Loaded[PluginLen].handle);
|
||||
Result := PluginLen;
|
||||
end;
|
||||
|
||||
|
||||
constructor TGenericLoader.Create;
|
||||
begin
|
||||
inherited Create;
|
||||
PluginLen := 0;
|
||||
PluginDirs := TStringList.Create;
|
||||
end;
|
||||
|
||||
destructor TGenericLoader.Destroy;
|
||||
begin
|
||||
FreePlugins;
|
||||
PluginDirs.Free;
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
@ -29,7 +29,7 @@ interface
|
||||
|
||||
|
||||
uses
|
||||
Classes, SysUtils,plugins;
|
||||
Classes, SysUtils, LibLoader;
|
||||
const
|
||||
DS = DirectorySeparator;
|
||||
MEOL = {$ifdef MSWINDOWS}#13+{$endif}#10;
|
||||
@ -115,8 +115,6 @@ type
|
||||
SubPoints: TDTMPointDefArray;
|
||||
end;
|
||||
|
||||
var
|
||||
PluginsGlob : TMPlugins;
|
||||
type
|
||||
VirtualKeyInfo = record
|
||||
Str : string;
|
||||
|
Loading…
Reference in New Issue
Block a user