Convert premake.main.elements to an array, to allow manipulation from system and user scripts
Because the original function was called before the system and user scripts had been executed they never had a chance to make changes. As a list, they now have the ability to insert new steps.
This commit is contained in:
parent
c576407af5
commit
2ef3adb9d7
@ -25,36 +25,6 @@
|
||||
local m = p.main
|
||||
|
||||
|
||||
--
|
||||
-- Script-side program entry point.
|
||||
--
|
||||
|
||||
m.elements = function()
|
||||
return {
|
||||
m.installModuleLoader,
|
||||
m.locateUserScript,
|
||||
m.prepareEnvironment,
|
||||
m.preloadModules,
|
||||
m.runSystemScript,
|
||||
m.prepareAction,
|
||||
m.runUserScript,
|
||||
m.checkInteractive,
|
||||
m.processCommandLine,
|
||||
m.preBake,
|
||||
m.bake,
|
||||
m.postBake,
|
||||
m.validate,
|
||||
m.preAction,
|
||||
m.callAction,
|
||||
m.postAction,
|
||||
}
|
||||
end
|
||||
|
||||
function _premake_main()
|
||||
p.callArray(p.main.elements)
|
||||
return 0
|
||||
end
|
||||
|
||||
|
||||
---
|
||||
-- Add a new module loader that knows how to use the Premake paths like
|
||||
@ -319,3 +289,34 @@
|
||||
print("Done.")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
--
|
||||
-- Script-side program entry point.
|
||||
--
|
||||
|
||||
m.elements = {
|
||||
m.installModuleLoader,
|
||||
m.locateUserScript,
|
||||
m.prepareEnvironment,
|
||||
m.preloadModules,
|
||||
m.runSystemScript,
|
||||
m.prepareAction,
|
||||
m.runUserScript,
|
||||
m.checkInteractive,
|
||||
m.processCommandLine,
|
||||
m.preBake,
|
||||
m.bake,
|
||||
m.postBake,
|
||||
m.validate,
|
||||
m.preAction,
|
||||
m.callAction,
|
||||
m.postAction,
|
||||
}
|
||||
|
||||
function _premake_main()
|
||||
p.callArray(m.elements)
|
||||
return 0
|
||||
end
|
||||
|
Reference in New Issue
Block a user