Added build files for windows and executables for linux and windows under .zip folders

This commit is contained in:
rapturate
2026-06-09 16:38:12 -04:00
parent 8b39ddecac
commit 382971ad7d
13 changed files with 258 additions and 12 deletions

View File

@@ -34,9 +34,9 @@ if(WIN32)
${CMAKE_CURRENT_SOURCE_DIR}/third_party/lib/maxminddb.lib
)
else()
# Windows via MinGW/GCC Toolchain
# Windows via MinGW/GCC Cross-Toolchain (FIXED: Points to your new library file)
target_link_libraries(LumberJack_core PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/third_party/lib/libmaxminddb.a
${CMAKE_CURRENT_SOURCE_DIR}/third_party/lib/mingw_libmaxminddb.a
)
endif()
@@ -58,9 +58,13 @@ elseif(APPLE)
else()
# Standard Linux (Ubuntu, Arch Linux, Fedora, etc.)
target_link_libraries(LumberJack_core PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/third_party/lib/libmaxminddb.a
)
# OPTIMIZATION: Try finding system-installed libmaxminddb first, fallback to local file if missing
find_library(MAXMIND_LINUX maxminddb)
if(MAXMIND_LINUX)
target_link_libraries(LumberJack_core PRIVATE ${MAXMIND_LINUX})
else()
target_link_libraries(LumberJack_core PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/third_party/lib/libmaxminddb.a)
endif()
endif()
# Version definitions needed by your GeoLite2PP wrapper
@@ -83,15 +87,30 @@ FetchContent_MakeAvailable(ftxui)
# ==========================================
add_executable(LumberJack main.cpp)
target_link_libraries(LumberJack
PRIVATE
# Second: Link your internal libraries and FTXUI
target_link_libraries(LumberJack PRIVATE
LumberJack_core
ftxui::screen
ftxui::dom
ftxui::component
)
# CROSS-PLATFORM FIXED: Output targets route uniformly into the root project space
# Third: Apply your static linking flags (Target now exists safely!)
if(CMAKE_BUILD_TYPE STREQUAL "Release")
if(WIN32)
if(MSVC)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded")
else()
target_link_options(LumberJack PRIVATE -static)
endif()
elseif(APPLE)
set(CMAKE_XCODE_ATTRIBUTE_GCC_SYMBOLS_PRIVATE_EXTERN YES)
else()
target_link_options(LumberJack PRIVATE -static-libgcc -static-libstdc++)
endif()
endif()
# Fourth: Set directory runtime properties
set_target_properties(LumberJack PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}"

Binary file not shown.

BIN
LumberJack.exe Executable file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,12 @@
LumberJack TUI takes in an Apache2 access log file and provides an interactive interface to check your logs.
NOTES:
- The TUI will ask for the access.log file location and the GeoLite2-City.mmdb file location on startup. It will then create local .env file with the locations you provided. If you mess up, just change them in the file for now.
* I have not tried using the GeoLite2-Country.mmdb file and do not know if it will crash the application...
FUTURE CHANGES:
- Better filtering functionality
- Ban IP functionality
- Access Date/Time column
- Sorting by column (asc/desc)

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,12 @@
LumberJack TUI takes in an Apache2 access log file and provides an interactive interface to check your logs.
NOTES:
- The TUI will ask for the access.log file location and the GeoLite2-City.mmdb file location on startup. It will then create local .env file with the locations you provided. If you mess up, just change them in the file for now.
* I have not tried using the GeoLite2-Country.mmdb file and do not know if it will crash the application...
FUTURE CHANGES:
- Better filtering functionality
- Ban IP functionality
- Access Date/Time column
- Sorting by column (asc/desc)

13
mingw-toolchain.cmake Normal file
View File

@@ -0,0 +1,13 @@
# Target Operating System and Architecture Architecture Definitions
set(CMAKE_SYSTEM_NAME Windows)
set(CMAKE_SYSTEM_PROCESSOR x86_64)
# Force specify cross-compilers
set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc)
set(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++)
# Adjust the find root path behavior (Look for dependencies in system cross spaces)
set(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

174
third_party/lib/.BUILDINFO vendored Normal file
View File

@@ -0,0 +1,174 @@
format = 2
pkgname = mingw-w64-x86_64-libmaxminddb
pkgbase = mingw-w64-libmaxminddb
pkgver = 1.12.2-1
pkgarch = any
pkgbuild_sha256sum = f5a09054ae732795ec49baca7b33d8390c779528fdafbd2cb5340736fede1eb1
packager = CI (msys2/msys2-autobuild/0d471ea5/14426655665)
builddate = 1744523602
builddir = /d/M/B
startdir = /d/M/B
buildtool = makepkg
buildtoolver = 6.1.0
buildenv = !distcc
buildenv = color
buildenv = !ccache
buildenv = check
buildenv = !sign
options = strip
options = docs
options = !libtool
options = staticlibs
options = emptydirs
options = zipman
options = purge
options = !debug
options = !lto
options = !autodeps
installed = base-2022.06-1-any
installed = base-devel-2024.11-1-any
installed = bash-5.2.037-2-x86_64
installed = bash-completion-2.16.0-1-any
installed = binutils-2.44-1-x86_64
installed = bison-3.8.2-5-x86_64
installed = brotli-1.1.0-2-x86_64
installed = bsdtar-3.7.9-1-x86_64
installed = bzip2-1.0.8-4-x86_64
installed = ca-certificates-20241223-1-any
installed = coreutils-8.32-5-x86_64
installed = curl-8.13.0-1-x86_64
installed = dash-0.5.12-1-x86_64
installed = db-6.2.32-5-x86_64
installed = diffstat-1.67-1-x86_64
installed = diffutils-3.11-1-x86_64
installed = dos2unix-7.5.2-1-x86_64
installed = file-5.46-2-x86_64
installed = filesystem-2025.02.23-1-x86_64
installed = findutils-4.10.0-2-x86_64
installed = flex-2.6.4-4-x86_64
installed = gawk-5.3.2-1-x86_64
installed = gcc-libs-13.3.0-1-x86_64
installed = gdbm-1.24-1-x86_64
installed = getent-2.18.90-5-x86_64
installed = gettext-0.22.5-1-x86_64
installed = gmp-6.3.0-1-x86_64
installed = gnupg-2.4.7-2-x86_64
installed = grep-1~3.0-7-x86_64
installed = gzip-1.14-1-x86_64
installed = heimdal-libs-7.8.0-5-x86_64
installed = inetutils-2.5-2-x86_64
installed = info-7.1.1-1-x86_64
installed = less-668-1-x86_64
installed = libargp-20241207-1-x86_64
installed = libasprintf-0.22.5-1-x86_64
installed = libassuan-3.0.2-1-x86_64
installed = libbz2-1.0.8-4-x86_64
installed = libcurl-8.13.0-1-x86_64
installed = libdb-6.2.32-5-x86_64
installed = libedit-20240808_3.1-1-x86_64
installed = libexpat-2.7.1-1-x86_64
installed = libffi-3.4.8-1-x86_64
installed = libgcrypt-1.11.0-1-x86_64
installed = libgdbm-1.24-1-x86_64
installed = libgettextpo-0.22.5-1-x86_64
installed = libgnutls-3.8.9-1-x86_64
installed = libgpg-error-1.53-1-x86_64
installed = libhogweed-3.10.1-1-x86_64
installed = libiconv-1.18-1-x86_64
installed = libidn2-2.3.8-1-x86_64
installed = libintl-0.22.5-1-x86_64
installed = libksba-1.6.7-1-x86_64
installed = liblz4-1.10.0-1-x86_64
installed = liblzma-5.8.1-1-x86_64
installed = libnettle-3.10.1-1-x86_64
installed = libnghttp2-1.65.0-1-x86_64
installed = libnpth-1.8-1-x86_64
installed = libopenssl-3.5.0-1-x86_64
installed = libp11-kit-0.25.5-2-x86_64
installed = libpcre-8.45-5-x86_64
installed = libpcre2_8-10.45-1-x86_64
installed = libpsl-0.21.5-2-x86_64
installed = libreadline-8.2.013-1-x86_64
installed = libsqlite-3.46.1-1-x86_64
installed = libssh2-1.11.1-1-x86_64
installed = libtasn1-4.20.0-1-x86_64
installed = libunistring-1.3-1-x86_64
installed = libutil-linux-2.40.2-2-x86_64
installed = libxcrypt-4.4.38-1-x86_64
installed = libzstd-1.5.7-1-x86_64
installed = m4-1.4.19-2-x86_64
installed = make-4.4.1-2-x86_64
installed = mingw-w64-x86_64-binutils-2.44-1-any
installed = mingw-w64-x86_64-brotli-1.1.0-4-any
installed = mingw-w64-x86_64-bzip2-1.0.8-3-any
installed = mingw-w64-x86_64-c-ares-1.34.5-1-any
installed = mingw-w64-x86_64-ca-certificates-20241223-1-any
installed = mingw-w64-x86_64-cmake-4.0.1-1-any
installed = mingw-w64-x86_64-cppdap-1.65-1-any
installed = mingw-w64-x86_64-crt-git-12.0.0.r657.g1e8b1ccdd-1-any
installed = mingw-w64-x86_64-curl-8.13.0-2-any
installed = mingw-w64-x86_64-expat-2.7.1-2-any
installed = mingw-w64-x86_64-gcc-14.2.0-3-any
installed = mingw-w64-x86_64-gcc-libs-14.2.0-3-any
installed = mingw-w64-x86_64-gettext-runtime-0.24-1-any
installed = mingw-w64-x86_64-gmp-6.3.0-2-any
installed = mingw-w64-x86_64-headers-git-12.0.0.r657.g1e8b1ccdd-1-any
installed = mingw-w64-x86_64-isl-0.27-1-any
installed = mingw-w64-x86_64-jsoncpp-1.9.6-3-any
installed = mingw-w64-x86_64-libarchive-3.7.9-2-any
installed = mingw-w64-x86_64-libb2-0.98.1-2-any
installed = mingw-w64-x86_64-libffi-3.4.8-1-any
installed = mingw-w64-x86_64-libiconv-1.18-1-any
installed = mingw-w64-x86_64-libidn2-2.3.8-2-any
installed = mingw-w64-x86_64-libpsl-0.21.5-3-any
installed = mingw-w64-x86_64-libssh2-1.11.1-1-any
installed = mingw-w64-x86_64-libsystre-1.0.2-1-any
installed = mingw-w64-x86_64-libtasn1-4.20.0-1-any
installed = mingw-w64-x86_64-libtre-0.9.0-1-any
installed = mingw-w64-x86_64-libunistring-1.3-1-any
installed = mingw-w64-x86_64-libuv-1.50.0-2-any
installed = mingw-w64-x86_64-libwinpthread-git-12.0.0.r657.g1e8b1ccdd-1-any
installed = mingw-w64-x86_64-lz4-1.10.0-1-any
installed = mingw-w64-x86_64-mpc-1.3.1-2-any
installed = mingw-w64-x86_64-mpfr-4.2.2-1-any
installed = mingw-w64-x86_64-nghttp2-1.65.0-1-any
installed = mingw-w64-x86_64-nghttp3-1.8.0-1-any
installed = mingw-w64-x86_64-ninja-1.12.1-1-any
installed = mingw-w64-x86_64-openssl-3.5.0-1-any
installed = mingw-w64-x86_64-p11-kit-0.25.5-1-any
installed = mingw-w64-x86_64-pkgconf-1~2.3.0-1-any
installed = mingw-w64-x86_64-rhash-1.4.5-1-any
installed = mingw-w64-x86_64-windows-default-manifest-6.4-4-any
installed = mingw-w64-x86_64-winpthreads-git-12.0.0.r657.g1e8b1ccdd-1-any
installed = mingw-w64-x86_64-xz-5.8.1-2-any
installed = mingw-w64-x86_64-zlib-1.3.1-1-any
installed = mingw-w64-x86_64-zstd-1.5.7-1-any
installed = mintty-1~3.7.8-1-x86_64
installed = mpfr-4.2.2-1-x86_64
installed = msys2-keyring-1~20250214-1-any
installed = msys2-launcher-1.5-3-x86_64
installed = msys2-runtime-3.6.1-3-x86_64
installed = nano-8.4-1-x86_64
installed = ncurses-6.5.20240831-2-x86_64
installed = nettle-3.10.1-1-x86_64
installed = openssl-3.5.0-1-x86_64
installed = p11-kit-0.25.5-2-x86_64
installed = pacman-6.1.0-11-x86_64
installed = pacman-contrib-1.10.6-1-x86_64
installed = pacman-mirrors-20250220-1-any
installed = patch-2.7.6-3-x86_64
installed = perl-5.38.2-3-x86_64
installed = pinentry-1.3.1-2-x86_64
installed = rebase-4.5.0-4-x86_64
installed = sed-4.9-1-x86_64
installed = tar-1.35-2-x86_64
installed = texinfo-7.1.1-1-x86_64
installed = texinfo-tex-7.1.1-1-x86_64
installed = time-1.9-3-x86_64
installed = tzcode-2025b-1-x86_64
installed = util-linux-2.40.2-2-x86_64
installed = wget-1.25.0-1-x86_64
installed = which-2.21-4-x86_64
installed = xz-5.8.1-1-x86_64
installed = zlib-1.3.1-1-x86_64
installed = zstd-1.5.7-1-x86_64

BIN
third_party/lib/.MTREE vendored Normal file

Binary file not shown.

16
third_party/lib/.PKGINFO vendored Normal file
View File

@@ -0,0 +1,16 @@
# Generated by makepkg 6.1.0
pkgname = mingw-w64-x86_64-libmaxminddb
pkgbase = mingw-w64-libmaxminddb
xdata = pkgtype=pkg
pkgver = 1.12.2-1
pkgdesc = C library for reading MaxMind DB files, including the GeoIP2 databases from MaxMind (mingw-w64)
url = https://dev.maxmind.com/geoip/
builddate = 1744523602
packager = CI (msys2/msys2-autobuild/0d471ea5/14426655665)
size = 174707
arch = any
license = spdx:Apache-2.0
depend = mingw-w64-x86_64-gcc-libs
makedepend = mingw-w64-x86_64-cc
makedepend = mingw-w64-x86_64-cmake
makedepend = mingw-w64-x86_64-ninja