diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2014-10-28 09:06:06 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2014-10-28 09:09:39 +0100 |
commit | 589371a5aa5d552533e2412bc995ae2a60405bf5 (patch) | |
tree | 830022e3f4aa5a985d1a6fe5fa5af1afd1e8f4ba | |
parent | 87b6d1572369111c72015e78181bb6a463c3796d (diff) |
unbreak ftclient, needs MSVC no matter what
-rw-r--r-- | CMakeLists.txt | 13 | ||||
-rwxr-xr-x | bin/freetrackclient.dll | bin | 0 -> 75776 bytes | |||
-rw-r--r-- | freetrackclient/freetrackclient.c | 12 | ||||
-rw-r--r-- | freetrackclient/fttypes.h (renamed from ftnoir_protocol_ft/fttypes.h) | 1 | ||||
-rw-r--r-- | ftnoir_protocol_ft/ftnoir_protocol_ft.h | 2 | ||||
-rw-r--r-- | ftnoir_protocol_wine/opentrack-wrapper-wine-main.cxx | 2 |
6 files changed, 16 insertions, 14 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 5165b365..d0e7a6e6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -199,7 +199,7 @@ endif() opentrack_module(opentrack-compat compat) opentrack_module(opentrack-xplane-plugin x-plane-plugin) -opentrack_module(freetrackclient freetrackclient) +#opentrack_module(freetrackclient freetrackclient) if(SDK_XPLANE) # probably librt already included @@ -292,10 +292,10 @@ if(WIN32) opentrack_library(opentrack-proto-win32-mouse ftnoir_protocol_mouse) endif() -if(WIN32) - add_library(freetrackclient SHARED ${freetrackclient-c}) - set_target_properties(freetrackclient PROPERTIES PREFIX "") -endif() +#if(WIN32) +# add_library(freetrackclient SHARED ${freetrackclient-c}) +# set_target_properties(freetrackclient PROPERTIES PREFIX "") +#endif() opentrack_library(opentrack-proto-udp ftnoir_protocol_ftn) @@ -466,11 +466,12 @@ endif() if(WIN32) install(DIRECTORY ${CMAKE_SOURCE_DIR}/bin/tracker-ht DESTINATION .) - install(TARGETS freetrackclient RUNTIME DESTINATION . LIBRARY DESTINATION . ) + #install(TARGETS freetrackclient RUNTIME DESTINATION . LIBRARY DESTINATION . ) endif() install(DIRECTORY ${CMAKE_SOURCE_DIR}/3rdparty-notices DESTINATION .) +install(FILES "${CMAKE_SOURCE_DIR}/bin/freetrackclient.dll" DESTINATION .) install(FILES "${CMAKE_SOURCE_DIR}/bin/NPClient.dll" "${CMAKE_SOURCE_DIR}/bin/NPClient64.dll" "${CMAKE_SOURCE_DIR}/bin/TrackIR.exe" DESTINATION .) install(DIRECTORY "${CMAKE_SOURCE_DIR}/bin/settings" "${CMAKE_SOURCE_DIR}/clientfiles" DESTINATION .) diff --git a/bin/freetrackclient.dll b/bin/freetrackclient.dll Binary files differnew file mode 100755 index 00000000..4d4b64ab --- /dev/null +++ b/bin/freetrackclient.dll diff --git a/freetrackclient/freetrackclient.c b/freetrackclient/freetrackclient.c index 4bc39d67..95830221 100644 --- a/freetrackclient/freetrackclient.c +++ b/freetrackclient/freetrackclient.c @@ -31,9 +31,9 @@ #include <string.h> #include <windows.h> -#include "../ftnoir_protocol_ft/fttypes.h" +#include "fttypes.h" -#define FT_EXPORT(t) __declspec(dllexport) t __stdcall +#define FT_EXPORT(t) t __stdcall #if 0 # include <stdio.h> @@ -70,7 +70,6 @@ static bool impl_create_mapping(void) return true; } -#pragma comment (linker, "/export:FTGetData") FT_EXPORT(bool) FTGetData(FTData* data) { if (impl_create_mapping() == false) @@ -92,23 +91,24 @@ FT_EXPORT(bool) FTGetData(FTData* data) // The Delphi-code from the FreeTrack repo suggest a char * as argument, so it cost me an afternoon to figure it out (and keep ArmA2 from crashing). // Thanks guys! */ -#pragma comment (linker, "/export:FTReportName") FT_EXPORT(void) FTReportName( int name ) { dbg_report("FTReportName request (ID = %d).\n", name); } -#pragma comment (linker, "/export:FTGetDllVersion") FT_EXPORT(const char*) FTGetDllVersion(void) { dbg_report("FTGetDllVersion request.\n"); return dllVersion; } -#pragma comment (linker, "/export:FTProvider") FT_EXPORT(const char*) FTProvider(void) { dbg_report("FTProvider request.\n"); return dllProvider; } +#pragma comment (linker, "/export:FTReportName=_FTReportName@4") +#pragma comment (linker, "/export:FTGetDllVersion=_FTGetDllVersion@0") +#pragma comment (linker, "/export:FTProvider=_FTProvider@0") +#pragma comment (linker, "/export:FTGetData=_FTGetData@4") diff --git a/ftnoir_protocol_ft/fttypes.h b/freetrackclient/fttypes.h index f41350c8..ad974110 100644 --- a/ftnoir_protocol_ft/fttypes.h +++ b/freetrackclient/fttypes.h @@ -23,6 +23,7 @@ # include <inttypes.h> #else typedef unsigned __int32 uint32_t; +typedef __int32 int32_t; #endif #define FREETRACK_HEAP "FT_SharedMem" diff --git a/ftnoir_protocol_ft/ftnoir_protocol_ft.h b/ftnoir_protocol_ft/ftnoir_protocol_ft.h index ba98b4b7..6bbf1bd3 100644 --- a/ftnoir_protocol_ft/ftnoir_protocol_ft.h +++ b/ftnoir_protocol_ft/ftnoir_protocol_ft.h @@ -38,7 +38,7 @@ #include <QMutexLocker> #include "compat/compat.h" #include "opentrack/options.hpp" -#include "fttypes.h" +#include "../freetrackclient/fttypes.h" using namespace options; struct settings { diff --git a/ftnoir_protocol_wine/opentrack-wrapper-wine-main.cxx b/ftnoir_protocol_wine/opentrack-wrapper-wine-main.cxx index 9a07681c..47e53eb7 100644 --- a/ftnoir_protocol_wine/opentrack-wrapper-wine-main.cxx +++ b/ftnoir_protocol_wine/opentrack-wrapper-wine-main.cxx @@ -1,6 +1,6 @@ #include <cerrno> #include <cstdio> -#include "ftnoir_protocol_ft/fttypes.h" +#include "freetrackclient/fttypes.h" #include "ftnoir_protocol_wine/wine-shm.h" #define OPENTRACK_CROSS_ONLY |