[JW Lua] v0.67/Lua 5.4 report from Perfect Layout (the Windows/Luaosutils seems to be a problem)

Jan Angermüller jan at angermueller.com
Sat Mar 18 11:26:10 CET 2023


Robert,

I have just tested the Lua 5.4/0.67b version with Perfect Layout in 
Finale 27.3/*Windows* 10.
BTW, since the last update v3.0127 Perfect Layout is also compatible 
with v0.66.

Result: it works, except luaosutils.

In detail:
First I had to make *ZeroBrane studio* work as it seems to not support 
5.4.x by default:
-Download the Win64 lua5.4.*2* (!) binaries.*I haven't found binaries 
for 5.4.4.*
The LuaBinaries project only goes up to 5.4.*2* ( 
https://sourceforge.net/projects/luabinaries/files/ )
Then:
-Put lua54.dll/lua54.exe files into \ZeroBraneStudio\bin
-Add clibs54 folder similar to clibs53 folder to 
\ZeroBraneStudio\bin     (just copy&paste and then rename to 54)
-Go to ZeroBraneStudio\interpreters and copy&paste luadeb53.lua and make 
it to luadeb54.lua.
-Open luadeb54.lua and change 5.3 to 5.4
-(Re-)Start ZeroBrane Studio and select Lua 5.4 in Project->Lua Interpreter.

I had *five error messages* that didn't occcur in previous versions of 
RGP Lua/Lua 5.2 of which four could easily be fixed.
1.) there was a problem with a duplicate label name which Lua 5.2 has 
ignored (very weird)
2.) the "number of local variables exceeded" error occured (I wonder why 
it didn't occur in previous versions).
3.) tonumber(x,10) accepts both number OR string values for x in 
Lua5.2,  in Lua5.4 only string values are accepted, otherwise error.
4.) the condition local x=0; local n=15; print((n % x)==0) printed 
"false" in Lua5.2, but gave an error in Lua 5.4   ("Error: attempt to 
perform n%0")

These were all actually problems in Perfect Layout that Lua5.2 has 
ignored and which haven't lead to any problems yet.
So I am glad I could improve my code here.

However, I wasn't able to fix:
*osutils=require("luaosutils") *  --> this immediately lead to an error 
message although finaleplugin.LoadLuaOSUtils=true was in plugindef
The result info box says: "Error:" No message.
BTW, this pops up although it says 
finaleplugin.IgnoreReturnValue=true     in the plugindef().
And I called the uncompiled plug-in code directly - no extra require 
file was used as in the compiled version.


So I removed that line completely and used the original JW Lua 
implementation without luaosutils and it, yay!, finally worked.

Could it be that the Windows version of your embedded luaosutils has a 
problem? Haven't tested on macOS.
Or do I need to change something in the setup?

And finally:
I have only tested my standard Perfect Layout demo score and another 
(simple) orchestra score.
When the osutils issue is solved, I will run it in my standard tests 
where it automatically compares the output with v0.66.
I haven't tested the 5.4 compiled version of Perfect Layout either.

But so far, yes, it seems to work.
Great job!

Jan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20230318/574c2358/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gD9BTUGf70VvEVL6.png
Type: image/png
Size: 5152 bytes
Desc: not available
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20230318/574c2358/attachment.png>


More information about the JWLua mailing list