Mercurial > wow > dependencyloader
view DependencyLoader_Bootstrap/bootstrap.lua @ 11:47d15fc9208e
updated the .pkgmeta to reflect the directory changes
added LibScriptLink external
changed the main module's Dependencies to OptDeps
moved embeds.xml and Ace3.xml
author | mckenziemc |
---|---|
date | Sun, 05 Dec 2010 03:39:26 -0800 |
parents | e0a4a8b5b389 |
children | b230b94d4487 |
line wrap: on
line source
-- bootstrap.lua -- Bootstrap code for DependencyLoader, allowing -- the user to successfully load it without -- explicitly enabling its own dependencies. local addonName, addonTable = ... print("loading DependencyLoader_Bootstrap") -- TODO: move and use dependency parsing function here? local dependencies = {"LibStub", "Ace3", "LibBuilder-1.0", "LibPrint-1.0", "LibScriptLink-1.0"} local canLoad = true for _, addon in pairs(dependencies) do local reason = select(6, GetAddOnInfo(addon)) if reason ~= nil and reason ~= "DISABLED" and reason ~= "DEP_DISABLED" then print("Can't load", addon) canLoad = false break end end if not canLoad then print("Can't load DependencyLoader") return end print("bootstrap: Loading DependencyLoader") for _, addon in pairs(dependencies) do EnableAddOn(addon) LoadAddOn(addon) end EnableAddOn("DependencyLoader") LoadAddOn("DependencyLoader")