From e46267d8aea955e86c24aa73888de1ace4099d45 Mon Sep 17 00:00:00 2001 From: Lynix Date: Wed, 17 Aug 2016 13:05:41 +0200 Subject: [PATCH] Build/Assimp: Fix assimp rejection Former-commit-id: 46fc5f3b3fd749e86afe6298cb5337ae90f02784 [formerly c271946a1cbb2924f8d79a9d7c3691c7b23c69e8] [formerly 356ec1662b9e3186da7ac6720b7affec617357e4 [formerly 159894148bb93cadef56126939147c24ff340152]] Former-commit-id: d2e03b0875bb5a7a57817d68fe8b559fd5ba1ad5 [formerly 6ff57bf039f291f64a35cd2c0987b989adea851f] Former-commit-id: 6673c2d846855701a289a74e01bb2b2fc61bfb25 --- build/scripts/common.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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