Skip to content
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

windows binary release #98

Closed
nicolasjinchereau opened this issue Aug 27, 2018 · 34 comments
Closed

windows binary release #98

nicolasjinchereau opened this issue Aug 27, 2018 · 34 comments

Comments

@nicolasjinchereau
Copy link

Are there any plans to add a Windows binary to the releases, either as a standalone or VLC plugin?

@revmischa
Copy link
Collaborator

Sure, someone needs to just do it. Want to? I don’t have windows.

@jbkempf
Copy link

jbkempf commented Aug 27, 2018

I've started to port projectM 3 to VLC, but there are a lot of warnings and compilation issues.

We'll get to it, though.

@revmischa
Copy link
Collaborator

Excellent, let us know if we can help out!

@nicolasjinchereau
Copy link
Author

nicolasjinchereau commented Aug 27, 2018

I would help if I could, but I don't know how VLC plugins work, and wouldn't know how to interface with system audio if I tried to make a standalone build. If porting the code as a library is a blocker, I could probably help with that.

Edit

Is the screensaver version not currently working?
https://github.com/projectM-visualizer/projectm/tree/master/src/projectM-screensaver

@ghost
Copy link

ghost commented Sep 2, 2018

I can contribute, where to start?

@revmischa
Copy link
Collaborator

Start with the GLSL branch #26 (soon to be merged to master).

I don't know if there is some way to use autotools on windows?

I can write up how to build projectM from scratch if that'll be helpful

@ghost
Copy link

ghost commented Sep 2, 2018 via email

@revmischa
Copy link
Collaborator

Is this helpful at all? Let me know if you have any questions or need more details
https://github.com/projectM-visualizer/projectm/blob/bbc88deb5bd82bd55dd2d67ae5427679a2cd7b09/BUILDING.md

@ghost
Copy link

ghost commented Sep 2, 2018

Looks good, thanks. I will open new issues as required.

@dzarda
Copy link
Contributor

dzarda commented Dec 2, 2018

I managed to get the thing compiled on Cygwin with --enable-sdl. Ended up with the following cyg packages installed (some may not be required):

autoconf,autoconf,automake,gcc-g++,libGLESv2-devel,libSDL2-devel,libglut-devel,libtool,make,pkg-config

Also,

  • I added local implementations of strdup and strcasecmp in hlslparser/src/Engine.cpp to evade nonstandardness bs
  • Simplified #ifdef WIN32 platform-dependent include logic (needed for both __unix__ and WIN32 macros at the same time)
  • Added two includes to config.h: #include <alloca.h> and <ctype.h>

Also, set the GL_LIBS variable before configure:

  • GL_LIBS=-lglut\ -lglu\ -lgl\ -lopengl32
  • export GL_LIBS

Will provide a PR if this way proves valid.


However, upon execution, I get the following output. My knowledge ends here. Does anybody know what may be wrong?

INFO: GL_VERSION: (null)
INFO: GL_SHADING_LANGUAGE_VERSION: (null)
INFO: GL_VENDOR: (null)
[projectM] config file: /usr/local/share/projectM/config.inp
Failed to compile shader 'Vertex: v2f_c4f'. Error:
Failed to compile shader 'Fragment: v2f_c4f'. Error:
Failed to link program:
Failed to compile shader 'Vertex: v2f_c4f_t2f'. Error:
Failed to compile shader 'Fragment: v2f_c4f_t2f'. Error:
Failed to link program:
Failed to compile shader 'Vertex: blur1'. Error:
Failed to compile shader 'Fragment: blur1'. Error:
Failed to link program:
Failed to compile shader 'Vertex: blur2'. Error:
Failed to compile shader 'Fragment: blur2'. Error:
Failed to link program:
[PresetFactory] url is idle://Geiss & Sperl - Feedback (projectM idle HDR mix).milk
      1 [] projectMSDL 14368 cygwin_exception::open_stackdumpfile: Dumping stack trace to projectMSDL.exe.stackdump

@revmischa
Copy link
Collaborator

Looks like GL is not initialized. Is this the sdl app? Do you have the latest code for it from master?

@dzarda
Copy link
Contributor

dzarda commented Dec 2, 2018

It is indeed the SDL application with the latest master.

@revmischa
Copy link
Collaborator

Is SDL compiled with openGL support and other required video pieces?

@dzarda
Copy link
Contributor

dzarda commented Dec 6, 2018

I'm looking at that now. Dependency Walker shows following dependencies, where CYGSDL2-2-0-0.DLL seems to have no GL deps. Suspicious.

c:\tools\cygwin\bin\PROJECTMSDL.EXE:

  • c:\tools\cygwin\bin\CYGWIN1.DLL
  • c:\tools\cygwin\bin\CYGGL-1.DLL
  • c:\tools\cygwin\bin\CYGSDL2-2-0-0.DLL
    • c:\tools\cygwin\bin\CYGWIN1.DLL
    • c:\windows\system32\ADVAPI32.DLL
    • c:\windows\system32\KERNEL32.DLL
    • c:\windows\system32\WINMM.DLL
  • c:\tools\cygwin\bin\CYGGCC_S-SEH-1.DLL
  • c:\tools\cygwin\bin\CYGSTDC++-6.DLL
  • c:\windows\system32\KERNEL32.DLL

One way may be compiling SDL from source, but my first try at this generates SDL2.dll, not CYGSDL2.dll as seems to be required.

Or trying the MinGW or MSVC way. Tips needed.

@revmischa
Copy link
Collaborator

Wish I had some tips to give.. I'm useless with Windows. You can't just use the SDL2.dll provided on the libsdl site?

@ghost
Copy link

ghost commented Dec 6, 2018 via email

@dzarda
Copy link
Contributor

dzarda commented Dec 7, 2018

I have. I'm wondering if there's a way to use the. /configure script to generate vcproj files. Highly doubtful though.

Will probably require manually dragndropping libProjectM @ SDL project sources into VS

@dzarda
Copy link
Contributor

dzarda commented Dec 17, 2018

I'm in the process of trying to build within MSYS2/MinGW64. All in all, this feels more complete than Cygwin.

@dzarda
Copy link
Contributor

dzarda commented Jan 5, 2019

No luck. The SDL included in MSYS is built without OpenGL support. The package build script includes just --enable-video-vulkan as ./configure parameter.

I decided to build SDL2 myself. The osmesa OpenGL implementation available in MSYS2 seems to be the right way. I compiled SDL2 with --enable-video-opengl.

Compiling and running projectM-SDL with this however yielded the same result as in Cygwin - GL_VERSION: (null) etc.

I must be doing something terribly wrong.


PS I tried debugging and gaining some info on what's actually wrong during execution. Return values of SDL_CreateWindow and SDL_GL_CreateContext were examined (projectM_sdl_main.cpp:94):

    SDL_Window *win = SDL_CreateWindow("projectM", 0, 0, width, height, SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE);

    if (win == nullptr) {
        SDL_Log("SDL_CreateWindow failed: %s", SDL_GetError());
    }

    SDL_GLContext glCtx = SDL_GL_CreateContext(win);

    if (glCtx == nullptr) {
        SDL_Log("SDL_GL_CreateContext failed: %s", SDL_GetError());
    }

The log calls were never reached. SDL must be thinking everything's alright in the OpenGL department.

@dzarda
Copy link
Contributor

dzarda commented Jan 5, 2019

IMO there are multiple ways ahead regarding Windows:

  1. Some kernel-level more experienced developer needs to step up and make this work (unlikely)
  2. We might try to go the MSVC way. Aside from the apparent need (?) of managing the project files/configuration in Visual Studio in parallel with the ./configure pipeline, there may be hurdles unknown to me.
  3. The emscripten/wasm way might prove to be the way forward.

@ghost
Copy link

ghost commented Jan 5, 2019 via email

@ghost
Copy link

ghost commented Mar 17, 2019

the system is barely able to compile on windows (I had to resurrect/modify the old cmake build to regenerate msvc projects and solutions). The SDL2 does not work with my hardware so I cannot test that part, but if I set the fake_audio, it works great! However, the build did require many changes that need preprocessor definitions to prevent breakage of other operating systems. What are the maintenance plans for this project to keep the windows build files in sync with autogen?

@revmischa
Copy link
Collaborator

amazing thanks

On macos I have an Xcode workspace that was mostly straightforward to set up and keep in sync with things. Don’t know if something similar on Windows is easy or not.

Of course a cross platform solution would be nice.

Someone is working on seeing if meson would work. Don’t know if it works with windows.

@dzarda
Copy link
Contributor

dzarda commented Mar 17, 2019

@mancoast Sweet, mind releasing the changed you made?

@ghost
Copy link

ghost commented Mar 17, 2019 via email

@ghost
Copy link

ghost commented Mar 21, 2019

#181

Ready to go

@ghost
Copy link

ghost commented Mar 22, 2019

#182 initiated windows x64 continuous integration. @revmischa can you please enable appveyor to build on this repo? then each commit to this repo will automatically generate binary archives for windows.

@revmischa
Copy link
Collaborator

Sure, just tell me what to do

@ghost
Copy link

ghost commented Mar 23, 2019 via email

@revmischa
Copy link
Collaborator

Ok done - not sure if you can view it or not https://ci.appveyor.com/project/revmischa/projectm/builds/23306362/job/6qtay8siv0o0eptx

@ghost
Copy link

ghost commented Mar 23, 2019 via email

@dzarda
Copy link
Contributor

dzarda commented Mar 26, 2019

Great stuff, it works!

@dzarda
Copy link
Contributor

dzarda commented Apr 1, 2019

Real input working confirmed:

  • Enabled Stereo Mix and disabled all other input devices
  • Turned FAKE_AUDIO back off

@revmischa
Copy link
Collaborator

awesome @dzarda want to post a PR with changes/docs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants