kcat / alure

Alure is a utility library for OpenAL, providing a C++ API and managing common tasks that include file loading, caching, and streaming
zlib License
70 stars 20 forks source link

added cmake and build instructions for windows to the readme, put tod… #13

Closed Cazadorro closed 6 years ago

Cazadorro commented 6 years ago

…o for linux

Cazadorro commented 6 years ago

Meant to make an issue about this but I messed up ordering. All this is is expanding on build/cmake instructions especially for windows.

kcat commented 6 years ago

Alure requires the OpenAL soft library (libopenal.dll, libopenal.a, libopenal.dll.a) to be available and on the path of your system.

It should only need OpenAL development files installed, not specifically OpenAL Soft. Creative's OpenAL SDK (available from openal.org) works just fine too on Windows, and may even actually work better since CMake's FindOpenAL script will read the registry to automatically find its install path, while using the OpenAL Soft binary download will need the user to either copy the libs and headers to where the compiler will see them or set OPENALDIR for cmake to find it (unless using a package manager that automatically installs the development files to the compiler's paths). To get the most out of Alure it's best to have OpenAL Soft's shared lib at runtime, but this doesn't necessarily influence build-time (maybe on OSX it does which uses a framework for its built-in OpenAL, while OpenAL Soft builds as a plain dylib).

Additional optional dependencies are used for playback of files, which include: ...

  • PhysFS: libphysfs.dll.a
  • dumb: libdumb.dll.a

These are only used for a couple examples, so it might be misleading to list them there like that.

Also, those filenames are Windows- and MinGW-centric, but are under the general Building section.

Some of the optional files are required for building the examples provided. You can disable building these examples if you wish by setting the cmake variable ALURE_BUILD_EXAMPLES to OFF or un-checking it in the cmake gui

This comes across a bit confusing, implying you need to disable the examples if you don't have the optional dependencies. Any examples that need dependencies will be automatically skipped if the dependencies aren't found. Turning off ALURE_BUILD_EXAMPLES will disable building all examples, even if the dependencies exist and even the ones that don't have dependencies.

After installation, you will want to run make install in your cmake build directory in order to install OpenAL on your system

That will install Alure, not OpenAL. Make also won't work if the user is using some other build system (the default on Windows is a VS project I believe, and maybe an Xcode project on OSX?).

Cazadorro commented 6 years ago

It should only need OpenAL development files installed ...

Ok I didn't realize that, I thought it required openal Soft specifically

These are only used for a couple examples, so it might be misleading to list them there like that.

Ok I'll change that to reflect that those depenencies are only for examples, and not for decoders or anything.

Also, those filenames are Windows- and MinGW-centric, but are under the general Building section.

Ok I'll get rid of the file names there to avoid confusion.

This comes across a bit confusing, implying you need to disable the examples if you don't have the optional dependencies. Any examples that need dependencies will be automatically skipped if the dependencies aren't found. Turning off ALURE_BUILD_EXAMPLES will disable building all examples, even if the dependencies exist and even the ones that don't have dependencies.

Correct me if I'm wrong, so PHSYFS and DUMB are the only dependencies that are actually a requirement for any of the examples?

That will install Alure, not OpenAL. Make also won't work if the user is using some other build system (the default on Windows is a VS project I believe, and maybe an Xcode project on OSX?).

That was a typo my bad.

Cazadorro commented 6 years ago

Updated build instructions for linux as well, wasn't sure which version of the libflac api was used however, I'm guessing it was just libflac8, the c api, but I included both versions just incase (ubuntu launch pad description claims the only difference is one is c++ and the other is c).

kcat commented 6 years ago

I'm guessing it was just libflac8, the c api

Yes, libflac++ isn't needed. It's just a C++ wrapper over top of libflac, so Alure uses the latter to cut down on dependencies.