From 658526ff581d029ddb9c13c152c7416bae5c6f78 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: 4bd673c117b8450e4e7238dd09c0381e8a4f2c61 [formerly 8cc3af25b5c7baba115c80fe555ab8931def6ef1] [formerly 2d0bcd153b4441bc8b32137965f95e580b6570ab [formerly 567211701b7aca9f35b9b47713138d932673b71d]] Former-commit-id: db44829c31fcd67fb52643ea63f64bd127080c20 [formerly ded3811843b6d6d90058c238349bcd05c0bfe91b] Former-commit-id: 56684cc6b81490f9f7e8c445ded6abc4608e0ba1 --- 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