From 62ebc3e8cf5b2f8dc45b0c43a927a5e22d7d4a6b 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: 0565c70bb35215b3bcda0368d709730055161827 [formerly 5272f3ad85542d2f45e0314bf399d12a6d656fff] [formerly 39a37805566ce1dea9f8a0bccdfebe989ba50142 [formerly 827c3b178b687946ef7559735d4325b4d4f7bd42]] Former-commit-id: 0796fc3248fb234361eb6bef14a76faa0a824056 [formerly b96bbddabdf7708aa8522632b0e860590a0d7db4] Former-commit-id: 7377a548aa94c75f22d8d3c420df8fb7e33b0d2b --- 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