1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00
Commit graph

288 commits

Author SHA1 Message Date
Jason Rhinelander
bac3f9dca1
fix macos assemble_gui dependency
The `sign` target on macos was not working properly -- the signing
script would run before the build is finished.  This was caused by
cmake/macos.cmake having an `if(BUILD_GUI)`, but BUILD_GUI isn't defined
as an option until cmake/gui.cmake, which hadn't been included yet where
macos.cmake was included.

This extracts just the `option(BUIL_GUI)` from gui.cmake into a separate
gui-option.cmake file that we can load earlier to fix it.

While here I also noticed the GUI_EXE setting was defined as an option,
but isn't actually a boolean value, as an option, but isn't actually a
boolean value, so fixed it by making it a `set(... CACHE FILEPATH ...)`.
2022-10-06 11:56:07 -03:00
Jason Rhinelander
83f7e8193c
Disable installer path modification
This is not likely to be usable to many people, and people who it *is*
useful for are knowledgeable enough to modify it themselves.  Most users
get no use at all and it most likely just confuses them instead.
2022-09-19 20:26:41 -03:00
Jason Rhinelander
2709ec1930
Android build fixes for openssl 3.0.5
- ANDROID_NDK_ROOT must be set in env
- cmake should be setting `-DANDROID_API=23`
- specify the correct android API via a define when building openssl; it
  has to be in CPPFLAGS (not CFLAGS) because otherwise openssl's
  configure script doesn't notice and overrides our define with the
  latest API version.
- openssl configure puts $(ANDROID_NDK_ROOT) in the makefile, so we have
  to be sure that we put it in the environment for the build command,
  too.
2022-09-19 20:26:41 -03:00
Jason Rhinelander
b2cd9a9eec
openssl 3 build fixes
SYSTEM/MACHINE apparently doesn't work anymore and you have to pass the
system-machine value into the (cursed nasty hacky perl) configure
script.
2022-09-19 20:26:40 -03:00
Jason Rhinelander
c7597c1abd
OpenSSL 1.1.1 -> 3.0.5 2022-09-19 20:26:39 -03:00
Jason Rhinelander
d32a37e30b
Upgrade unbound to latest stable 2022-09-19 20:26:37 -03:00
Jeff
871c3e3281
changeset for windows port
* wintun vpn platform for windows
* bundle config snippets into nsis installer for exit node, keyfile persisting, reduced hops mode.
* use wintun for vpn platform
* isolate all windows platform specific code into their own compilation units and libraries
* split up internal libraries into more specific components
* rename liblokinet.a target to liblokinet-amalgum.a to elimiate ambiguity with liblokinet.so
* DNS platform for win32
* rename llarp/ev/ev_libuv.{c,h}pp to llarp/ev/libuv.{c,h}pp as the old name was idiotic
* split up net platform into win32 and posix specific compilation units
* rename lokinet_init.c to easter_eggs.cpp as that is what they are for and it does not need to be a c compilation target
* add cmake option STRIP_SYMBOLS for seperating out debug symbols for windows builds
* intercept dns traffic on all interfaces on windows using windivert and feed it into lokinet
2022-09-08 14:24:59 -04:00
Jeff
e981c9f899
tweaks for wine and yarn for gui
* allow specifying a custom yarn binary for building the gui using -DYARN= cmake option
* unset DISPLAY when calling wine because i hate popups
* do not rebuild gui when building for windows
* by setting the magical undocumented env var USE_SYSTEM_7ZA to 'true' we can have the pile of npm bullshit code use our system's local 7z binary instead of the probably not backdoored binary from npm, yes for real. i hate nodejs so god damn much you have no fucking idea
* allow providing a custom gui from a zip file via -DGUI_ZIP_FILE cmake option
2022-09-08 14:23:54 -04:00
Jason Rhinelander
6e5db4f560 Set up sign target dependencies always; mark unsigned package
Even if we aren't codesigning, things like the `package` target expect
to be able to depend on `notarize` (and thus implicitly sign ->
assemble) to require a built package.

Also add a `-UNSIGNED` into the built dmg filename.
2022-08-30 15:58:53 -03:00
Jason Rhinelander
500530a336 dmg: version, and set icon
- Add the version number into the .dmg filename
- Set the lokinet icon on the .dmg.  This is done via a swift program
  because all the Apple CLI tools to do this are deprecated.
