fix compileArgs for reworked function

This commit is contained in:
Syping 2020-05-16 16:16:59 +02:00
parent 2879ae33ed
commit 906ce569c0

View file

@ -116,13 +116,12 @@ end
function compileScript()
local filePath = showFileDialog(SaveFileDialog, "Select output file...", currentFilter, mainWindow)
if (filePath ~= nil) then
local extraArg1
local extraArg2
local compileArgs = { getWidgetText(scriptLineEdit) }
if (currentSstub ~= nil) then
extraArg1 = "--luaengine"
extraArg2 = sstubDir.."/"..currentSstub
compileArgs[2] = "--luaengine"
compileArgs[3] = sstubDir.."/"..currentSstub
end
if (executeProcess(compilerPath, getWidgetText(scriptLineEdit), filePath, extraArg1, extraArg2, false) == false) then
if (executeProcess(compilerPath, compileArgs, false) == false) then
showMessageBox(WarningMessageBox, "Error occurred while compile!", "LuaEngine Compiler")
end
end