projectM-visualizer / frontend-sdl2

Standalone application based on SDL2 that turns your desktop audio into awesome visuals. Available on most platforms supported by both libprojectM and libSDL2.
GNU General Public License v3.0
58 stars 32 forks source link

Configuration File on windows (SDL)? #5

Closed esheris closed 1 year ago

esheris commented 4 years ago

Hello, I am using the SDL version for windows on windows 10. I'd like to use a config file to adjust the hard cuts and time for each preset but there doesn't seem to be a place the exe looks that is legitimate on windows. Here is the output just from running the exe. obviously the /usr/share directory doesn't exist on windows.. INFO: GL_VERSION: 3.2.0 NVIDIA 441.41 INFO: GL_SHADING_LANGUAGE_VERSION: 1.50 NVIDIA via Cg compiler INFO: GL_VENDOR: NVIDIA Corporation INFO: Using data directory: /usr/local/share/projectM INFO: Looking for configuration file in data dir: /usr/local/share/projectM. INFO: Config file not found, using built-in settings. I tried putting a file in the directory i'm running the exe out of but it doesn't attempt to pick it up.

milkdropper commented 4 years ago

I got it working by dropping a config in C:\usr\local\share\projectM\

I would prefer it load from the current working directory in Windows, but others might prefer a more appropriate directory.

goosewobbler commented 3 years ago

For anyone wondering where the conf file on windows is stored now, it should read settings from this file C:/Users/<Username>/.projectM/config.inp.

revmischa commented 3 years ago

I think this is important to document in the README if someone would like to do that

goosewobbler commented 3 years ago

Yeah, I can do this

kblaschke commented 2 years ago

The next release will use the more standard %AppData% path to store the configuration. The SDL application will probably try to read the old one first and move it to the new location automatically.

I'll add the proper documentation.

goosewobbler commented 2 years ago

Sorry wasn't able to fill in any gaps here, too many other things on the go. Pleased to see these nits being picked up.

RapidRabbit-11485 commented 2 years ago

Sorry to pile onto an old issue, but the links to config.inp templates on the SDL Wiki appear to be 404'ing. I'm unable to find a sample template to use, and projectM isn't creating one. Can these links be fixed?

kblaschke commented 2 years ago

It's a rather new issue, I've created that page just a few days ago. Seems the GitHub wiki parser does strange things with links, will look into it to fix it

For the time being, you can just use the one from the source repo, and edit any lines with @ placeholders. You also don't need to set the title/menu font paths for now, these aren't used currently. Also remember to rename it to config.inp.

https://raw.githubusercontent.com/projectM-visualizer/projectm/master/src/libprojectM/config.inp.cmake.in

murtaza-nasir commented 2 years ago

Any update on the config file? I installed ProjectM through steam and can't find the config file in either the steam projectm directory, the appdata directory, or the .projectm directory in users//. I can't find a sample template either. Can't seem to find any file named config.inp.cmake.in. Any help will be appreciated. I just want to increase the random preset time, and if possible also to slow down the overall animation speed and increase the mesh size.

kblaschke commented 2 years ago

There will be a completely new config file handling in the rewritten app in this repository here. The ones released on Steam and possibly other places are old versions which used the config file format libprojectM has built-in. The default config file can be found in the libprojectM repository, which still has the original SDL app as a test UI: https://raw.githubusercontent.com/projectM-visualizer/projectm/master/src/sdl-test-ui/config.inp

On Windows, the old version should look for a config file named %USERPROFILE%\.projectM\config.inp.

This new app here implements a new configuration format, which allows to change many more options than the original app. To avoid confusion, it has both a new filename (projectMSDL.properties) and the user-specific config file is now located in the proper default configuration paths on each OS. Since the app isn't fully done for the initial release, but once it's feature-complete, I'll write a documentation for the configuration settings in the project wiki.

kblaschke commented 1 year ago

I've relased a development build of the rewritten frontend two months ago, which comes with a new configuration file format and many additional settings.

Please try out this build, it runs from any directory and has no hardcoded paths anymore. The configuration file will be search in the application's EXE dir and at %APPDATA%/projectM/projectMSDL.properties. Settings in the latter one will take precedence over the file in the application dir if it exists.

https://github.com/kblaschke/frontend-sdl2/releases/tag/2.0-windows-pre1

The configuration file is well commented, so even without a documentation it should be clear what each setting does.

I'm closing this issue for now as the initial issue (hardcoded path and old config file) is fixed.