Mercurial > wow > dependencyloader
comparison DependencyLoader_Bootstrap/bootstrap.lua @ 10:e0a4a8b5b389
lots more modifications...
author | mckenziemc |
---|---|
date | Sun, 05 Dec 2010 03:10:07 -0800 |
parents | 5362e308c3eb |
children | b230b94d4487 |
comparison
equal
deleted
inserted
replaced
9:5362e308c3eb | 10:e0a4a8b5b389 |
---|---|
4 -- explicitly enabling its own dependencies. | 4 -- explicitly enabling its own dependencies. |
5 | 5 |
6 | 6 |
7 local addonName, addonTable = ... | 7 local addonName, addonTable = ... |
8 | 8 |
9 | |
10 print("loading DependencyLoader_Bootstrap") | |
11 | |
9 -- TODO: move and use dependency parsing function here? | 12 -- TODO: move and use dependency parsing function here? |
10 local dependencies = {"LibStub", "LibPrint-1.0", "Ace3"} | 13 local dependencies = {"LibStub", "Ace3", "LibBuilder-1.0", "LibPrint-1.0", "LibScriptLink-1.0"} |
11 | 14 |
12 local canLoad = true | 15 local canLoad = true |
13 for _, addon in pairs(dependencies) do | 16 for _, addon in pairs(dependencies) do |
14 local reason = select(6, GetAddOnInfo(addon)) | 17 local reason = select(6, GetAddOnInfo(addon)) |
15 | 18 |
16 if reason ~= nil and reason ~= "DISABLED" then | 19 if reason ~= nil and reason ~= "DISABLED" and reason ~= "DEP_DISABLED" then |
20 print("Can't load", addon) | |
17 canLoad = false | 21 canLoad = false |
18 break | 22 break |
19 end | 23 end |
20 end | 24 end |
21 | 25 |
23 print("Can't load DependencyLoader") | 27 print("Can't load DependencyLoader") |
24 return | 28 return |
25 end | 29 end |
26 | 30 |
27 | 31 |
28 print("Loading DependencyLoader") | 32 print("bootstrap: Loading DependencyLoader") |
29 | 33 |
30 for _, addon in pairs(dependencies) do | 34 for _, addon in pairs(dependencies) do |
31 EnableAddOn(addon) | 35 EnableAddOn(addon) |
36 LoadAddOn(addon) | |
32 end | 37 end |
33 | 38 |
34 EnableAddOn("DependencyLoader_Core") | 39 EnableAddOn("DependencyLoader") |
35 LoadAddOn("DependencyLoader_Core") | 40 LoadAddOn("DependencyLoader") |
36 | 41 |