Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
48151f3
CLI target
jc-luna Apr 6, 2026
f3ef81e
Opt determination
jc-luna Apr 6, 2026
d6e873e
parse flags
jc-luna Apr 6, 2026
722091f
Opts
jc-luna Apr 6, 2026
6c5de23
Parse actions
jc-luna Apr 6, 2026
5e493a6
dynamic array of other args
jc-luna Apr 6, 2026
1e45776
Validate arguments some more
jc-luna Apr 6, 2026
abaf263
fix passing flags
jc-luna Apr 6, 2026
d751231
Don't forget to help
jc-luna Apr 6, 2026
a4da81b
Simple help sample
jc-luna Apr 6, 2026
6da9066
Help printouts for many actions
jc-luna Apr 7, 2026
f8876ec
Define all actions
jc-luna Apr 7, 2026
a780601
Longer usage statement
jc-luna Apr 7, 2026
821c12d
record -> request
jc-luna Apr 8, 2026
38ec45c
daemon mode
jc-luna Apr 8, 2026
48a09ff
Flatten logic around detach function
jc-luna Apr 8, 2026
8856df0
Proper pointer to daemon function
jc-luna Apr 8, 2026
af4bae2
Simplify other_args validator
jc-luna Apr 8, 2026
6220050
Acquire binaries on CI
jc-luna Apr 8, 2026
2e69fe2
Also retain ftd2xx
jc-luna Apr 8, 2026
c8a5d07
install rpath incl. origin
jc-luna Apr 8, 2026
175ca82
rpath in many
jc-luna Apr 8, 2026
b5b2eb7
Chmod acquired libs
jc-luna Apr 8, 2026
f0a98af
apt install with SUDO on ci
jc-luna Apr 8, 2026
6f1a020
Copy all other binaries too
jc-luna Apr 8, 2026
c22e14f
actually use patchelf
jc-luna Apr 8, 2026
689a2e4
fix cmake workflow
jc-luna Apr 8, 2026
93df62a
force LD_LIBRARY_PATH
jc-luna Apr 9, 2026
f999dc8
Specify 64 bin binaries
jc-luna Apr 9, 2026
94ff717
powershell
jc-luna Apr 9, 2026
9d664dc
Specify binaries in meson on Windows
jc-luna Apr 9, 2026
46d1530
double quotes
jc-luna Apr 9, 2026
2667e30
Proper ternary in get_curl
jc-luna Apr 9, 2026
ab6a3c2
Fix for windows on windows
jc-luna Apr 9, 2026
2062030
Don't include windows.h in actions.c due to it coming from ipc.h
jc-luna Apr 9, 2026
2b620a3
IT'S DLL BRO
jc-luna Apr 9, 2026
d4c297c
just ignore msvc on CI
jc-luna Apr 9, 2026
2c5fb0c
Assign strstr to const char*
jc-luna Apr 10, 2026
e1b4bbd
Simple winapi detach impl
jc-luna Apr 10, 2026
0308ee6
Outline daemon mode
jc-luna Apr 13, 2026
9353711
Sigint interceptor on Linux
jc-luna Apr 13, 2026
27786c4
add missing comma to detach
jc-luna Apr 13, 2026
43a67e0
replace comma with semicolon
jc-luna Apr 13, 2026
c5c7832
reorder headers in action.c
jc-luna Apr 13, 2026
9326d9e
just move the bandaids into the header
jc-luna Apr 13, 2026
ef6de93
Now they have their own copies
jc-luna Apr 13, 2026
758404c
ifdef many
jc-luna Apr 13, 2026
cb6b165
Discrete daemon source
jc-luna Apr 13, 2026
57b9846
macro magic to make nftw visible
jc-luna Apr 13, 2026
440cb57
Daemon sokcet finder
jc-luna Apr 14, 2026
c11c010
revise socket naming and impl blank msgs
jc-luna Apr 14, 2026
4918aeb
Remove old tests
jc-luna Apr 15, 2026
4997b9e
Replace meson with CMake
jc-luna Apr 15, 2026
2e5f9c8
Don't accidentally overwrite binaries
jc-luna Apr 15, 2026
a123b37
Add linting from .clang-tidy
jc-luna Apr 15, 2026
8a1df2c
Enforce linting
jc-luna Apr 15, 2026
05df81d
Avoid name collisions with winapi interface
jc-luna Apr 15, 2026
3f52fe4
Expose Winsock2 to deps
jc-luna Apr 15, 2026
6916adc
Update action to use presets
jc-luna Apr 15, 2026
49399c5
Enable Warnings
jc-luna Apr 15, 2026
d7cd148
Enforce the prefix in many places
jc-luna Apr 15, 2026
03ba070
Get rid of namespaces
jc-luna Apr 15, 2026
052b372
Delete unused ipc methods
jc-luna Apr 15, 2026
c997716
uint8_t -> vscl_byte_t to avoid signedness issues
jc-luna Apr 15, 2026
5cfd080
Shorten many names and remove unused consts
jc-luna Apr 15, 2026
bd480a8
Output binaries to `bin`
jc-luna Apr 16, 2026
873b764
Proper WINAPI impl of --detach
jc-luna Apr 16, 2026
7faf89a
Merge pull request #26 from team-gets/large-refactor-libdir
jc-luna Apr 16, 2026
3c97c5f
Windows error printer
jc-luna Apr 16, 2026
81c4deb
Cleanup handler for Ctrl-C on Windows
jc-luna Apr 16, 2026
ef1d4cd
Implement ident command
jc-luna Apr 16, 2026
0ef32ef
Clarifying comments
jc-luna Apr 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Checks: "readability-identifier-naming"
HeaderFileExtensions: ["h"]
ImplementationFileExtensions: ["c"]
ExcludeHeaderFilterRegex: "./lib/epos2/definitions.h"
CheckOptions:
readability-identifier-naming.DefaultCase: lower_case
readability-identifier-naming.ParameterCase: lower_case
readability-identifier-naming.MacroDefinitionCase: UPPER_CASE
readability-identifier-naming.GlobalConstantCase: UPPER_CASE
readability-identifier-naming.GlobalConstantPointerCase: UPPER_CASE
readability-identifier-naming.EnumCase: UPPER_CASE
readability-identifier-naming.EnumConstantCase: UPPER_CASE
26 changes: 10 additions & 16 deletions .github/workflows/build-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,39 +27,33 @@ jobs:
strategy:
fail-fast: true
matrix:
compiler: ["gcc", "clang"]
preset: ["linux-gcc", "linux-clang"]
steps:
- uses: actions/checkout@v5
- name: Install Build Dependencies
run: echo | python "${{ github.workspace }}/bin/acquire_epos_cmdlib.py"
- name: Setup CMake
run: |
CC=${{ matrix.compiler }} cmake -S . -B build
cmake -S . -B build --preset=${{ matrix.preset }}
- name: Build
run: |
CC=${{ matrix.compiler }} cmake --build build
- name: Verbosely Test
run: |
ctest --verbose --output-on-failure --test-dir build/test
cmake --build build

