-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds win-arm64 #2
Conversation
@@ -21,15 +21,15 @@ function BuildWindows32DLL(cfile, isCpp) | |||
if is_verbose == true then | |||
print(cmd) | |||
end | |||
if os.execute(cmd) == 0 then table.insert(objs, cfile..".o") end | |||
if os.execute(cmd) then table.insert(objs, cfile..".o") end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was there a change of semantics of os.execute
in lua? As far as I know, programs return 0
when they execute correctly and a non-zero value when they don't.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was also super confused about that one. That they changed something like this. Did a print(os.execute(cmd))
and it printed true
to the console.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does os.execute(cmd) == 0
return false
or did lua somehow hacked their logic to support both?
I'm asking because there are other scripts in this repo that use the former logic, and thus might need to be updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a change from version 5.2.
Before: https://www.lua.org/manual/5.1/manual.html#pdf-os.execute
This function is equivalent to the C function system. It passes command to be executed by an operating system shell. It returns a status code, which is system-dependent. If command is absent, then it returns nonzero if a shell is available and zero otherwise.
After: https://www.lua.org/manual/5.2/manual.html#pdf-os.execute
This function is equivalent to the ISO C function system. It passes command to be executed by an operating system shell. Its first result is true if the command terminated successfully, or nil otherwise. After this first result the function returns a string and a number, as follows:
- "exit": the command terminated normally; the following number is the exit status of the command.
- "signal": the command was terminated by a signal; the following number is the signal that terminated the command.
So we should add a comment that it must be executed with a version 5.2+.
No description provided.