muse for windows
Posted: Tue Dec 25, 2018 7:28 am
Hi, I am looking into compiling MusE for Windows. If there is some collective effort, I think it is well possible to do.
So far, I did this: Prepared a MSYS2/mingw environment on Windows.
Created a custom compile_muse.sh (compile_muse_mingw.sh).
Now, there are some functions that are Linux specific and need to be changed throughout the code. I advise the maintainer to do so, for more cross-compatibility.
exp10(what_it_is) needs to be changed to pow(10, what_it_is). For example, I found:
muse3\muse\widgets\mmath.cpp
fr = exp10(lx - p10);
fr = pow(10, (lx - p10));
rv = fr * exp10(p10);
rv = fr * pow(10, (p10));
muse3\muse\widgets\scldiv.cpp
firstTick = exp10(lFirst);
firstTick = pow(10, lFirst);
lastTick = exp10(lLast);
lastTick = pow(10, lLast);
val = d_majMarks[0] / exp10(d_majStep);
val = d_majMarks[0] / pow(10, d_majStep);
minFactor = MusECore::qwtMax(exp10(minStep), 10.0);
minFactor = MusECore::qwtMax(pow(10, minStep), 10.0);
val = firstTick / exp10(d_majStep);
val = firstTick / pow(10, d_majStep);
muse3\muse\widgets\spinboxFP.cpp
double div = exp10(decimals());
double div = pow(10, decimals());
double step = 1.0 / exp10(val);
double step = 1.0 / pow(10, val);
int div = int(exp10(_decimals));
int div = int(pow(10, _decimals));
double div = int(exp10(_decimals));
double div = int(pow(10, _decimals));
At this point, MusE will run cmake correctly (some libraries won't be included, but I will get on that later, when the core MusE will compile) and will compile to about 25%.
Now, I am investigating the next steps. There are Posix calls that need to be replaced or rewritten, as they are not available on Windows systems (probably, Mac either). The includes to sys/wait.h, sys/resources.h, etc., need to be addressed. I will isolate the functions that are needed and let's cross fingers.
So far, I did this: Prepared a MSYS2/mingw environment on Windows.
Created a custom compile_muse.sh (compile_muse_mingw.sh).
Now, there are some functions that are Linux specific and need to be changed throughout the code. I advise the maintainer to do so, for more cross-compatibility.
exp10(what_it_is) needs to be changed to pow(10, what_it_is). For example, I found:
muse3\muse\widgets\mmath.cpp
fr = exp10(lx - p10);
fr = pow(10, (lx - p10));
rv = fr * exp10(p10);
rv = fr * pow(10, (p10));
muse3\muse\widgets\scldiv.cpp
firstTick = exp10(lFirst);
firstTick = pow(10, lFirst);
lastTick = exp10(lLast);
lastTick = pow(10, lLast);
val = d_majMarks[0] / exp10(d_majStep);
val = d_majMarks[0] / pow(10, d_majStep);
minFactor = MusECore::qwtMax(exp10(minStep), 10.0);
minFactor = MusECore::qwtMax(pow(10, minStep), 10.0);
val = firstTick / exp10(d_majStep);
val = firstTick / pow(10, d_majStep);
muse3\muse\widgets\spinboxFP.cpp
double div = exp10(decimals());
double div = pow(10, decimals());
double step = 1.0 / exp10(val);
double step = 1.0 / pow(10, val);
int div = int(exp10(_decimals));
int div = int(pow(10, _decimals));
double div = int(exp10(_decimals));
double div = int(pow(10, _decimals));
At this point, MusE will run cmake correctly (some libraries won't be included, but I will get on that later, when the core MusE will compile) and will compile to about 25%.
Now, I am investigating the next steps. There are Posix calls that need to be replaced or rewritten, as they are not available on Windows systems (probably, Mac either). The includes to sys/wait.h, sys/resources.h, etc., need to be addressed. I will isolate the functions that are needed and let's cross fingers.