diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..febc2015 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,18 @@ +language: cpp +dist: bionic +addons: + apt: + packages: + - g++ + - make + - libboost-all-dev + - libomp-dev +script: + - cd src + - make -f Makefiles/Makefile_linux_shared + - make install -f Makefiles/Makefile_linux_shared + - cd ../examples + - export LD_LIBRARY_PATH=$PWD + - cp Makefiles/Makefile_linux Makefile + - make + - ./AnalysePlayBin diff --git a/src/Makefiles/Makefile_linux_shared b/src/Makefiles/Makefile_linux_shared index ec4a2c8a..1db293ee 100644 --- a/src/Makefiles/Makefile_linux_shared +++ b/src/Makefiles/Makefile_linux_shared @@ -119,8 +119,8 @@ clean: install: test -d ../test || mkdir ../test test -d ../examples || mkdir ../examples - cp $(STATIC_LIB) ../test - cp $(STATIC_LIB) ../examples + cp $(SHARED_LIB) ../test + cp $(SHARED_LIB) ../examples include $(INCL_DEPENDS) diff --git a/src/System.cpp b/src/System.cpp index 3deb5180..a3c237d9 100644 --- a/src/System.cpp +++ b/src/System.cpp @@ -225,7 +225,8 @@ void System::GetHardware( #ifdef __linux__ // The code for linux was suggested by Antony Lee. FILE * fifo = popen( - "free -k | tail -n+3 | head -n1 | awk '{print $NF}'", "r"); + "grep -Po 'MemAvailable:\\s*\\K[0-9]*' /proc/meminfo || " + "grep -Po 'MemFree:\\s*\\K[0-9]*' /proc/meminfo", "r"); int ignore = fscanf(fifo, "%llu", &kilobytesFree); fclose(fifo); diff --git a/src/dds.cpp b/src/dds.cpp index fad30225..20afa4a2 100644 --- a/src/dds.cpp +++ b/src/dds.cpp @@ -34,7 +34,6 @@ extern "C" BOOL APIENTRY DllMain( else if (ul_reason_for_call == DLL_PROCESS_DETACH) { CloseDebugFiles(); - FreeMemory(); #ifdef DDS_MEMORY_LEAKS_WIN32 _CrtDumpMemoryLeaks(); #endif @@ -59,7 +58,6 @@ void DDSInitialize(void) void DDSFinalize(void) { CloseDebugFiles(); - FreeMemory(); } #elif defined(USES_CONSTRUCTOR) @@ -73,7 +71,6 @@ static void __attribute__ ((constructor)) libInit(void) static void __attribute__ ((destructor)) libEnd(void) { CloseDebugFiles(); - FreeMemory(); } #endif