From 5729d0bff53ebf02d77e1cc7a6f7f1c8cc0c792e Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Wed, 11 Dec 2019 16:31:49 -0500 Subject: [PATCH] more --- llarp/CMakeLists.txt | 6 ++---- llarp/ev/ev_win32.cpp | 4 ++-- win32-setup/notes.txt | 7 +++++++ 3 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 win32-setup/notes.txt diff --git a/llarp/CMakeLists.txt b/llarp/CMakeLists.txt index 79c39d738..0f813a04a 100644 --- a/llarp/CMakeLists.txt +++ b/llarp/CMakeLists.txt @@ -92,18 +92,16 @@ set(LIB_PLATFORM_SRC # tun ${LIBTUNTAP_SRC} ${EV_SRC} + ev/ev_libuv.cpp ) if (WIN32) set(LIB_PLATFORM_SRC + ev/ev_win32.cpp ${LIB_PLATFORM_SRC} win32/win32_inet.c win32/win32_intrnl.c win32/win32_upoll.c) -else() - set(LIB_PLATFORM_SRC - ${LIB_PLATFORM_SRC} - ev/ev_libuv.cpp) endif(WIN32) add_library(${PLATFORM_LIB} STATIC ${LIB_PLATFORM_SRC}) diff --git a/llarp/ev/ev_win32.cpp b/llarp/ev/ev_win32.cpp index 1e7e15dfc..1b295dd10 100644 --- a/llarp/ev/ev_win32.cpp +++ b/llarp/ev/ev_win32.cpp @@ -105,7 +105,7 @@ win32_tun_io::do_write(void* data, size_t sz) pkt->sz = sz; pkt->write = true; memset(&pkt->pkt, '\0', sizeof(pkt->pkt)); - WriteFile(tunif->tun_fd, data, sz, nullptr, p & pkt->pkt); + WriteFile(tunif->tun_fd, data, sz, nullptr, &pkt->pkt); } // while this one is called from the event loop @@ -153,7 +153,7 @@ tun_ev_loop(void* u) for(const auto& tun : tun_listeners) { EnterCriticalSection(&HandlerMtx); - logic->call_soon([tun = tun.get()]() { + logic->call_soon([tun]() { if(tun->t->tick) tun->t->tick(tun->t); tun->flush_write(); diff --git a/win32-setup/notes.txt b/win32-setup/notes.txt new file mode 100644 index 000000000..95277a7d2 --- /dev/null +++ b/win32-setup/notes.txt @@ -0,0 +1,7 @@ +[16:24:37] (Channel) despair86: http://files.jrsoftware.org/is/5/innosetup-5.6.1-unicode.exe +[16:29:23] (Channel) despair86: wine [path to ISCC.exe] -DSINGLE_ARCH lokinet-win32.iss +[16:29:28] (Channel) despair86: should work +[16:30:11] (Channel) despair86: make -C win32-setup +[16:30:33] (Channel) despair86: cmake . -DCMAKE_TOOLCHAIN_FILE [options] build +[16:30:37] (Channel) despair86: make -C build +[16:30:51] (Channel) despair86: then use wine to build package