mirror of https://github.com/AxioDL/boo.git
Compile fixes
This commit is contained in:
parent
395e39d63a
commit
87ab129e01
|
@ -73,22 +73,25 @@ else()
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(BOO_SYS_LIBS ${BOO_SYS_LIBS} CACHE PATH "Boo System Libraries" FORCE)
|
||||||
|
|
||||||
include_directories(include)
|
include_directories(include)
|
||||||
|
|
||||||
add_library(Boo
|
add_library(Boo
|
||||||
lib/inputdev/CafeProPad.cpp include/inputdev/CafeProPad.hpp
|
lib/inputdev/CafeProPad.cpp include/boo/inputdev/CafeProPad.hpp
|
||||||
lib/inputdev/RevolutionPad.cpp include/inputdev/RevolutionPad.hpp
|
lib/inputdev/RevolutionPad.cpp include/boo/inputdev/RevolutionPad.hpp
|
||||||
lib/inputdev/DolphinSmashAdapter.cpp include/inputdev/DolphinSmashAdapter.hpp
|
lib/inputdev/DolphinSmashAdapter.cpp include/boo/inputdev/DolphinSmashAdapter.hpp
|
||||||
lib/inputdev/DualshockPad.cpp include/inputdev/DualshockPad.hpp
|
lib/inputdev/DualshockPad.cpp include/boo/inputdev/DualshockPad.hpp
|
||||||
lib/inputdev/GenericPad.cpp include/inputdev/GenericPad.hpp
|
lib/inputdev/GenericPad.cpp include/boo/inputdev/GenericPad.hpp
|
||||||
lib/inputdev/DeviceBase.cpp include/inputdev/DeviceBase.hpp
|
lib/inputdev/DeviceBase.cpp include/boo/inputdev/DeviceBase.hpp
|
||||||
lib/inputdev/DeviceSignature.cpp include/inputdev/DeviceSignature.hpp
|
lib/inputdev/DeviceSignature.cpp include/boo/inputdev/DeviceSignature.hpp
|
||||||
include/inputdev/IHIDListener.hpp
|
include/boo/inputdev/IHIDListener.hpp
|
||||||
lib/inputdev/IHIDDevice.hpp
|
lib/inputdev/IHIDDevice.hpp
|
||||||
include/IGraphicsContext.hpp
|
include/boo/IGraphicsContext.hpp
|
||||||
include/IWindow.hpp
|
include/boo/IWindow.hpp
|
||||||
include/IApplication.hpp
|
include/boo/IApplication.hpp
|
||||||
include/boo.hpp
|
include/boo/boo.hpp
|
||||||
|
InputDeviceClasses.cpp
|
||||||
${PLAT_SRCS})
|
${PLAT_SRCS})
|
||||||
|
|
||||||
add_subdirectory(test)
|
add_subdirectory(test)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include "inputdev/DeviceSignature.hpp"
|
#include "boo/inputdev/DeviceSignature.hpp"
|
||||||
#include "inputdev/DolphinSmashAdapter.hpp"
|
#include "boo/inputdev/DolphinSmashAdapter.hpp"
|
||||||
|
|
||||||
namespace boo
|
namespace boo
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#ifndef IRUNLOOP_HPP
|
#ifndef IRUNLOOP_HPP
|
||||||
#define IRUNLOOP_HPP
|
#define IRUNLOOP_HPP
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
@ -55,28 +56,30 @@ public:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
IApplication* IApplicationBootstrap(IApplication::EPlatformType platform,
|
std::shared_ptr<IApplication>
|
||||||
IApplicationCallback& cb,
|
ApplicationBootstrap(IApplication::EPlatformType platform,
|
||||||
const std::string& uniqueName,
|
IApplicationCallback& cb,
|
||||||
const std::string& friendlyName,
|
const std::string& uniqueName,
|
||||||
const std::string& pname,
|
const std::string& friendlyName,
|
||||||
const std::vector<std::string>& args,
|
const std::string& pname,
|
||||||
bool singleInstance=true);
|
const std::vector<std::string>& args,
|
||||||
|
bool singleInstance=true);
|
||||||
extern IApplication* APP;
|
extern IApplication* APP;
|
||||||
|
|
||||||
static inline IApplication* IApplicationBootstrap(IApplication::EPlatformType platform,
|
static inline std::shared_ptr<IApplication>
|
||||||
IApplicationCallback& cb,
|
ApplicationBootstrap(IApplication::EPlatformType platform,
|
||||||
const std::string& uniqueName,
|
IApplicationCallback& cb,
|
||||||
const std::string& friendlyName,
|
const std::string& uniqueName,
|
||||||
int argc, char** argv,
|
const std::string& friendlyName,
|
||||||
bool singleInstance=true)
|
int argc, const char** argv,
|
||||||
|
bool singleInstance=true)
|
||||||
{
|
{
|
||||||
if (APP)
|
if (APP)
|
||||||
return APP;
|
return std::shared_ptr<IApplication>(APP);
|
||||||
std::vector<std::string> args;
|
std::vector<std::string> args;
|
||||||
for (int i=1 ; i<argc ; ++i)
|
for (int i=1 ; i<argc ; ++i)
|
||||||
args.push_back(argv[i]);
|
args.push_back(argv[i]);
|
||||||
return IApplicationBootstrap(platform, cb, uniqueName, friendlyName, argv[0], args, singleInstance);
|
return ApplicationBootstrap(platform, cb, uniqueName, friendlyName, argv[0], args, singleInstance);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -1 +1 @@
|
||||||
#include "inputdev/CafeProPad.hpp"
|
#include "boo/inputdev/CafeProPad.hpp"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include "inputdev/DeviceBase.hpp"
|
#include "boo/inputdev/DeviceBase.hpp"
|
||||||
#include "inputdev/DeviceToken.hpp"
|
#include "boo/inputdev/DeviceToken.hpp"
|
||||||
#include "IHIDDevice.hpp"
|
#include "IHIDDevice.hpp"
|
||||||
|
|
||||||
namespace boo
|
namespace boo
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include "inputdev/DeviceSignature.hpp"
|
#include "boo/inputdev/DeviceSignature.hpp"
|
||||||
#include "inputdev/DeviceToken.hpp"
|
#include "boo/inputdev/DeviceToken.hpp"
|
||||||
#include "inputdev/GenericPad.hpp"
|
#include "boo/inputdev/GenericPad.hpp"
|
||||||
#include "IHIDDevice.hpp"
|
#include "IHIDDevice.hpp"
|
||||||
|
|
||||||
namespace boo
|
namespace boo
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "inputdev/DolphinSmashAdapter.hpp"
|
#include "boo/inputdev/DolphinSmashAdapter.hpp"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
#include "inputdev/DualshockPad.hpp"
|
#include "boo/inputdev/DualshockPad.hpp"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include "inputdev/GenericPad.hpp"
|
#include "boo/inputdev/GenericPad.hpp"
|
||||||
#include "inputdev/DeviceToken.hpp"
|
#include "boo/inputdev/DeviceToken.hpp"
|
||||||
|
|
||||||
namespace boo
|
namespace boo
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include "IHIDDevice.hpp"
|
#include "IHIDDevice.hpp"
|
||||||
#include "inputdev/DeviceToken.hpp"
|
#include "boo/inputdev/DeviceToken.hpp"
|
||||||
#include "inputdev/DeviceBase.hpp"
|
#include "boo/inputdev/DeviceBase.hpp"
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include <condition_variable>
|
#include <condition_variable>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include "inputdev/IHIDListener.hpp"
|
#include "boo/inputdev/IHIDListener.hpp"
|
||||||
#include "inputdev/DeviceFinder.hpp"
|
#include "boo/inputdev/DeviceFinder.hpp"
|
||||||
#include <libudev.h>
|
#include <libudev.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef IHIDDEVICE_HPP
|
#ifndef IHIDDEVICE_HPP
|
||||||
#define IHIDDEVICE_HPP
|
#define IHIDDEVICE_HPP
|
||||||
|
|
||||||
#include "inputdev/DeviceToken.hpp"
|
#include "boo/inputdev/DeviceToken.hpp"
|
||||||
|
|
||||||
namespace boo
|
namespace boo
|
||||||
{
|
{
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
#include "inputdev/RevolutionPad.hpp"
|
#include "boo/inputdev/RevolutionPad.hpp"
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
#include "ApplicationXCB.hpp"
|
#include "ApplicationXCB.hpp"
|
||||||
#include "ApplicationWayland.hpp"
|
#include "ApplicationWayland.hpp"
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
#include <dbus/dbus.h>
|
#include <dbus/dbus.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
@ -47,13 +48,13 @@ namespace boo
|
||||||
{
|
{
|
||||||
|
|
||||||
IApplication* APP = NULL;
|
IApplication* APP = NULL;
|
||||||
IApplication* IApplicationBootstrap(IApplication::EPlatformType platform,
|
std::shared_ptr<IApplication> ApplicationBootstrap(IApplication::EPlatformType platform,
|
||||||
IApplicationCallback& cb,
|
IApplicationCallback& cb,
|
||||||
const std::string& uniqueName,
|
const std::string& uniqueName,
|
||||||
const std::string& friendlyName,
|
const std::string& friendlyName,
|
||||||
const std::string& pname,
|
const std::string& pname,
|
||||||
const std::vector<std::string>& args,
|
const std::vector<std::string>& args,
|
||||||
bool singleInstance)
|
bool singleInstance)
|
||||||
{
|
{
|
||||||
if (!APP)
|
if (!APP)
|
||||||
{
|
{
|
||||||
|
@ -63,9 +64,9 @@ IApplication* IApplicationBootstrap(IApplication::EPlatformType platform,
|
||||||
platform == IApplication::PLAT_AUTO)
|
platform == IApplication::PLAT_AUTO)
|
||||||
APP = new ApplicationXCB(cb, uniqueName, friendlyName, pname, args, singleInstance);
|
APP = new ApplicationXCB(cb, uniqueName, friendlyName, pname, args, singleInstance);
|
||||||
else
|
else
|
||||||
return NULL;
|
return std::shared_ptr<IApplication>();
|
||||||
}
|
}
|
||||||
return APP;
|
return std::shared_ptr<IApplication>(APP);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#error This file may only be included from CApplicationUnix.cpp
|
#error This file may only be included from CApplicationUnix.cpp
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "IApplication.hpp"
|
#include "boo/IApplication.hpp"
|
||||||
|
|
||||||
#include <dbus/dbus.h>
|
#include <dbus/dbus.h>
|
||||||
DBusConnection* registerDBus(const char* appName, bool& isFirst);
|
DBusConnection* registerDBus(const char* appName, bool& isFirst);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#error This file may only be included from CApplicationUnix.cpp
|
#error This file may only be included from CApplicationUnix.cpp
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "IApplication.hpp"
|
#include "boo/IApplication.hpp"
|
||||||
|
|
||||||
#define explicit explicit_c
|
#define explicit explicit_c
|
||||||
#include <xcb/xcb.h>
|
#include <xcb/xcb.h>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include "IGraphicsContext.hpp"
|
#include "boo/IGraphicsContext.hpp"
|
||||||
#include "IWindow.hpp"
|
#include "boo/IWindow.hpp"
|
||||||
|
|
||||||
namespace boo
|
namespace boo
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include "IGraphicsContext.hpp"
|
#include "boo/IGraphicsContext.hpp"
|
||||||
#include "IWindow.hpp"
|
#include "boo/IWindow.hpp"
|
||||||
|
|
||||||
#include <xcb/xcb.h>
|
#include <xcb/xcb.h>
|
||||||
#include <xcb/glx.h>
|
#include <xcb/glx.h>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include "IWindow.hpp"
|
#include "boo/IWindow.hpp"
|
||||||
#include "IGraphicsContext.hpp"
|
#include "boo/IGraphicsContext.hpp"
|
||||||
|
|
||||||
namespace boo
|
namespace boo
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include "IWindow.hpp"
|
#include "boo/IWindow.hpp"
|
||||||
#include "IGraphicsContext.hpp"
|
#include "boo/IGraphicsContext.hpp"
|
||||||
#include "IApplication.hpp"
|
#include "boo/IApplication.hpp"
|
||||||
|
|
||||||
#include <xcb/xcb.h>
|
#include <xcb/xcb.h>
|
||||||
#include <xcb/xcb_event.h>
|
#include <xcb/xcb_event.h>
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
add_executable(booTest main.cpp ../InputDeviceClasses.cpp)
|
add_executable(booTest main.cpp)
|
||||||
target_link_libraries(booTest Boo ${BOO_SYS_LIBS})
|
target_link_libraries(booTest Boo ${BOO_SYS_LIBS})
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <boo.hpp>
|
#include <boo/boo.hpp>
|
||||||
|
|
||||||
namespace boo
|
namespace boo
|
||||||
{
|
{
|
||||||
|
@ -134,13 +134,13 @@ struct TestApplicationCallback : IApplicationCallback
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
int main(int argc, const char** argv)
|
||||||
{
|
{
|
||||||
boo::TestApplicationCallback appCb;
|
boo::TestApplicationCallback appCb;
|
||||||
boo::IApplication* app = IApplicationBootstrap(boo::IApplication::PLAT_AUTO,
|
std::shared_ptr<boo::IApplication> app =
|
||||||
appCb, "rwk", "RWK", argc, argv);
|
ApplicationBootstrap(boo::IApplication::PLAT_AUTO,
|
||||||
|
appCb, "rwk", "RWK", argc, argv);
|
||||||
app->run();
|
app->run();
|
||||||
delete app;
|
|
||||||
printf("IM DYING!!\n");
|
printf("IM DYING!!\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue