• Recommendations for binary module versioning
    0 replies, posted
If you have seen some of my previous posts you might recall that I've been working on an addon that requires a binary module (dll) for some of its features. This will be the situation: - The addon is installed by the server and is LUA only - The client upon joining is referred to a website to download the binary module, should he wish to use its functionality (optional) Now, as I will be updating the addon I want to require that the client can only use the right version of the binary module, based on the version of the server addon. For example, if the server has addon v1.1 installed, the client should have dll v1.1 (or whatever version corresponds to addon v1.1). I'm looking for a good way to present this to the user and would gladly hear your recommendations. Here are some of the options I have considered: [B]Option A:[/B] Give each version of the dll a different file name, for example gmcl_mymodule1_win32.dll, gmcl_mymodule2_win32.dll. The server addon then tries to find the correct module client-side by looking for a specific name, i.e. require( "mymodule2" ). If that fails, show the user a message that either they don't have the module or they have a wrong version. A downside to this is that the user can in the end have many versions of the same module in his lua/bin folder. [B]Option B:[/B] Keep using the same file name, but let the module register a C function "getVersion()" ([B]edit: but with a function name that is more unique[/B]) which is then called from LUA, and the version should correspond to whatever is required by the server addon. The problem here is that when playing on servers that run different versions of the server addon, they require different dll's but only one version of the dll can be in the lua/bin folder. I'm hoping that the problem that arises in B is not a real problem if I only distribute the server addon via Workshop, enforcing all servers to keep the addon up-to-date, but I'm not sure if in practise I may assume that all servers have the most recent version. Any thoughts on this?
Sorry, you need to Log In to post a reply to this thread.