2022-08-30 14:00:58 -03:00
Jason Rhinelander
4605b49cfc Fix codesigning: reenable extension provisioning profile
The macOS PR that was merged accidentally dropped a cmake option that
result in the extension's provisioning profile not getting copied into
place (but was working locally because I was using a build dir where the
variable was still set).  This restores the option to fix the
codesigning.
2022-08-29 15:54:46 -03:00
Jason Rhinelander
039d1429f5 Build an installer dmg 2022-08-29 12:53:08 -03:00
Jason Rhinelander
2b7b1fcc79 Working signed macOS GUI build 2022-08-12 21:13:39 -03:00
Jason Rhinelander
496c1d274c Stub out the peer stats sqlite_orm code
This avoids needing to build it and include it in static builds since we
aren't currently making use of it.
2022-08-12 21:13:39 -03:00
jeff
181de210cd Build apple/macos GUI from lokinet project
This adds the gui as a submodule, and consolidates the GUI handling a
bit between the two platforms.
2022-08-12 21:13:39 -03:00
Jason Rhinelander
c504c030cf Update mingw zmq patch
The one we were applying for closesocket breaks on some versions.
2022-08-12 21:13:38 -03:00
Jason Rhinelander
09372994bb macOS system extension support
Adds support for building Lokinet as a system extension, and fixes
various problems in the macos implementation found during development of
the system extension support.
2022-08-12 21:13:38 -03:00
Jason Rhinelander
b81f7025c9
Replace logging with oxen-logger
Replaces custom logging system with spdlog-based oxen logging.  This
commit mainly replaces the backend logging with the spdlog-based system,
but doesn't (yet) convert all the existing LogWarn, etc. to use the new
format-based logging.

New logging statements will look like:

    llarp::log::warning(cat, "blah: {}", val);

where `cat` should be set up in each .cpp or cluster of .cpp files, as
described in the oxen-logging README.

As part of spdlog we get fmt, which gives us nice format strings, where
are applied generously in this commit.

Making types printable now requires two steps:
- add a ToString() method
- add this specialization:

      template <>
      constexpr inline bool llarp::IsToStringFormattable<llarp::Whatever> = true;

This will then allow the type to be printed as a "{}" value in a
fmt::format string.  This is applied to all our printable types here,
and all of the `operator<<` are removed.

This commit also:
- replaces various uses of `operator<<` to ToString()
- replaces various uses of std::stringstream with either fmt::format or
  plain std::string
- Rename some to_string and toString() methods to ToString() for
  consistency (and to work with fmt)
- Replace `stringify(...)` and `make_exception` usage with fmt::format
  (and remove stringify/make_exception from util/str.hpp).
2022-07-15 22:17:59 -03:00
Jason Rhinelander
c37d6ea43b
Remove shadow testing framework
Bitrotten and apparently doesn't work with libuv event loop.
2022-06-22 11:08:07 -03:00
Jason Rhinelander
0edb4435d4
Cmake cleanup: remove unneeded =1 from definitions
We only check for definedness, not truth, in the code so make the cmake
definitions agree with that.

This also avoids warnings when building on macos (because swift only
allowed defined/undefined but not values)
2022-06-21 18:57:36 -03:00
Jason Rhinelander
1de7b070d1
Add -DLOKINET_VERSIONTAG to override version tag
Currently I maintain a patch in the debs to do the same thing here, but
it fails to apply often enough; this change makes the behaviour
consistent with oxen-core/oxen-ss and will let me drop that patch and
just pass in the cmake option.

(Recommend ignore-whitespace for viewing the diff)
2022-06-13 20:00:35 -03:00
Jason Rhinelander
6a2114fa1d
Don't be dynamic for win32 rc crap 2022-05-30 17:08:08 -03:00
Jeff
1dfc2e883b
bump verions of all deps
bump submodules

Fix dynamic version generation

   - GIT_FOUND OR Git_FOUND wasn't available because we hadn't done a
     find_package(Git) yet.
   - required version variables weren't being passed through to the cmake
     script
2022-05-30 17:08:08 -03:00
Jeff
065e52ab80
move windows nsis parts for cpack into external files 2022-05-30 09:27:05 -04:00
Jeff
e480e36f3d
generate windows rc for each executable target so we can set the executable name right for each one 2022-05-30 09:06:48 -04:00
Jeff
f05c2ebc71
macro removals
clean up version cmake stuff

