Bug #350

gl-spectrum plugin support for Win32

Added by Carlo Bramini almost 4 years ago. Updated almost 4 years ago.

Status:Closed Start date:September 28, 2013
Priority:Minor Due date:
Assignee:- % Done:

100%

Category:plugins/gl-spectrum
Target version:3.5
Affects version:

Description

Hello,
I have fixed gl-spectrum plugin and now it is able to run on other platforms besides X11.

The plugin could not be compiled only with the changes to the source code, because the configure script still checks for glXChooseVisual() into GL library, that it could not be found.
Also, the Makefile has an hardcoded -lGL but again it won't work because the library to use may be different, for example in Windows it is -lopengl32.

So, what it must be still done is to detect the GL library to use (GL, opengl32 or MesaGL are some examples) at configure time.
A script could be written from scratch, or perhaps something already existing could be used, like autoconf OpenGL macros.
They are available here:

http://code.google.com/p/autoconf-gl-macros/

and at least these files (that are enough for our purposes):

ax_check_gl.m4
ax_lang_compiler_ms.m4

must be copied into the m4 directory of source tree of audacious-plugins.
By calling function AX_CHECK_GL, two macro will be created with proper value: GL_CFLAGS and GL_LIBS.
I added these macro into extra.mk.in and into src/gl-spectrum/Makefile and so it has been solved.
The tests seem to be already checking for GLX if X11 was found and the platform needs it, so in my solution I removed the code around the tests with glXChooseVisual() into configure.ac

Attached screenshot shows the plugin in action on Microsoft Windows.
Attached patch fixes the source code of the plugin and the stuff around it.

lst.txt Magnifier (5.8 kB) Carlo Bramini, September 28, 2013 00:33

spect.png (19.3 kB) Carlo Bramini, September 28, 2013 00:33

Associated revisions

Revision fb14f17c
Added by John Lindgren almost 4 years ago

gl-spectrum: Add support for Win32 based on patch from Carlo Bramini. Closes: #350.

History

#1 Updated by John Lindgren almost 4 years ago

  • Subject changed from gl-spectrum plugin fixed to gl-spectrum plugin support for Win32
  • Category set to plugins/gl-spectrum
  • Status changed from New to Closed
  • Target version set to 3.5
  • % Done changed from 0 to 100
  • Affects version deleted (3.5)

#2 Updated by Carlo Bramini almost 4 years ago

Sorry... unfortunately, I did a little mistake, because it is missing this line somewhere in configure.ac:

VISUALIZATION_PLUGINS="$VISUALIZATION_PLUGINS gl-spectrum"

otherwise the plugin won't be build, as I discovered after a clean checkout and compilation of the sources.

Also available in: Atom PDF