Skip to content
Low-level programming · Higher-level thinking
Login Register
Forum / Requests and Feedback

PlugIn switch

A community discussion post from the original code:zIRON forum.

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

PlugIn switch

Hi

sometimes any user does not need a certain PlugIn , so that we can add a feature that allows

the user to switch on or off a certain PlugIn.

so what do you think ?

http://www.freewebs.com/ogremagic/index.htm

Replies

Colin admin
Posts
928
Threads
49
Location
Bulgaria

tbh, i was thinking about making it a requirement for the plugins to be added in the source such as

#plugins a.dll, b.dll, c.dll;

that way it would be certain that code that is pasted would be easily checked against which plugins are used, but i am not too sure yet.

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

nice , but remove the term '.dll' , just supply the filename without it's extension.

http://www.freewebs.com/ogremagic/index.htm

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

also suppose that an application needs a certain plugin version , i think the following may be nice , what is your opinion ?

#plugins a 1.5 , b , c 0.1;

so

plugin required a is version 1.5

plugin required b is version default

plugin required c is version 0.1

http://www.freewebs.com/ogremagic/index.htm

Colin admin
Posts
928
Threads
49
Location
Bulgaria

actually i am still deciding whether to add it like this since it loses some of the plugin usage ability, such as custom program types, so i believe i may make it so you need to add a plugin file such as an ini.

myapp.zir -> your code

myapp.plug -> plugins required (and versions, which is a good idea)

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

ok , i think put it within a code will be better,

any way you can allow the two ways , so Ziron will read ini file and knows which plugin will

be loaded , and also in text code as #plugin directive.

http://www.freewebs.com/ogremagic/index.htm

Colin admin
Posts
928
Threads
49
Location
Bulgaria

I don't believe having both would be a good idea, because it can lead to confusion and if the plugin directive is placed somewhere deep in the code (hard to find) in 1000s of lines of code...

also the main reason is because for example a program must begin with:

program type 'name';

now lets say some plugin wants to add a custom program type, e.g. they want to develop a plugin to output coff object files, or linux bin files etc, with a seperate file it is easy to find out which plugins are used and also allows the assembler to quickly load the plugins before it begins processing anything else, since each plugin has its own code buffer, it is better to be done all at once.

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

ok now i see your point.

http://www.freewebs.com/ogremagic/index.htm