Readek / Melee-Stream-Tool

A Melee overlay and control panel for tournament streams
MIT License
80 stars 25 forks source link

Suggestions / Questions on contributing to PRs #11

Closed cyrialize closed 6 months ago

cyrialize commented 6 months ago

Hello!

A friend of mine was asking for advice on how to add certain things to this project - and then I ended up digging into the source code and modifying it myself.

My main goal was to add character icons underneath the score counters for the game scoreboard.

Screenshot 2024-03-03 at 8 10 36 PM

I got this working and then I dug into things some more!

I was able to get an application running on MacOS (my personal platform). I upgraded the packages within package.json as well.

I have further ideas + suggestions, such as:

All this being said, what would be the best way for me to present changes?

I could perform incremental changes, such as:

I could also fork the repo as well! I recognize that this repository hasn't been active in a few years. I also recognize that this project (and all other stream tools) have been passion projects of yours!

If I do end up forking, I'll be sure to direct everyone to the original repo and to encourage them to support you via your ko-fi. Additionally, if my fork contains the changes I outlined above (if I ever get around to it as I am also busy), I'd love to talk about them with you / help integrate them into your original project.

Readek commented 6 months ago

Icons on the scoreboard are a neat idea, however I feel like this is redundant information.

First time hearing about someone compiling this on Mac though! However the changes you describe are pretty drastic, and probably incompatible with the rework I plan on doing to the entire project (eventually), where everything should work like it does right now in RoA ST v10. I don't think I would like the idea of compiling everything into the executable, would make simple customizations a bit harder for the average user.

The pathing issues you encountered probably happened because you need a specific variable to tell where you are, like windows needs (process.env.PORTABLE_EXECUTABLE_DIR).

cyrialize commented 6 months ago

That makes sense, thanks.

Is the idea behind not compiling into an executable so that users could go in and modify the HTML files?

In regards to pathing, that also makes sense! Do you know if that variable is available through electron-forge at all, or is that just from electron-build?

I also wonder if providing a .env file to the repo that defines PORTABLE_EXECUTABLE_DIR may be helpful, since I saw that this environment variable is sometimes available depending on set up.

For building on mac, the original setup actually already did this! In package.json:

        {
          "name": "@electron-forge/maker-zip",
          "platforms": [
            "darwin"
          ]
        },

When doing yarn make, it generates a .app in /out within a zip file. It doesn't work unfortunately, even when placed in the same directory as the other executables. It is why I was playing around with packaging resources into the output, since there is something different about .app over .exe and .appimage.

(I recently switch to mac, so I wasn't aware of this until now haha).

cyrialize commented 6 months ago

Oh! Also, a follow up question I forgot to ask in my previous post - if a user modifies code in Stream Tool would they need to rebuild the application at all?

Or is that only if code is modified within Interface Source Code?

I wasn't able to find out on my own due to the issues described above with trying to run the application locally on my mac.

Readek commented 6 months ago

Yeah, the idea is for things to be easy to customize!

I'm sure there must be some way to get the path of the executable directory on mac. On linux a simple path.resolve() is enough, at least with electron build. Sadly as I don't have any Mac myself, I can't really test anything, so that's entirely up to you. In theory, you can debug whatever is causing the .app to not work if you open it up in a terminal (provided you add some console.logs).

Everything on the Stream Tool folder can be modified. Originally this didn't include the GUI, and Melee ST being so old, it stayed like that, but on the most advanced ST (RoA), everything but the linked file above is outside the executable, so you can literally modify everything without compiling. Whenever I end up reworking Melee's ST, it will end up working like that too.

cyrialize commented 6 months ago

Awesome, thank you so much for you answers. If I have time, and if I succeed, I'll issue a PR against the repo for a Mac build.

I feel like everything is super close, considering it didn't take too much to get a build going locally and the current settings actually already build a MacOS app.

I may do a fork when I have time as well, since it's been fun to play with the code.

Thank you for all your work, and thanks again for answering all my questions!