diff --git a/build/scripts/common.lua b/build/scripts/common.lua index 498b64ee0..b8ca27e70 100644 --- a/build/scripts/common.lua +++ b/build/scripts/common.lua @@ -576,10 +576,10 @@ function NazaraBuild:Initialize() local succeed, err = self:RegisterTool(TOOL) if (not succeed) then - print("Unable to register tool: " .. err) + print("Unable to register tool " .. tostring(TOOL.Name) .. ": " .. err) end else - print("Unable to load tool file: " .. err) + print("Unable to load tool file " .. v .. ": " .. err) end end TOOL = nil @@ -990,10 +990,6 @@ function NazaraBuild:RegisterTool(toolTable) return false, "This tool name is already in use" end - if (toolTable.TargetDirectory == nil or type(toolTable.TargetDirectory) ~= "string" or string.len(toolTable.TargetDirectory) == 0) then - return false, "Invalid tool directory" - end - if (toolTable.Kind == nil or type(toolTable.Kind) ~= "string" or string.len(toolTable.Kind) == 0) then return false, "Invalid tool type" end @@ -1005,6 +1001,10 @@ function NazaraBuild:RegisterTool(toolTable) return false, "Invalid tool type" end + if (lowerCaseKind ~= "plugin" and (toolTable.TargetDirectory == nil or type(toolTable.TargetDirectory) ~= "string" or string.len(toolTable.TargetDirectory) == 0)) then + return false, "Invalid tool directory" + end + toolTable.Type = "Tool" self.Tools[lowerCaseName] = toolTable return true