binji / love-nacl

Port of LÖVE to Native Client
http://binji.github.io/love-nacl/
Other
43 stars 6 forks source link

Lua's os module does not work #25

Open karai17 opened 11 years ago

karai17 commented 11 years ago

Somewhat expected, but still an issue. I tested a love file that contains an os.execute() command that does not fire. Might there be any way to get this to work?

binji commented 11 years ago

Not likely, no. os.execute is basically just calling system(...) I think -- Native Client doesn't support access to the underlying operating system directly.

What are you trying to execute? It's possible that you could work around it in other ways.

karai17 commented 11 years ago

In my particular application, I am executing a call to the default browser.

if love._os == "Windows"    then os.execute("start https://google.com") end
if love._os == "OS X"       then os.execute("open https://google.com") end
if love._os == "Linux"      then os.execute("xdg-open https://google.com") end
binji commented 11 years ago

That seems like a common use-case. I'll see how much work/how nasty it is to hack in support for os.execute("xdg-open ")

karai17 commented 11 years ago

Perhaps interpreting start, open, and xdg-open as a call for a new tab?