windows-build-cmake:
name: Windows
runs-on: windows-latest
strategy:
fail-fast: true
matrix:
compiler: ["cl.exe", "gcc.exe"]
preset: ["windows-mingw"] #, "cl.exe"]
steps:
- uses: actions/checkout@v5
- uses: ilammy/msvc-dev-cmd@v1.13.0
#- uses: ilammy/msvc-dev-cmd@v1.13.0
- name: Install Build Dependencies
run: echo "" | python "${{ github.workspace }}/bin/acquire_epos_cmdlib.py"
- name: Setup CMake
run: |
cmake -S . -B build
env:
CC: ${{ matrix.compiler }}
cmake -S . -B build --preset=${{ matrix.preset }}
- name: Build
run: |
cmake --build build
env:
CC: ${{ matrix.compiler }}
- name: Verbosely Test
run: |
ctest --verbose --output-on-failure --test-dir build/test -C Debug
75 changes: 0 additions & 75 deletions .github/workflows/build-meson.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ compile_commands.json
*.so*
*.lib
*.dll

# Built Binaries
bin/
45 changes: 30 additions & 15 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
cmake_minimum_required(VERSION 3.30..4.0)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")

project(libtestrig
LANGUAGES C)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

include(target_copy_dll)
include(target_output_to_bin)

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(LIB_DIR "${CMAKE_CURRENT_SOURCE_DIR}/lib")
set(IPC_DIR "${LIB_DIR}/ipc")
set(EPOS_DIR "${LIB_DIR}/epos2")
set(BIN_DIR "${CMAKE_SOURCE_DIR}/bin")