clean up generated cpp version stuff

make all the windows rc stuff get generated by cmake

bump release motto message

properly inject release motto into version
2022-05-30 09:06:48 -04:00
Jeff
3c92568881
typo 2022-05-02 17:48:46 -04:00
Jeff
d85d208156
bump libuv version with hashpin 2022-05-02 17:31:21 -04:00
Jeff
d05518be57 use the new electron gui in windows build 2022-04-18 17:25:16 -04:00
Jeff
e2a94b44bb bump zlib hashpin 2022-03-29 09:18:04 -04:00
Jason Rhinelander
d02558350a
Crank oxen-mq to (1.2.)11; switch to oxen-encoding
- Update oxen-mq submodule to latest stable
- Add oxen-encoding submodule
- Convert all oxenmq encoding usage to oxenc
- Modernize cmake handling of oxenmq/oxenc
2022-02-17 16:30:17 -04:00
majestrate
838183e36e
Merge pull request #1748 from majestrate/liblokinet-udp-api-2021-09-19
liblokinet updates
2022-02-06 13:19:08 -05:00
Jeff
48559bd282 fix up ppc64le cross target 2022-02-02 08:34:58 -05:00
Jeff
eae4d3cf74 fixup armhf target 2022-02-02 08:10:03 -05:00
Jeff
08a9e0ad39 add cross compile helpers and update/add toolchains 2022-02-02 07:35:39 -05:00
Jeff
95efe8f4e5 bump ngtcp2 to v0.1.0 tag 2022-01-31 13:05:03 -05:00
Jeff
3c983e2cd7 libcurl no long users --without-libmetalink so remove the flag 2022-01-31 12:03:15 -05:00
Jeff
199055a6aa chore: bump static deps versions 2022-01-31 11:57:26 -05:00
Jeff Becker
bf6dfaaef8 cmake fixups 2022-01-31 10:53:48 -05:00
Jeff Becker
b31cac4b71 nodejs dipshittery 2022-01-31 10:53:48 -05:00
Jeff Becker
51b1d41b12 disable gost in static build 2022-01-31 10:53:48 -05:00
Jeff Becker
5b8ebb269c changes for liblokinet-ffi
* cmake option BUILD_DAEMON for toggling building of daemon directory
* when WITH_BOOTSTRAP is OFF dont build curl or cpr
2022-01-31 10:53:48 -05:00
Jeff
996de3d4c6 make it so github sees the repo is gpl3 2022-01-28 11:20:22 -05:00
Jeff
388fc53380
match io loop event order on windows/apple to match linux.
on win32/apple reading packets from the interface does not count as an io operation.
manually trigger pump on win32/apple to pretend that it is an io event.
add platform quark function MaybeWakeUpperLayers on vpn::Interface to manaully wake up the other components on platforms that need that (ones on which packet io is not done via io events).
on non linux platforms, use uv_prepare_t instead of uv_check_t as the former triggers before blocking for io, instead of after. this better matches linux's order of operations in libuv.
2021-12-15 15:25:53 -05:00
Jeff Becker
b5f5d07f03
bump libunbound static dep hashpin 2021-10-25 11:35:50 -04:00
Jason Rhinelander
9c32058a50 Remove windows linefeeds 2021-10-16 15:16:55 -03:00
Jeff
12bca7031b
Merge pull request #1638 from majestrate/log-refactor-source-location-2021-05-11
refactor logging to use std::source_location
2021-10-06 15:14:55 -04:00
Jeff Becker
5c457ff486
refactor logging to use std::source_location
* use std::source_location instead of godawful macros in logging
* remove unused/absolutely haram af json logstream
* fix bug in android logger where it doesn't respect eLogNone
2021-10-06 11:10:48 -04:00
Jeff Becker
d354a35869
always build ngtcp2 as static
squashme
2021-10-06 10:09:04 -04:00
Jason Rhinelander
488ed47cda Remove duplicate handling of jemalloc
We were linking/loading it in different ways, one with cmake option
`USE_JELLOC` and the other, older version `WITH_JEMALLOC`.  This removes
the latter (which was default OFF) and keeps the former (which was added
and has been default ON since 0.9.4 or so).

Also removes the `ifdef`ed JEMALLOC code in lokinet.cpp because we don't
need it; just linking to jemalloc is enough to get the malloc/free
replacements.
2021-09-13 13:26:12 -03:00