SRL Archive - Help

TMufasaTypes in plugins?


marpis

2011-12-30 17:20:01

How can I use TMufasaTypes in my own plugins?
I've had to post every phase of the SPS 2.0 source to the forums to be built, because I don't know how to properly make plugins for Simba.
If I knew, SPS 2.0 would probably be on beta stage by now.

So please, write me a short tutorial on how to use Lazarus to build plugins to Simba. I already have Lazarus and know how to build .dll's, but I don't know how to use the classes (or whatever they are after "uses")

Wizzup?

2012-01-02 19:26:14

I don't think that would be a problem. Sorry, I never saw this thread.

Perhaps you could give building plugins yourself another try?

marpis

2012-01-08 05:12:48

From: Wizzup?
I don't think that would be a problem. Sorry, I never saw this thread.

Perhaps you could give building plugins yourself another try?


I tried. I asked n3ss3s about the MufasaTypes, he responded something like "they're from the Simba source" which tells me nothing really. What kind of a file is it? Where to get it? Where to put it? Does it need any "installation" inside Lazarus?

KingKong

2012-01-08 05:29:36

check ur pm.

Wizzup?

2012-01-08 05:36:08

From: marpis
I tried. I asked n3ss3s about the MufasaTypes, he responded something like "they're from the Simba source" which tells me nothing really. What kind of a file is it? Where to get it? Where to put it? Does it need any "installation" inside Lazarus?


You just need to include the Simba/MMLCore folder in your units include path. (Set this in the project options). The file should be there. Then you put it in your uses clause.

Markus

2012-01-08 05:36:18

Checkout simba source from git, then in project options (of SPS), you can set unit paths. Add the path to the MMLCore folder (it's in units/), which contains the file Mufasatypes.pas

Nava2

2012-01-08 09:58:43

then you can just call:

"uses mufasatypes"

I did it when I revamped the 1.0 plugin.

marpis

2012-01-09 04:14:00

From: Markus
Checkout simba source from git, then in project options (of SPS), you can set unit paths. Add the path to the MMLCore folder (it's in units/), which contains the file Mufasatypes.pas


From: Nava2
then you can just call:

"uses mufasatypes"

I did it when I revamped the 1.0 plugin.


Ok got rid of that error so I assume it now finds the mufasatypes.
But now I'm getting
D:\Ohjelmia\Simba\Units\MMLCore\bitmaps.pas(136,11) Fatal: Can't find unit DCPbase64 used by bitmaps

KingKong

2012-01-09 04:23:40

copy dcpbase64.pas to the same folder as mufasatypes. Also check your PM.

Coh3n

2012-01-09 04:32:57

I hope you can figure it out, marpis. I gave up on it long ago as every time one error came up, I got another, and another. I just got way to frustrated. :(

marpis

2012-01-09 13:30:26

D:\Ohjelmia\Simba\Units\MMLCore\mufasatypes.pas(404) Warning: Implicit uses of Variants unit

I'm starting to be scared this will never work…

Dgby714

2012-01-09 13:46:20

From: marpis
D:\Ohjelmia\Simba\Units\MMLCore\mufasatypes.pas(404) Warning: Implicit uses of Variants unit

I'm starting to be scared this will never work…


That is just a warning.
The DCP not found error is because you need to add "Units/Misc/DCPCrypt" to your paths.

Here is the makefile I use to build plugins.
.PHONY: all clean

PROJNAME := libTest
SIMBPATH := ../Simba
CPU_FAMILY := i386
TARGET := win32

CC := fpc
SIMBUNITS := -Fu$(SIMBPATH)/Units/MMLCore -Fu$(SIMBPATH)/Units/Misc -Fu$(SIMBPATH)/Units/Misc/DCPCrypt
UNITS := -Fu. $(SIMBUNITS)
FLAGS := -MObjFPC -Scghi -WR -O1 -g -gl -vewnhi -l -FUbuild/ -T$(TARGET) -P$(CPU_FAMILY) $(UNITS)

EXT := .so
ifeq ($(WIDGETSET),win32)
EXT := .dll
endif

all: Makefile $(PROJNAME)$(EXT)


$(PROJNAME)$(EXT): $(PROJNAME).pas
-@mkdir -p build
@$(CC) $(FLAGS) $(PROJNAME).pas

clean:
-@rm -rf build/ $(PROJNAME)$(EXT)

marpis

2012-01-09 14:14:57

D:\Ohjelmia\Simba\Units\MMLCore\os_windows.pas(30,94) Fatal: Can't find unit WinKeyInput used by os_windows

:( Couldn't find WinKeyInput.pas anywhere in /Simba/
Also I have no idea what's a makefile.

Dgby714

2012-01-09 14:20:19

From: marpis
D:\Ohjelmia\Simba\Units\MMLCore\os_windows.pas(30,94) Fatal: Can't find unit WinKeyInput used by os_windows

:( Couldn't find WinKeyInput.pas anywhere in /Simba/
Also I have no idea what's a makefile.


$(LAZPATH)/components/mouseandkeyinput/

LAZPATH is where Lazarus is installed.

Wizzup?

2012-01-09 14:24:36

From: marpis
Ok got rid of that error so I assume it now finds the mufasatypes.
But now I'm getting


You need to find out in which Units/ folder that unit is. (It is in the Simba git repo) Then add that folder to your units path. Keep doing that until it complains about something else.