Illustration:
.vmp file path is : E:\工作内容\test.dll.vmp
Call “print("Path:\t"..stripfilename(vmpCore:projectFileName()))” in script,print "E:\工作内容\test.dll.vmp" is ok。
But there is a mistake in the other use(configFile = io.open(vmpCore:projectFileName(), "r")). the "configFile" is nil。
Sample code:
Code: Select all
function OnBeforeCompilation()
vmpCore:inputArchitecture():file()
print("Path:\t"..vmpCore:projectFileName())
configFilePath = vmpCore:projectFileName()
print("Path:"..configFilePath) -- is ok
configFile = io.open(configFilePath, "r") --is error
if configFile == nil then
print("Open config text file \""..configFilePath.."\" error!No such config file or directory!")
return
end
end
proposal:
1、Allow running script to abort;
2、Allow script control “Lock To Serial Number”;