XiaoLinXiaoZhu / Mods-Manager-for-3Dmigoto

This is a mods manager for 3dmigoto design for ZZZ(which can also use on other mod base on 3dmigoto).I mainly update it on gamebanana)
https://gamebanana.com/tools/17889
GNU General Public License v3.0
16 stars 1 forks source link

Use fs to create symlinks for all platforms #5

Closed soliddanii closed 1 month ago

soliddanii commented 1 month ago

What this changes: Instead of manually executing the windows mklink command, use the file system node module symlinkSync function.

Why: Even thoguh you only provide a windows release, this allows the manager to work in other platforms, like linux and mac. I personally package and use the manager in both windows and linux, and with this small change, it works without issues.

Tested on both platforms. Let me know what you think or if you encounter any issues.

XiaoLinXiaoZhu commented 1 month ago

I didn't realize before that fs already provided the ability to link files, so that being said I chose to use mklink which I'm more familiar with for functionality, and since it works better there's no reason not to use it.

Regarding the problems I'm having, there are three main ones, so if you could help me with those that would be great:

  1. only being able to use Python to implement analog input: on windows, ZZZ gets its input via directInput, which prevents most analog key presses from triggering the press F10 function in the game. After trying to use C++'s keydb_event method and finding that it didn't work, I tried python, and luckily I found a library that could do this, but that left me with only python to develop the subsequent functionality.

  2. [Find and top ZZZ window] Latency: There are two ways to find the specified window using python, the first one is to get the pid of the game by the process name, and then get the corresponding window by the pid; the second way is to get the window directly by the window name. There are some problems with both ways.

Right now I'm using the first method, but frustratingly it has a delay of almost 3s, which makes this feature seem like a joke: it doesn't make it any easier to refresh the mod, which takes less than a second to do manually.

And it seems to inevitably require the use of administrator privileges, and how to elevate your privileges in electron is a pain in the ass.

For the above two problems, I'd like to know if you have a better solution, such as smaller latency, or no need for administrator privileges ......

  1. how to use github's action feature to automatically build multi-platform electron programs? I've searched a lot of tutorials as well as read the official docs, but I still haven't found a proven way to do this. If you know how to edit that yaml file, please let me know, thank you very much.

Thank you very much for your contribution to this tool, it makes me feel the power of the open source community and makes me determined to make this tool better and better!

Translated with DeepL.com (free version)

soliddanii commented 1 month ago

Hello! Glad to hear that, you are making a really cool project. Open source is great.

As for refreshing mods with the simulated key press, i've never done anything like that but I may be able to give it a shot. I had never used Github Actions before either, but figured this was a good oportunity to learn, so after some research i managed to get it working. More on that on this merge request.

Thanks!