Giter VIP home page Giter VIP logo

Comments (7)

vadosnaprimer avatar vadosnaprimer commented on August 27, 2024

Does this look related?
https://github.com/TASVideos/tastools/tree/master/Lua/LuaPerks

from fceux.

bbbradsmith avatar bbbradsmith commented on August 27, 2024

Thank you. I'm sure that's it.

from fceux.

vadosnaprimer avatar vadosnaprimer commented on August 27, 2024

I guess it should be a part of fceux codebase if it's the right thing. @zeromus?

from fceux.

bbbradsmith avatar bbbradsmith commented on August 27, 2024

Well it's close enough, I just needed to know where to find it. All I would really suggest doing is:

  1. Move vc/luaperks.lib to src/drivers/win/lua/win32 instead.
  2. Leave a text document nearby explaining where the lib came from.

I've done this already in the x64-ready branch I'm preparing.

I still don't know what lua51.dll is, though, or if src/lua or auxlib.lua have any function. I imagine the latter two could be deleted, but not sure. The DLL I have no clue what it does.

from fceux.

bbbradsmith avatar bbbradsmith commented on August 27, 2024

It seems that lua51.dll and lua5.1.dll have the same set of exports, but lua51 has very little actual data in it. Some sort of dummy version of the library with everything removed?

I see lua51 is used by a CheckLua function that just loads it then frees it immediately to check that it exists. It doesn't seem to actually do anything with it? Change that added it.

I found this note in the 2.2.2 changes: Dynamic link to lua51.dll instead of static linking, because some external libraries might crash without lua51.dll

Before that change, it looks sorta like lua51 was just the regular lua library/DLL but renamed? (Maybe we didn't like the . in the filename in 2010?) The current version seems like some stub kludge to keep something happy but I'm not sure what yet.

from fceux.

zeromus avatar zeromus commented on August 27, 2024

different lua libraries reference lua51.dll or lua5.1.dll. It's standard to deploy both of them, and the small one is nothing but a dummy thingy to keep half the libraries happy. It isn't our kludge, it's a standard kludge.

the lua sources that are checked in are for linux because there was no luaperks static lib builds for that. Of course linux users would probably rather use their distro install of lua-devel or whatever, but there are virtually no lua+fceux+linux users.

I don't remember why we use our own lua. Maybe we used to have it modified. Maybe we used lua private functions. Maybe we used lua struct layout details and couldnt warrant compatibility with whatever random ass lua dlls some clowns bring. (historically, the lua APis lack something you need and so you have to do it yourself). I think it's possible that 3rd party lua libraries (or lua itself) explode when you try to use them in an incompatible process (incompatible build options and initialization logic). My static linking them all together could have been a desperate attempt to bring them to life so they could be used at all.

I don't know why some other guy decided years ago to apparently use the dll instead. Nobody's complained about anything besides the usual "my 3rd party library doesn't work" so it must be benign. But it should result in mixing the DLL lua with the static linked luaperks, and that should restrict what DLL versions can be used.

luaperks should not be part of the codebase. it's right there in another repository.

But we should try shitcanning all the static stuff and shut everyone up forever, and if we can remember why we static linked and possibly customized it, write down what nice thing that gave us that we can't have any more, so we don't forget it.

Why do you need an x64 fceux?

from fceux.

bbbradsmith avatar bbbradsmith commented on August 27, 2024

Thanks, that answers all of my questions I think. I'll close this.

As for your question about x64 FCEUX, some reasons were given here: #57

It'd probably be better to discuss it there than here, I just wanted to understand the lua build/library structure here.

from fceux.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.