-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The "utils" package should be split up. #60
Comments
Alternatively, what about pulling items from utils directly into the libraries that need it? For example, I think threading is only required by the audio library, that could just be moved into there. Is DataLoader / string conversion used outside of the player library? |
Another idea, libvgm could be split up. Maybe form a new org or use vgmrips, and move emu, player, etc into their own repos. I've started learning a bit more about modern CMake and how to have it auto-register "packages" on the system, which makes it really nice to use for devs. I figured out how to use CMake with Visual Studio and have it auto-detect the various sub-libraries I had built, I did zero config of Visual Studio with finding external references, adding include directories, etc.. It's pretty cool. I just opened the folder, it detected the CMakeLists, and I say that because I've always gotten the feeling that dealing with external dependencies on Visual Studio is rough (I barely use it so anything besides opening a project and clicking build, I consider rough), so I'd understand if breaking this up sounds like it could be a pain - but with a few changes to the cmake files it'd be pretty close to seamless. Devs could just clone down the new repos, open it in visual studio, build. CMake would take care of resolving the dependency between the player and emu libraries. |
I wouldn't mind this, specifically, the "audio" component could be completely split from libvgm, leaving it only with the "emu" and "player" components. It's good that CMake works for you, I have had the opposite experience when using CMake with MinGW packages. Specifically, the library finder scripts never work for me, and that it doesn't recognize the proper place to install programs. This is why I have been pushing for ways to use the library that don't require CMake. |
Are you cross-compiling or using mingw on windows? I can only speak from the cross-compiling experience, but once I setup my toolchain file with:
(along with the usual cross-compiling settings) everything started working great. Don't know if any of that could be a help? I think MXE includes that as a script, too, which I remember working really well. |
I'd like to keep the possibility of using e.g. the string conversion stuff in a program that only needs the emu library but not the player. For in_vgm I also want to be able to use the mutex functions (for thread safety) despite not needing any of the
I actually planned to move it to vgmrips once libvgm becoming "stable". (= C-API for the player library) While preferring to keep all the current components in the same repo, I'm not completely against it. |
I've been lurking around the ongoing development and discussion, excuse me for dropping in like this.
I would definitely appriciate the audio components being split for future reuse.
I would say offering support for both a 'modern' system as CMake or Meson and a 'traditional' system as (auto)make would seem a good solution to me. |
I 100% agree with splitting audio out. Having it in isn't the biggest deal (you can just not build it). My interest is primarily in writing plugins for other players that handle audio and synchronization for me. I do want to voice, I used to really dislike cmake, it is frustrating how there's not a whole lot of good documentation on being a cmake user, most docs are on writing cmake files, and cross-compiling on automake is pretty easy - you just pass LDFLAGS and C(XX)FLAGS for finding your libraries and includes, set the appropriate CC, and you're probably good to go. Once I discovered the toolchain file and how to tell cmake "here's where my stuff is" it got so much better. I'd imagine using a toolchain file on Windows is pretty crucial. Still haven't figured out how to tell Meson "here's my stuff" so I'm not a big fan. |
I'm fine with the audio split. However I'll leave it to you to come up with a library name. :P While at it, the utils package could become a separate repo as well. CMake is going to stay the primary build system, as this is what I know best. |
you might benefit from a separate, reusable file stream library that wraps stdio, memory buffers, transparent gzip read/write and recurses through directories and archives such as zip files |
Currently, including the utils sub-library in a project pulls lots of other stuff that you may not need.
For example, the audio library uses utils for threading stuff, but this also pulls the DataLoader (incl. zlib) and string conversion (incl. iconv) functions in, which it does not need.
Currently, there are 3 categories:
I want at least different CMake targets for those. Having separate pkg-config entries should be useful as well.
The text was updated successfully, but these errors were encountered: