Difference between revisions of "ALUT"
Jump to navigation
Jump to search
(→Windows specific actions: Removed instructions with the precompiled ALUT lib) |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 11: | Line 11: | ||
== Windows specific actions == |
== Windows specific actions == |
||
+ | The following must be installed first: |
||
− | '''N.B. This is work in progress''' |
||
+ | * MSYS2 or MinGW/MSYS |
||
+ | * [[OpenAL]] |
||
+ | * The C++ package of ALUT, freealut |
||
+ | To install freealut: |
||
− | Before installing the Haskell package, you need to install the C++ package of ALUT: |
||
+ | * Start a shell |
||
+ | * Go to the directory where you want the freealut source code, for example <code>C:\Temp</code> |
||
+ | * Fetch the source code with [[Git]]: |
||
+ | : <code>git clone https://github.com/vancegroup/freealut.git</code> |
||
+ | * Install [https://cmake.org/ CMake] |
||
+ | * Set the search path in such a way that there is no sh.exe in it; you can use command <code>where sh</code> to find the directories that must be removed (CMake seems to be allergic to sh.exe) |
||
+ | * Start cmake-gui |
||
+ | * Enter the directory of the freealut source code (<code>C:\Temp\freealut</code>) and the directory where you want the compile result, for example <code>C:\Temp\freealut\build</code> |
||
+ | * Add the entries in the table below, by pressing "Add Entry" for each entry |
||
+ | {| |
||
+ | | Name |
||
+ | | Type |
||
+ | | Value |
||
+ | |- |
||
+ | | <code>CMAKE_GENERATOR</code> |
||
+ | | <code>String</code> |
||
+ | | <code>MinGW Makefiles</code> |
||
+ | |- |
||
+ | | <code>OPENAL_INCLUDE_DIR</code> |
||
+ | | <code>Filepath</code> |
||
+ | | the directory containing the OpenAL header file |
||
+ | |- |
||
+ | | <code>CMAKE_INSTALL_PREFIX</code> |
||
+ | | <code>Filepath</code> |
||
+ | | <code>C:\Libraries\ALUT</code> |
||
+ | |} |
||
+ | * Press "Configure" |
||
+ | * Press "Generate"; this will generate a makefile |
||
+ | * Edit freealut\include\AL\alut.h: |
||
+ | : Change line 34: |
||
+ | : <code> #define ALUT_APIENTRY __cdecl</code> |
||
+ | : to: |
||
+ | : <code> #define ALUT_APIENTRY __stdcall</code> |
||
+ | * In the shell, go to the directory where you want the compile result, for example <code>C:\Temp\freealut\build</code> |
||
+ | * Start the MSYS shell: |
||
+ | : <code>sh</code> |
||
+ | * Run the make utility: |
||
+ | : <code>mingw32-make install</code> |
||
* Set environment variables as follows: |
* Set environment variables as follows: |
||
<pre> |
<pre> |
||
Set LIBRARY_DIR=C:\Libraries |
Set LIBRARY_DIR=C:\Libraries |
||
− | Set C_INCLUDE_PATH=%LIBRARY_DIR%\ |
+ | Set C_INCLUDE_PATH=%LIBRARY_DIR%\ALUT\include;%C_INCLUDE_PATH% |
− | Set LIBRARY_PATH=%LIBRARY_DIR%\ |
+ | Set LIBRARY_PATH=%LIBRARY_DIR%\ALUT\lib;%LIBRARY_PATH% |
− | Set PATH=%LIBRARY_DIR%\ |
+ | Set PATH=%LIBRARY_DIR%\ALUT\bin;%PATH% |
</pre> |
</pre> |
||
:If you need these variables more often, set them [http://www.computerhope.com/issues/ch000549.htm permanently]. |
:If you need these variables more often, set them [http://www.computerhope.com/issues/ch000549.htm permanently]. |
||
+ | :The directory <code>%LIBRARY_DIR%\ALUT\bin</code> contains libalut.dll; this DLL must always be in the search path when you run an ALUT-using application. |
||
− | |||
+ | * Install ALUT: |
||
− | '''This is not sufficient to install the Haskell package ALUT; there will be linker errors''' |
||
+ | : <code>cabal install alut</code> |
||
− | |||
− | Maybe the C++ ALUT must be compiled from [https://github.com/vancegroup/freealut source]; this requires [https://cmake.org/ CMake] knowledge. |
||
== Additional software == |
== Additional software == |
Latest revision as of 10:44, 15 October 2015
This article is a stub. You can help by expanding it.
A binding for the OpenAL Utility Toolkit
Downloads
- Hackage: https://hackage.haskell.org/package/ALUT
- Repository: git clone https://github.com/haskell-openal/ALUT
Windows specific actions
The following must be installed first:
- MSYS2 or MinGW/MSYS
- OpenAL
- The C++ package of ALUT, freealut
To install freealut:
- Start a shell
- Go to the directory where you want the freealut source code, for example
C:\Temp
- Fetch the source code with Git:
- Install CMake
- Set the search path in such a way that there is no sh.exe in it; you can use command
where sh
to find the directories that must be removed (CMake seems to be allergic to sh.exe) - Start cmake-gui
- Enter the directory of the freealut source code (
C:\Temp\freealut
) and the directory where you want the compile result, for exampleC:\Temp\freealut\build
- Add the entries in the table below, by pressing "Add Entry" for each entry
Name | Type | Value |
CMAKE_GENERATOR
|
String
|
MinGW Makefiles
|
OPENAL_INCLUDE_DIR
|
Filepath
|
the directory containing the OpenAL header file |
CMAKE_INSTALL_PREFIX
|
Filepath
|
C:\Libraries\ALUT
|
- Press "Configure"
- Press "Generate"; this will generate a makefile
- Edit freealut\include\AL\alut.h:
- Change line 34:
#define ALUT_APIENTRY __cdecl
- to:
#define ALUT_APIENTRY __stdcall
- In the shell, go to the directory where you want the compile result, for example
C:\Temp\freealut\build
- Start the MSYS shell:
sh
- Run the make utility:
mingw32-make install
- Set environment variables as follows:
Set LIBRARY_DIR=C:\Libraries Set C_INCLUDE_PATH=%LIBRARY_DIR%\ALUT\include;%C_INCLUDE_PATH% Set LIBRARY_PATH=%LIBRARY_DIR%\ALUT\lib;%LIBRARY_PATH% Set PATH=%LIBRARY_DIR%\ALUT\bin;%PATH%
- If you need these variables more often, set them permanently.
- The directory
%LIBRARY_DIR%\ALUT\bin
contains libalut.dll; this DLL must always be in the search path when you run an ALUT-using application.
- Install ALUT:
cabal install alut
Additional software
- StateVar: This package contains state variables, which are references in the IO monad, like IORefs or parts of the OpenGL state
- OpenAL 3D sound software
- OpenGL 3D graphics software
An alternative to ALUT might be OALWrapper