Compare commits
No commits in common. "3fbb2a00860f8dd05b68e3edea779c9e80294bbd" and "ce20282be0c68e8d2994f7d00a938276599c3619" have entirely different histories.
3fbb2a0086
...
ce20282be0
3
deps/ox/src/ox/CMakeLists.txt
vendored
3
deps/ox/src/ox/CMakeLists.txt
vendored
@ -1,6 +1,3 @@
|
|||||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
|
||||||
set(OX_OS_WINDOWS TRUE)
|
|
||||||
endif()
|
|
||||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
|
if(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
|
||||||
set(OX_OS_FREEBSD TRUE)
|
set(OX_OS_FREEBSD TRUE)
|
||||||
else()
|
else()
|
||||||
|
1
deps/ox/src/ox/logconn/CMakeLists.txt
vendored
1
deps/ox/src/ox/logconn/CMakeLists.txt
vendored
@ -21,7 +21,6 @@ target_link_libraries(
|
|||||||
OxStd
|
OxStd
|
||||||
OxMetalClaw
|
OxMetalClaw
|
||||||
$<$<BOOL:${OX_OS_FREEBSD}>:pthread>
|
$<$<BOOL:${OX_OS_FREEBSD}>:pthread>
|
||||||
$<$<BOOL:${OX_OS_WINDOWS}>:ws2_32>
|
|
||||||
)
|
)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
|
22
deps/ox/src/ox/logconn/logconn.cpp
vendored
22
deps/ox/src/ox/logconn/logconn.cpp
vendored
@ -9,36 +9,22 @@
|
|||||||
#ifdef OX_USE_STDLIB
|
#ifdef OX_USE_STDLIB
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
|
||||||
#include <sys/types.h>
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#else
|
|
||||||
#include <winsock.h>
|
|
||||||
#undef interface
|
|
||||||
#undef min
|
|
||||||
#undef max
|
|
||||||
#endif
|
#endif
|
||||||
|
#include <sys/types.h>
|
||||||
|
|
||||||
#include "logconn.hpp"
|
|
||||||
|
|
||||||
#include <ox/std/bit.hpp>
|
#include <ox/std/bit.hpp>
|
||||||
|
|
||||||
|
#include "logconn.hpp"
|
||||||
|
|
||||||
namespace ox {
|
namespace ox {
|
||||||
|
|
||||||
using namespace trace;
|
using namespace trace;
|
||||||
|
|
||||||
void closeSock(auto s) noexcept {
|
|
||||||
#ifdef _WIN32
|
|
||||||
closesocket(s);
|
|
||||||
#else
|
|
||||||
close(s);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
LoggerConn::LoggerConn() noexcept: m_netThread([this]{this->msgSend();}) {
|
LoggerConn::LoggerConn() noexcept: m_netThread([this]{this->msgSend();}) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -47,7 +33,7 @@ LoggerConn::~LoggerConn() noexcept {
|
|||||||
m_waitCond.notify_one();
|
m_waitCond.notify_one();
|
||||||
m_netThread.join();
|
m_netThread.join();
|
||||||
if (m_socket) {
|
if (m_socket) {
|
||||||
closeSock(m_socket);
|
close(m_socket);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
deps/ox/src/ox/logconn/logconn.hpp
vendored
2
deps/ox/src/ox/logconn/logconn.hpp
vendored
@ -17,7 +17,7 @@
|
|||||||
#include <ox/mc/write.hpp>
|
#include <ox/mc/write.hpp>
|
||||||
#include <ox/std/trace.hpp>
|
#include <ox/std/trace.hpp>
|
||||||
|
|
||||||
#include "circularbuff.hpp"
|
#include "circularbuff.hpp"
|
||||||
|
|
||||||
namespace ox {
|
namespace ox {
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
add_executable(
|
add_executable(
|
||||||
nostalgia WIN32
|
nostalgia
|
||||||
app.cpp
|
app.cpp
|
||||||
main.cpp
|
main.cpp
|
||||||
)
|
)
|
||||||
|
@ -26,11 +26,7 @@ static ox::Error run(int argc, const char **argv) noexcept {
|
|||||||
return run(std::move(fs));
|
return run(std::move(fs));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
int WinMain(int argc, const char **argv) {
|
|
||||||
#else
|
|
||||||
int main(int argc, const char **argv) {
|
int main(int argc, const char **argv) {
|
||||||
#endif
|
|
||||||
#if defined(DEBUG) && !defined(OX_BARE_METAL)
|
#if defined(DEBUG) && !defined(OX_BARE_METAL)
|
||||||
ox::LoggerConn loggerConn;
|
ox::LoggerConn loggerConn;
|
||||||
const auto loggerErr = loggerConn.initConn("Nostalgia Player");
|
const auto loggerErr = loggerConn.initConn("Nostalgia Player");
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
|
|
||||||
add_executable(
|
add_executable(
|
||||||
nostalgia-studio WIN32 MACOSX_BUNDLE
|
nostalgia-studio MACOSX_BUNDLE
|
||||||
main.cpp
|
main.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -7,11 +7,7 @@
|
|||||||
|
|
||||||
#include <studioapp/studioapp.hpp>
|
#include <studioapp/studioapp.hpp>
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
int WinMain(int argc, const char **argv) {
|
|
||||||
#else
|
|
||||||
int main(int argc, const char **argv) {
|
int main(int argc, const char **argv) {
|
||||||
#endif
|
|
||||||
nostalgia::registerKeelModules();
|
nostalgia::registerKeelModules();
|
||||||
nostalgia::registerStudioModules();
|
nostalgia::registerStudioModules();
|
||||||
return studio::main("Nostalgia Studio", ".nostalgia", argc, argv);
|
return studio::main("Nostalgia Studio", ".nostalgia", argc, argv);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user