jberg / milkdrop-preset-converter

Convert Milkdrop presets to Butterchurn JSON format
MIT License
15 stars 5 forks source link

Can't successfully build on any OS #1

Closed LeetCodes closed 6 years ago

LeetCodes commented 6 years ago

Hi, I'm trying to get this to work but get errors on every OS, any help would be greatly appreciated

on Windows I get

Make Error at hlsl2glslfork/CMakeLists.txt:202 (add_library):
  Cannot find source file:

    hlslang/OSDependent/Windows/main.cpp

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx

-- Build files have been written to: C:/AudioVis/milkdrop-preset-converter-master/milkdrop-preset-converter-master/node_modules/milkdrop-shader-converter/build
CMake Error at hlsl2glslfork/CMakeLists.txt:202 (add_library):
  No SOURCES given to target: hlsl2glsl

ERR! OMG Process terminated: 1

on RHEL and Debian I get

/data/audiovis/milkdrop-preset-converter/node_modules/milkdrop-shader-converter/hlsl2glslfork/hlslang/OSDependent/Linux/osinclude.h:13:2: error: #error Trying to include a Linux specific file in a non-Linux build.
 #error Trying to include a Linux specific file in a non-Linux build.
  ^
gmake[2]: *** [hlsl2glslfork/CMakeFiles/hlsl2glsl.dir/hlslang/GLSLCodeGen/hlslLinker.cpp.o] Error 1
gmake[1]: *** [hlsl2glslfork/CMakeFiles/hlsl2glsl.dir/all] Error 2
gmake: *** [all] Error 2
ERR! OMG Process terminated: 2

I didn't save the error from OS X, will update

The OS doesn't really matter to me tho, I would just really like to get it working if possible

jberg commented 6 years ago

Hi @LeetCodes , sorry for the delay. I have actually only built this on OS X, if you could share the error from that build I will try to track it down.

Thanks!

jberg commented 6 years ago

I got the same error trying to build on Ubuntu, I'll be trying to get it fixed and building on Linux.

Thanks

LeetCodes commented 6 years ago

Thank you for looking into it, and thank you for all your work, butterchurn is extraordinary, I will try to build on OS X again, it may of been a permission issue or something simple, I was just pessimistic after trying on linux and windows

jberg commented 6 years ago

Thanks! Sorry for all the lack of docs, I really need to spend some time making this stuff more usable :-/

I've uploaded a new version of the shader-converter and I was able to build it on Ubuntu after installing the following packages: bison flex freeglut3-dev libglew-dev

Can you try building the latest version? Thanks!

LeetCodes commented 6 years ago

I got it working on debian 9 with the packages you mentioned, but it seems to hang on some complex presets, I'm just running it in a VM right now, does it actually process the visualizations using GPU? How resource intensive is the converting process expected to be? I got it to work with about 3/4 of the presets I've tried so far, but I can install Linux on host instead of VM if it needs more system resources

jberg commented 6 years ago

Awesome, glad you got it working and some presets converting. The way things are now some presets will take a really long time to convert. I need to add some options in to allow some more control

Right now every set of equations (per frame, per vertex, all the wave and shape equations) each individually get run through the Google Closure Compiler to optimize that Javascript. This is a mostly unnecessary step, but useful when I don't care about time and am making the converted presets that get deployed to NPM. Thats probably what is taking a long time.

It does not currently use the GPU for anything. The underlying libraries use openGL in the tests, which is why the libs needed to be installed when building. I'm working on getting rid of that dependency since we don't need to run those tests.

Also there is still a small subset of presets that the HLSL->GLSL conversion fails for, but that will throw an error, not just hang...hopefully =]

jberg commented 6 years ago

Also over in https://github.com/captbaritone/webamp we are working on getting presets converting in the browser: https://github.com/captbaritone/webamp/pull/630

You can test dragging a .milk file into the visualizer here: https://deploy-preview-630--ecstatic-poincare-fe4c13.netlify.com/

LeetCodes commented 6 years ago

that's great, going from .milk to browser visualization was on my list of things to look into, any chance you've gotten things like, text and sprites or anything like that working? for example, burning in the song title into the visualization

jberg commented 6 years ago

No, unfortunately I haven't been able to get the text working. I haven't looked into sprites, but it shouldn't be hard.

LeetCodes commented 6 years ago

if you ever get sprites working, it also wouldn't be hard to just generate an image with any desired text and use that as a sprite, that's what I do currently in winamp but it would be even easier using JS

jberg commented 6 years ago

closing since building seems to be working, at least on OS X and Linux