sammyfreg / netImgui

'Dear Imgui' remote access library and application
MIT License
595 stars 51 forks source link

Including assets and multiple dear imgui copies in repository #11

Closed ocornut closed 3 years ago

ocornut commented 3 years ago

Nothing critical but some loose suggestions (feel free to close)

Assets Assets tends to bloat git repository fast (especially when updated, since git will locally keep every copies). Two things I found worked:

Multiple Dear ImGui copies I realize you need this for testing but it makes the whole netimgui package less "library-ish" (and also bigger) that it contains all those copies of dear imgui. I would suggest either using a single submodule link either use a separate repo to distinguish lib vs example if needed (more handling!). Either way you can use scripting or GitHub actions if you want to test that stuff compiles with multiple versions.

Making those changes the file tree would goes from ~20 mb to ~1 mb.

sammyfreg commented 3 years ago

Assets This project is the first time I really use GitHub, so I am learning how to use it as I go. I find the web assets suggestion interesting, I was not a fan of including them in the project depot, but didn't think of any other location outside hosting on a 3rd party. I'll probably take a look at the wiki depot approach.

Background The background feature has been made quickly and stretch to size. It'll take me 30 minutes to scale + keep ratio properly. I was also thinking of adding a netImgui command to specify a texture + color for the background. But I am waiting to see if people are interested in this lib before adding these extra features.

Imgui copies Right now, before I submit changes, I compile in every targets against each Imgui version, making sure of compatibility. I haven't explored the automation feature of Github, but feel that it wouldn't be trivial to 1. Call batfile to generate solution and 2. Compile every Visual Studio targets. As for being less 'library-ish' :) maybe some renaming might makes things clearer, the library proper is everything in 'Code\Client' everything else is extra for the samples, server app, test against Dear ImGui version. I am not particularly fond of storing each version of it in the depot. I think you are correct with the idea of running a script that could fetch the files from Github instead. I also want to keep thing as simple as possible for the user, no complicated script to setup the environement and that are prone to failure.

sammyfreg commented 3 years ago

Had a quick test last night, it seems Windows comes with cURL and tar commandline tool since a 2018 update. I was able to sucessfully fetch a Dear ImGui release package with them, so will be taking that route.

sammyfreg commented 3 years ago

All 3 points have been addressed.

For now, 1 copy of the current Dear ImGui is still stored. This is to keep things as simple as possible when user only want to compile the base code (Samples/NetImGuiServer), without relying on Windows setup of cURL/Tar tools. Other Dear ImGui versions (used for compatibility tests) are now fetched from official Dear ImGui packages releases or a zip file from my own wiki (when no associated release packages available).

Assets have been moved to the wiki, this was a nice dicovery, thanks.

And background now resize to fit (instead of stretching).

ocornut commented 3 years ago

Thank you that’s great!