lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I am on windows 11, and use a program called Family Historian https://www.family-historian.co.uk/  

Family Historian uses Lua for plugins they will only use from their Plugins folder, not any subfolders.
Family Historian  version 6.2.7 uses Lua version 5.1 (I do not know the variant beyond that)
Family Historian  version 7.0.x uses Lua version 5.3 (I do not know the variant beyond that)

I have downloaded the 5.1.5 binaries  in both 32 and 64 bit (there is no difference in the outcome)
I :gsub('\\', '/') since windows has understood '/' since windows 98 and the '\\' repeats throughout are tiresome.

from a non-elevated command prompt:
the very first issue I ran into was luac.out access denied, so in Windows/system32 I have an luac.out with full access for all and no longer receive that message.

 "C:/Program Files (x86)/LUAC/5.1/luac5.1.exe" -l "C:/ProgramData/Calico Pie/Family Historian/Plugins/!!XPcall.fh_lua" > "C:/ProgramData/Calico Pie/Family Historian/Plugins/IRP/5.1/!!XPcall.irp"
this works whether the outfile exists or not on the command line.

so, I am ready to run it through my program:
 "C:/Program Files (x86)/LUAC/5.1/luac5.1.exe" -l "C:/ProgramData/Calico Pie/Family Historian/Plugins/!!XPcall.fh_lua" > "C:/ProgramData/Calico Pie/Family Historian/Plugins/IRP/5.1/!!XPcall.irp"
using io.popen(... , 'w')
result:  No such file or directory

I posit that luac will not understand the redirection pipe:
 "C:/Program Files (x86)/LUAC/5.1/luac5.1.exe" -l  "C:/ProgramData/Calico Pie/Family Historian/Plugins/!!XPcall.fh_lua" -o "C:/ProgramData/Calico Pie/Family Historian/Plugins/IRP/5.1/!!XPcall.irp"
result:  No such file or directory

ok, create the file before you output the listing:
result:  No such file or directory

Yes there is, I just created it.

take it back out to the non-elevated command prompt.
cannot open -o: No such file or directory

aha, there is some type of error I cannot understand in my command strings when run thru io.popen (or os.execute or laucom) ,  or on the command line,  and the error are from luac.exe

QUESTIONS:
1) so what does the command string have to look like?
 "C:/Program Files (x86)/LUAC/5.1/luac5.1.exe" -l  "C:/ProgramData/Calico Pie/Family Historian/Plugins/!!XPcall.fh_lua" -o "C:/ProgramData/Calico Pie/Family Historian/Plugins/IRP/5.1/!!XPcall.irp"

additonally, under some circumstances I want to create a binary object.
"C:/Program Files (x86)/LUAC/5.1/luac5.1.exe" -t -s  "C:/ProgramData/Calico Pie/Family Historian/Plugins/QSRC/QSYS.lua" -o "C:/ProgramData/Calico Pie/Family Historian/Plugins/QSYS.lua"  I understand that I may not use -t on 5.1 compiles.
 
result:  No such file or directory
2, 3) so what does that command string have to look like, and do I have to 'wb' for this?

4_) do I need to create empty supplied outfiles, or does luac create them (or overwrite them if they exist)?

I can supply the lua code (it uses several requires that I would have to supply and it is geared only to Family Historian paths, etc) but I do not feel the errors are in the general code, just the assembling of the command string)
 
Thank you,
Ronald Melby