aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2020-04-21 00:20:23 +0200
committercbdev <cb@cbcdn.com>2020-04-21 00:20:23 +0200
commitbc275e10defe27e6d288ccf9125fe9b915168240 (patch)
treed27a955332d1d1c187352dbe9631117d4e93bfc0
parent918fb606174dcf42553be65e3d2306996c52488f (diff)
downloadmidimonster-bc275e10defe27e6d288ccf9125fe9b915168240.tar.gz
midimonster-bc275e10defe27e6d288ccf9125fe9b915168240.tar.bz2
midimonster-bc275e10defe27e6d288ccf9125fe9b915168240.zip
Do not load lua backend automatically on Windows
-rw-r--r--.travis-ci.sh3
-rw-r--r--.travis.yml2
-rw-r--r--backends/Makefile2
-rw-r--r--backends/libmmbackend.c7
-rw-r--r--backends/lua.md5
-rw-r--r--backends/rtpmidi.c2
6 files changed, 15 insertions, 6 deletions
diff --git a/.travis-ci.sh b/.travis-ci.sh
index c832f2c..5272fde 100644
--- a/.travis-ci.sh
+++ b/.travis-ci.sh
@@ -71,7 +71,9 @@ elif [ "$TASK" = "windows" ]; then
if make windows; then
exit "$?"
fi
+ # Build the lua backend but disable it by default to avoid scary error messages
make -C backends lua.dll
+ mv backends/lua.dll backends/lua.dll.disabled
travis_fold end "make_windows"
if [ "$(git describe)" == "$(git describe --abbrev=0)" ]; then
travis_fold start "deploy_windows"
@@ -80,6 +82,7 @@ elif [ "$TASK" = "windows" ]; then
mkdir ./deployment/docs
cp ./midimonster.exe ./deployment/
cp ./backends/*.dll ./deployment/backends/
+ cp ./backends/*.dll.disabled ./deployment/backends/
cp ./monster.cfg ./deployment/monster.cfg
cp ./backends/*.md ./deployment/docs/
cp -r ./configs ./deployment/
diff --git a/.travis.yml b/.travis.yml
index d7c25b6..8cf9e82 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -152,7 +152,7 @@ before_install:
#OS X uses something other than $CXX variable
- if [ "$TRAVIS_OS_NAME" == "linux" -a \( "$TASK" = "compile" -o "$TASK" = "sanitize" \) ]; then $CXX --version; fi
# Download libraries to link with on Windows
- - if [ "$TASK" == "windows" ]; then mkdir libs; wget "https://downloads.sourceforge.net/project/luabinaries/5.3.5/Windows%20Libraries/Dynamic/lua-5.3.5_Win64_dllw6_lib.zip" -O lua53.zip; unzip lua53.zip lua53.dll; mv lua53.dll libs; fi
+ - if [ "$TASK" == "windows" ]; then wget "https://downloads.sourceforge.net/project/luabinaries/5.3.5/Windows%20Libraries/Dynamic/lua-5.3.5_Win64_dllw6_lib.zip" -O lua53.zip; unzip lua53.zip lua53.dll; fi
notifications:
irc:
diff --git a/backends/Makefile b/backends/Makefile
index 1e66995..700c9b3 100644
--- a/backends/Makefile
+++ b/backends/Makefile
@@ -65,7 +65,7 @@ ola.so: CPPFLAGS += -Wno-write-strings
lua.so: CFLAGS += $(shell pkg-config --cflags lua53 || pkg-config --cflags lua5.3 || echo "-DBUILD_ERROR=\"Missing pkg-config data for lua53\"")
lua.so: LDLIBS += $(shell pkg-config --libs lua53 || pkg-config --libs lua5.3 || echo "-DBUILD_ERROR=\"Missing pkg-config data for lua53\"")
lua.dll: CFLAGS += $(shell pkg-config --cflags lua53 || pkg-config --cflags lua5.3 || echo "-DBUILD_ERROR=\"Missing pkg-config data for lua53\"")
-lua.dll: LDLIBS += -L../libs -llua53
+lua.dll: LDLIBS += -L../ -llua53
python.so: CFLAGS += $(shell pkg-config --cflags python3 || pkg-config --cflags python || echo "-DBUILD_ERROR=\"Missing pkg-config data for python3\"")
python.so: CFLAGS += $(shell pkg-config --libs python3 || pkg-config --libs python || echo "-DBUILD_ERROR=\"Missing pkg-config data for python3\"")
diff --git a/backends/libmmbackend.c b/backends/libmmbackend.c
index 2bbc226..92adc3c 100644
--- a/backends/libmmbackend.c
+++ b/backends/libmmbackend.c
@@ -20,8 +20,15 @@ int mmbackend_strdup(char** dest, char* src){
char* mmbackend_socket_strerror(int err_no){
#ifdef _WIN32
static char error[2048] = "";
+ ssize_t u;
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, WSAGetLastError(),
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), error, sizeof(error), NULL);
+ //remove trailing newline that for some reason is included in most of these...
+ for(u = strlen(error) - 1; u > 0; u--){
+ if(!isprint(error[u])){
+ error[u] = 0;
+ }
+ }
return error;
#else
return strerror(err_no);
diff --git a/backends/lua.md b/backends/lua.md
index e59e513..0a31dce 100644
--- a/backends/lua.md
+++ b/backends/lua.md
@@ -101,7 +101,6 @@ the MIDIMonster project can not provide this file within this repository.
You will need to acquire a copy of `lua53.dll`, for example by downloading it from the [luabinaries
project](http://luabinaries.sourceforge.net/download.html).
-To build the `lua` backend for Windows, place `lua53.dll` in a subdirectory `libs/` in the project root
-and run `make lua.dll` inside the `backends/` directory.
-
+Place this file in the project root directory and run `make lua.dll` inside the `backends/` directory
+to build the backend.
At runtime, Windows searches for the file in the same directory as `midimonster.exe`.
diff --git a/backends/rtpmidi.c b/backends/rtpmidi.c
index 52cb0c5..7df8563 100644
--- a/backends/rtpmidi.c
+++ b/backends/rtpmidi.c
@@ -525,7 +525,7 @@ static int rtpmidi_applecommand(instance* inst, struct sockaddr* dest, socklen_t
//FIXME should we match sending/receiving ports? if the reference does this, it should be documented
bytes = sendto(control ? data->control_fd : data->fd, frame, sizeof(apple_command) + strlen(inst->name) + 1, 0, dest, dest_len);
if(bytes != sizeof(apple_command) + strlen(inst->name) + 1){
- LOGPF("Failed to transmit session command on %s", inst->name);
+ LOGPF("Failed to transmit session command on %s: %s", inst->name, mmbackend_socket_strerror(errno));
return 1;
}
return 0;