set(IPC_SOURCES
"${IPC_DIR}/ipc.c"
"${IPC_DIR}/constants.c"
"${IPC_DIR}/message.c"
"${IPC_DIR}/os.c")

Expand All @@ -23,25 +25,38 @@ set(EPOS_SOURCES
"${EPOS_DIR}/manage.c"
"${EPOS_DIR}/identify.c")

set(LIBTESTRIG_SOURCES ${IPC_SOURCES})
set(LIBTESTRIG_SOURCES ${IPC_SOURCES} ${EPOS_SOURCES})

if (WIN32)
add_library(EposCmd SHARED IMPORTED)
set_target_properties(EposCmd PROPERTIES
IMPORTED_LOCATION "${BIN_DIR}/EposCmd64.dll"
IMPORTED_IMPLIB "${BIN_DIR}/EposCmd64.lib")

find_package(EPOSCmd)
if (EPOSCmd_FOUND)
list(APPEND LIBTESTRIG_SOURCES ${EPOS_SOURCES})
set(EposCmd-FOUND TRUE)
else()
message("Controller capabilities not being built.")
add_library(EposCmd SHARED IMPORTED)
set_target_properties(EposCmd PROPERTIES
IMPORTED_LOCATION "${BIN_DIR}/libEposCmd.so"
IMPORTED_IMPLIB "")

set(EposCmd-FOUND TRUE)
endif()

add_library(testrig SHARED ${LIBTESTRIG_SOURCES})
target_compile_definitions(testrig PRIVATE COMPILING_TESTRIG_DLL)
target_include_directories(testrig PUBLIC ${LIB_DIR})
add_library(libtestrig SHARED ${LIBTESTRIG_SOURCES})
target_compile_definitions(libtestrig PRIVATE COMPILING_TESTRIG_DLL)
target_include_directories(libtestrig PUBLIC ${LIB_DIR})
target_link_libraries(libtestrig PUBLIC EposCmd)
target_output_to_bin(libtestrig)

if (WIN32)
target_link_libraries(testrig PRIVATE Ws2_32)
target_link_libraries(libtestrig PUBLIC Ws2_32 Kernel32)
endif()

if (EPOSCmd_FOUND)
target_link_libraries(testrig PUBLIC EPOSCmd)
if (MSVC)
add_compile_options("/W4")
else()
add_compile_options("-Wall")
endif()

add_subdirectory("${CMAKE_SOURCE_DIR}/test")
add_subdirectory("${CMAKE_SOURCE_DIR}/src")
74 changes: 74 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"version": 3,
"cmakeMinimumRequired": {
"major": 3,
"minor": 30,
"patch": 0
},

"configurePresets": [
{
"name": "default",
"hidden": true,
"generator": "Ninja",
"cacheVariables": {
"CMAKE_COLOR_DIAGNOSTICS": "ON"
}
},
{
"name": "windows-only",
"hidden": true,
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
}
},
{
"name": "linux-only",
"hidden": true,
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Linux"
}
},

{
"name": "windows-mingw",
"inherits": [ "default", "windows-only" ],
"cacheVariables": {
"CMAKE_C_COMPILER": "gcc"
}
},
{
"name": "linux-gcc",
"inherits": [ "default", "linux-only" ],
"cacheVariables": {
"CMAKE_C_COMPILER": "gcc"
}
},
{
"name": "linux-clang",
"inherits": [ "default", "linux-only" ],
"cacheVariables": {
"CMAKE_C_COMPILER": "clang"
}
}
],

"buildPresets": [
{
"name": "windows-mingw",
"configurePreset": "windows-mingw"
},
{
"name": "linux-gcc",
"configurePreset": "linux-gcc"
},
{
"name": "linux-clang",
"configurePreset": "linux-clang"
}
]
}
Loading