# HG changeset patch # User mckenziemc # Date 1291162384 28800 # Node ID 9852fcd5e59edc7e944c02a6e70a3a684d1574a8 initial import diff -r 000000000000 -r 9852fcd5e59e DependencyLoader/DependencyLoader.toc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/DependencyLoader/DependencyLoader.toc Tue Nov 30 16:13:04 2010 -0800 @@ -0,0 +1,11 @@ +## Interface: 40000 + +## Notes: Bootstrap for DependencyLoader_Core +## Author: mckenziemc + +## LoadManagers: !!!LoadFirst, AddonLoader +## X-LoadFirst: true +## X-LoadOn-Always: true + + +start.xml diff -r 000000000000 -r 9852fcd5e59e DependencyLoader/bootstrap.lua --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/DependencyLoader/bootstrap.lua Tue Nov 30 16:13:04 2010 -0800 @@ -0,0 +1,36 @@ +-- bootstrap.lua +-- Bootstrap code for DependencyLoader, allowing +-- the user to successfully load it without +-- explicitly enabling its own dependencies. + + +local addonName, addonTable = ... + +-- TODO: move and use dependency parsing function here? +local dependencies = {"LibStub", "LibPrint-1.0", "Ace3"} + +local canLoad = true +for _, addon in pairs(dependencies) do + local reason = select(6, GetAddOnInfo(addon)) + + if reason ~= nil and reason ~= "DISABLED" then + canLoad = false + break + end +end + +if not canLoad then + print("Can't load DependencyLoader") + return +end + + +print("Loading DependencyLoader") + +for _, addon in pairs(dependencies) do + EnableAddOn(addon) +end + +EnableAddOn("DependencyLoader_Core") +LoadAddOn("DependencyLoader_Core") + diff -r 000000000000 -r 9852fcd5e59e DependencyLoader/start.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/DependencyLoader/start.xml Tue Nov 30 16:13:04 2010 -0800 @@ -0,0 +1,1 @@ +