As I said in your ArkInventory thread, OptDeps and X-Embeds exist only to pull in the standalone versions of libraries. In the case of LSM3, the standalone version includes LibStub and CallbackHandler.
just want to make sure i get it right because i cant test it in standalone
When embedding a library, and by that i mean svn:externals and embeds.xml, it is necessary to include that library's upstream dependencies and components as well. In the case of LSM3, that means embeddding LibStub and CallbackHandler-1.0 as well.
i have LSM3, LS and CBH in my svn:externals and embed.xml, LSM3 is in my toc under optdeps and xembeds (ive removed LS and CBH from both of those toc fields)
OptDepping and Embedding are two separate methods of using libraries. You need to use both correctly.
thats what im trying to make sure i do and as i dont understand claerly how the whole thing works so it's easier to confirm everything with people who do know what theyre doing. (and thanks for the help with it)
coming from a point of view where im still using ace2, my mod currently does not need libstub nor callbackhandler, i just want to embed libsharedmedia3 like any other lib, so
local SM = LibStub:GetLibrary("LibSharedMedia-3.0")
if i do that i presume i have to include libstub/ace3 in my opt and req deps as my mod is now using it directly?
(i currently have SharedMedia = AceLibrary( "LibSharedMedia-3.0" ) )
SM.RegisterCallback(MyAddon, "LibSharedMedia_Registered", "UpdateMedia")
SM.RegisterCallback(MyAddon, "LibSharedMedia_SetGlobal", "UpdateMedia")
same again? i presume i have to include callbackhandler in my opt and req deps as my mod is now using it directly?
just trying to figure this out as currently i just want to embed LSM3 like any other normal lib but it barfs because LS and CBH are not there (i presume that LSM3 is not setup correctly for some reason???) to get around this i have to specifically include LS and CBH in my svn properties (so they download for me and get added to the zips) but not include them in my toc (as i recently found out) because if i do then it stuffs up downloads for standalones.
i guess i'm trying to figure out why LSM3 has to be different to every other lib/mod in this regard?
Authors shouldn't be dumb enough to try to load SM before the others, we aren't changing the system to suit them.
k, i'm just a dumb author that wants to use your lib (the 3.0 version).
with every other lib i just load that and it works, with yours it barfs if i do that.
it wants libstub and it wants callback handler already loaded - well my mod has no need for these, so why would i have included them? your library does so why hasnt it included them? has embedding been thrown out now as something horrid and unthinkable?
are you saying that i have to specifically load those two other libs in my mod first? callbackhandler isnt even on files.wowace.com nor is it in the svn trunk? so how am i supposed to keep that up to date?
so please help out a dumb author so i can actually use your nifty little lib and allow the people who use my mod to have pretty textures and fonts. do i have to do something radically different now from what i used to do when loading libs?
Quote from sylvanaar »
For LSM-3.0 to work you have to include Ace3/CallBackHandler-1.0
so thats where the bugger lives, would have been nice if the lib had of placed it into an ace3 subdirectory to make its source more obvious.
Quote from Elkano »
both Libstub and CallBackHandler-1.0 have been decided on to have to be included by the addon using the lib but are hardcopied
so to get this to work correctly in my mod (and have all these libs stay up to date from the svn), i would have to checkout the following;