LuaUI and linux

LuaUI and linux

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
Lefty
Posts: 27
Joined: 26 Jun 2007, 22:00

LuaUI and linux

Post by Lefty »

I have some problems with Lua on linux:

Code: Select all

/luaui reload
Loading: "gui.lua"
Failed to load LuaUI/main.lua: (cannot read LuaUI/main.lua: No such file or directory)
so I edited gui.lua-

Code: Select all

LUAUI_DIRNAME   = '/usr/share/games/spring/LuaUI/'
-- LUAUI_DIRNAME   = 'LuaUI/'
and following error occurs:

Code: Select all

/luaui reload
Loading: "gui.lua"
Reloaded ctrlpanel with: LuaUI/ctrlpanel.txt
LuaUI: bound F11 to the widget selector
LuaUI: bound CTRL+F11 to tweak mode
LuaUI v0.1
error = 1, gui.lua, Invalid GetDirList() access: /usr/share/games/spring/LuaUI/Widgets/
Loading failed
I use Spring 0.74b3 ... any suggestions ? :?:
User avatar
theHive
Posts: 124
Joined: 13 May 2007, 06:54

Post by theHive »

Run it as root?

You don't have permissions to your root folders methinks.

So, either put them in ~/.spring and change your Spring directory (can't remember how) and put it in LuaUI there, or run Spring as root (which might work).

This is coming from a Linux noob though, so don't be surprised if it doesn't work
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Post by Kloot »

Lefty
Posts: 27
Joined: 26 Jun 2007, 22:00

root

Post by Lefty »

I tried to run it as root, but no result... And I also tried "chmod a+rwx LuaUI -R" ..

2Kloot: helpfull :lol:

hoping new version will be out soon :-)
vital
Posts: 17
Joined: 08 Jun 2007, 12:40

Post by vital »

I had the same problem and copied the luaUI folder from /usr/share/games/spring to /home/myuser/spring then make the files writable with chmod and it works, at least no more complain abaout missing things.

but I have an other problem it is that when I press F11, it takes a a screenshot, and I dunno how to change the keyboard mapping (i can't rotate the buildings too and can't assign groups ...)
Lefty
Posts: 27
Joined: 26 Jun 2007, 22:00

keys

Post by Lefty »

yeah, I also cant assingn groups, but it is because I have different keyboard layout (czech). Look after uikeys.txt and selectkeys.txt in spring folder...

btw. your trick with moving LuaUI (i hope you mean /home/myuser/.spring) doesnt work :( ... (i tried 777 permissions)
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

A good idea may be to use the VFS for lua stuff as the VFS would map all the lua folders.

Heck I can use the VFS via unitsync to get information about system files outside the spring folders. Remember my post where I managed to get unitsync to list the contents of c:\windows\?
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

1, 0.74b3 LuaUI can use the VFS, the widgetHandler isn't setup for it

2. the SVN LuaUI widgetHandler is setup to use the VFS, which also
allows for "mod widgets" (widgets packaged within mod archives).

3. The simplest fix is to copy the LuaUI directory into your $SPRING
read/write directory. This should work for 0.74b3 installations. You may
also need to remove any other LuaUI/ directories.

LuaUI was developed on a linux box, but the dev who did the work has
never installed spring as a package, or using the scons installation ;-)
Lefty
Posts: 27
Joined: 26 Jun 2007, 22:00

Post by Lefty »

trepan wrote:3. The simplest fix is to copy the LuaUI directory into your $SPRING
read/write directory. This should work for 0.74b3 installations. You may
also need to remove any other LuaUI/ directories.
thx, its finally working :-)
Post Reply

Return to “Lua Scripts”