Log in

View Full Version : TMufasaTypes in plugins?



marpis
12-30-2011, 10:20 PM
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?
01-03-2012, 12:26 AM
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
01-08-2012, 10:12 AM
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
01-08-2012, 10:29 AM
check ur pm.

Wizzup?
01-08-2012, 10:36 AM
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
01-08-2012, 10:36 AM
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
01-08-2012, 02:58 PM
then you can just call:

"uses mufasatypes"

I did it when I revamped the 1.0 plugin.

marpis
01-09-2012, 09:14 AM
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


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
01-09-2012, 09:23 AM
copy dcpbase64.pas to the same folder as mufasatypes. Also check your PM.

Coh3n
01-09-2012, 09:32 AM
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
01-09-2012, 06:30 PM
D:\Ohjelmia\Simba\Units\MMLCore\mufasatypes.pas(40 4) Warning: Implicit uses of Variants unit

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

Dgby714
01-09-2012, 06:46 PM
D:\Ohjelmia\Simba\Units\MMLCore\mufasatypes.pas(40 4) 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
01-09-2012, 07:14 PM
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
01-09-2012, 07:20 PM
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?
01-09-2012, 07:24 PM
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.