How can you load a third party lua dll for use in a GameGUI (or anywhere else) - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 11-04-2016, 10:35 PM   #1
Drexx
Member
 
Join Date: Jul 2016
Posts: 316
Default How can you load a third party lua dll for use in a GameGUI (or anywhere else)

I am trying to load the luasql module so that I can write a proper frontend website and have communications between website and server, also log all the events in the database.

I am using a 64bit compiled version of luasql (for lua 5.1)

The files to access the example are here:
https://www.dropbox.com/sh/hjk9h2c4j...lvF_R8lqa?dl=0

You put the luasql folder in DCS\bin (so it can get access to the library)
and run the dbTestGameGUI.lua from the DCS\bin

lua dbTestGameGUI.lua

Code:
C:\Program Files\Eagle Dynamics\DCS World\bin>lua "c:\Users\andre\Saved Games\DCS\Scripts\DatabaseTestGameGUI.lua"
Event: HAHAHA, Time: 2016-11-04 03:59:20
Event: YESSSSS, Time: 2016-11-04 03:59:20
Event: WEEEENER, Time: 2016-11-04 04:18:20
Event: DCS WROTE TO SERVER!, Time: 2016-11-04 13:34:22
it writes to the database and reads from it, this WORKS!

but with luarun.exe

luarun dbTestGameGUI.lua
Code:
C:\Program Files\Eagle Dynamics\DCS World\bin>luarun "c:\Users\andre\Saved Games\DCS\Scripts\DatabaseTestGameGUI.lua"
can't load c:\Users\andre\Saved Games\DCS\Scripts\DatabaseTestGameGUI.lua: [string "c:\Users\andre\Saved Games\DCS\Scripts\DatabaseTestGameGUI.lua"]:2: attempt to index global 'luasql' (a nil value)
it has trouble

Just an example of loading an external module would be fun or an explanation of the limitations of DCS + GameGUI + loading external modules. Lua.exe runs this code perfectly so theres definitely a different here somewhere

Being able to load an external module from GameGUI can open our server up to a TON of possiblities!

Thanks!

-Drex
-=16AGR=- US East Dynamic Caucasus
Drexx is offline   Reply With Quote
Old 06-19-2018, 11:48 AM   #2
VladMordock
Junior Member
 
VladMordock's Avatar
 
Join Date: Jan 2018
Location: Kraków, PL
Posts: 12
Default

I know that this is quite old, but was there any luck making it work ?
__________________
Zapraszam na Gildia.org - polska społeczność DCS.
VladMordock is offline   Reply With Quote
Old 06-19-2018, 05:23 PM   #3
BlacleyCole
Senior Member
 
BlacleyCole's Avatar
 
Join Date: Dec 2017
Location: New Mexico
Posts: 1,111
Default

Probably not as I was told ed is very restrictive on what dcs can and cannot do
__________________
BlackeyCole 20years usaf
XP-11. Dcs 2.5OB
Acer predator laptop/ i7 7720, 2.4ghz, 32 gb ddr4 ram, 500gb ssd,1tb hdd,nvidia 1080 8gb vram


New FlightSim Blog at https://blackeysblog.wordpress.com. Go visit it and leave me feedback and or comments so I can make it better
BlacleyCole is offline   Reply With Quote
Old 06-19-2018, 07:33 PM   #4
VladMordock
Junior Member
 
VladMordock's Avatar
 
Join Date: Jan 2018
Location: Kraków, PL
Posts: 12
Default

Maybe, but I haven't reached the point when there might be ED blockade. I'm almost sure that we would need 64x recompiled luasql for lua 5.2.4 .
__________________
Zapraszam na Gildia.org - polska społeczność DCS.
VladMordock is offline   Reply With Quote
Old 06-19-2018, 08:56 PM   #5
feefifofum
3rd Party Developer
 
feefifofum's Avatar
 
Join Date: Jan 2015
Location: USA
Posts: 2,241
Default

It's not so much a blockade for everyone but one for the layperson.
You need to edit code in game files in order to execute code outside of the sim.
This prevents the majority of users from accessing these options (and prevents the execution of potential malicious code by the game as it is shipped.)
feefifofum is offline   Reply With Quote
Old 06-19-2018, 09:08 PM   #6
VladMordock
Junior Member
 
VladMordock's Avatar
 
Join Date: Jan 2018
Location: Kraków, PL
Posts: 12
Default

Sir, I understand general idea and those comments are welcome, but at the same time those comments are so general that will not help with the problem.

The question is if anybody was lucky with luasql with DCS 2.5 ?
__________________
Zapraszam na Gildia.org - polska społeczność DCS.
VladMordock is offline   Reply With Quote
Old 06-19-2018, 09:16 PM   #7
feefifofum
3rd Party Developer
 
feefifofum's Avatar
 
Join Date: Jan 2015
Location: USA
Posts: 2,241
Default

That was more aimed at BlackleyCole.
off now.

Last edited by BIGNEWY; 06-19-2018 at 09:47 PM. Reason: 1.1
feefifofum is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 04:11 AM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.