pkulchenko / ZeroBraneStudio

Lightweight Lua-based IDE for Lua with code completion, syntax highlighting, live coding, remote debugger, and code analyzer; supports Lua 5.1, 5.2, 5.3, 5.4, LuaJIT and other Lua interpreters on Windows, macOS, and Linux
http://studio.zerobrane.com/
Other
2.61k stars 519 forks source link

Wine OSX debug does not find default temporary file #1184

Closed stuta closed 1 month ago

stuta commented 1 month ago

I start zbstudio in OSX Mojave 10.14.6 with wine64 zbstudio.exe. When I start debugging I get this message:

Program starting as '"Z:/Users/xxx/nc/bin/bin_win_x86/lj.exe" -e "io.stdout:setvbuf('no')" "\var\folders\d3\2ld3ksf17nj_jchjs7jpf5vm0000gn\T\.ada4.tmp"'.
Program 'lj.exe' started in 'D:\nc-server' (pid: 56).
Z:/Users/xxx/nc/bin/bin_win_x86/lj.exe: cannot open \var\folders\d3\2ld3ksf17nj_jchjs7jpf5vm0000gn\T\.ada4.tmp: No such file or directory
Program completed in 0.05 seconds (pid: 56).

I tried to start zbstudio with TMPDIR=/Users/xxx wine64 zbstudio.exe

Program starting as '"Z:/Users/xxx/nc/bin/bin_win_x86/lj.exe" -e "io.stdout:setvbuf('no')" "\Users\xxx\.469d.tmp"'.
Program 'lj.exe' started in 'D:\nc-server' (pid: 46).
Z:/Users/xxx/nc/bin/bin_win_x86/lj.exe: cannot open \Users\xxx\.469d.tmp: No such file or directory
Program completed in 0.08 seconds (pid: 46).

Any ideas?

pkulchenko commented 1 month ago

@stuta, I'm confused by your configuration. Where does lj.exe come from (as it's not a part of the IDE distribution package)? Does the path "\Users\xxx.469d.tmp" exist when you launch the debugging? Does "Running" (instead of "Debugging") work? Can you try setting TMPDIR=Z:/Users/xxx (with the disk specified)?

stuta commented 1 month ago

I did set my luajit (lj.exe) path set in user.lua with path.lua = 'Z:/Users/pasi/nc/bin/bin_win_x86/lj.exe'.

Using TMPDIR=Z:/Users/xxx did work, thanks!. Can I change it in the user.lua?

pkulchenko commented 1 month ago

I don't see an easy way to do that, as it's using AssignTempFileName, which internally checks TMPDIR, but you can try setting it inside user.lua with wx.wxSetEnv('TMPDIR', 'Z:/Users/xxx')

stuta commented 1 month ago

Thanks wxSetEnv() did work!