A hands-on playground for systems code: instant messaging, a
SOAPservice, anHTTP/WebSocketserver, Linux hardware and kernel drivers,RDMA, plusQt/C#/Python/Swiftside projects — all driven by one script.
git clone https://github.com/tsymiar/MyAutomatic.git| Directory | Stack | What lives there |
|---|---|---|
| 🐧 LinxSrvc | C / C++ / Python / Swift | the main project — services, drivers and tools (see the categories below) |
| 🎮 QtGames | Qt 5/6 Widgets + SDL2 + OpenGL |
one desktop app: a flappy-triangle OpenGL scene, the Echo Resonance puzzle game, and optional WPS embedding |
| 🪟 WinNTKline | C# / WPF / MFC / C++ (Windows) |
K-line desktop apps and their utility libs; its solution also builds several LinxSrvc and QtGames projects |
| 🛒 Market | prebuilt .exe |
demo binaries kept as built (MarketClient.exe, vcredist_x86.exe + the matching debug CRT) |
| 🧰 toolset | Shell / Python | standalone helpers — similary.py (comparison backend, symlinked into the VSCode extension as similarity.py), matkline.py (draws K-line figures), mdprint.py, openwebui.sh, plus cache (clcache.sh) / git (gitfast.sh) helpers |
Windows-only helpers live at the root: choose.bat / choose.ps1 set the dependency environment variables interactively (BOOST, CEFDIR, QTDIR, OPENCV, OPENSSL, ZLIB, libPNG, SDL2, …), clean.bat deletes every artifact directory, and MyAutomatic.vbs / MyAutomatic.lnk open WinNTKline/WinNTKline.sln.
| Goal | Command |
|---|---|
| 🏗️ Build everything | ./build.sh all -j |
🧪 Unit tests + lcov coverage |
./build.sh test |
| 🧹 Remove caches and artifacts | ./build.sh clean |
| 🔨 Build a single CMake sub-project | ./build.sh <dir> — e.g. ./build.sh lookup |
| 🎨 Build the Qt desktop app | ./build.sh QtGames/ (any argument starting with Qt is handed to qmake) |
./build.sh prepares four artifact directories up front: bin/, gen/, out/ (intermediates) and kos/ (kernel modules). GitHub Actions (.github/workflows/cmake-multi-platform.yml) and Azure Pipelines (azure-pipelines.yml) run exactly those three commands (all -j, QtGames/, test) on every push to auto-dev.
Third-party sources sit in LinxSrvc/3rd/ as submodules (googletest, rdma-core, rxe-dev, json, lcov); ./build.sh test fetches the ones it needs (librdmacm/libverbs, libevent, libwebsockets, SQLite, ffmpeg, SDL2 and friends are expected on the host and pulled in by the sub-projects when missing).
./build.sh all runs two independent chains — the top-level Makefile chain and the top-level CMakeLists.txt chain — so artifacts end up in one of two directories:
| Output | Artifacts |
|---|---|
bin/ (Make chain) |
IM.exe, client.exe, kaics.exe (kaics.cfg), gSOAPverify (myweb.wsdl), pthdtest.exe, VideoCapture, imgfilesnap.exe, chstest, chigpio, mes909, pipefifo, dirtyhack, test_phm2f.exe, rdma_server.exe, rdma_client.exe |
gen/ (CMake chain) |
lookup, genSeek, seek_test, lookup_test_v2 (time.cfg, libtimeUtil.so), diffs, gn1, e.g, webevs_serve, mocking_main, mocking_client, dpsk_chat (params.txt), video_render (check.sh), sudoku-*.whl, similarity-*.vsix |
kos/ |
chsdev.ko, virtexdrv.ko, phy_mem.ko — kernel modules copied there by hdware (Linux + kernel headers only) |
-
IM.exe | client.exe
IM.exeis aninstant-messagingchat room demo: register, login, send commands, and exchange a small number of messages. It forks a child per connection, listens onargv[1](default8877), and-m/-xprint / reset the shared-memory online table.client.exe is the chat-room peer with its own menus. Its sources live outside this folder (
WinNTKline/KlineUtil/IM/client.ccandWinNTKline/IMclient/imclient.cpp), so it only builds when that sibling project is checked out too. -
kaics.exe
A sub-pub message queue (
MQ) that can penetrate the intranet — theKaiTestCLI linked againstKaiSocket(-S/-C/-BK/-SS [topic]/-PB [topic] [msg]/-TF [topic] [file], endpoint fromkaics.cfg, default127.0.0.1:9999). The Makefile route ismake IM Kai clientinsideLinxSrvc/IM; alternatively./build.sh IMusesIM/CMakeLists.txtand produces the shared librarylibkaics.soplus thekaics.exeCLI. On Windows it is compiled by theScadupproject of the WinNTKline solution. More in its readme. -
webevs_serve
HTTP + WebSocket server built on
libevent(HTTP) andlibwebsockets(WS). Run./webevs_serve <http_port> [ws_port], or setWEBEV_WS_PORTfor the second port; a non-numeric first argument is treated as a URL and issues a singleRequestClientprobe instead. The HTTP listener also serves a static frontend, taken from another git branch —WEBEV_FRONTEND="branch[:dir]"(defaultgh-pages:./webevs-frontend,0disables it), withWEBEV_REPOpointing at the repository. It is built bymake -C webevs build(passing-DAPPOINT_EVENT=/usr/local); withoutlibeventno target is produced, and withoutlibwebsocketsthe WS half is left out. -
gSOAPverify
A
SOAPserver that verifies logins against the contract inmyweb.wsdl. -
mocking_main | mocking_client
[
UDP/TCP/multicast] throughput tool pair in C++11. Both come from the samesocket.cpp, split by theCLIENTmacro — useful as a baseline when sizing theMac/Transferand KaiSocket paths. -
rdma_server.exe | rdma_client.exe
RDMAsample pair forTCP/IP/Rocket Directapplications, on top of librdmacm.so.
-
lookup | genSeek | seek_test | lookup_test_v2
lookup searches recorded streams with
kmp/manacher(lookup <filePath> [pattern], default = longest palindrome). genSeek emits synthetic frames to test with. The two*test*binaries exercise the time-index engine from one sharedlookup/test/main.cpp: seek_test covers generation V1 (seek/), lookup_test_v2 covers V2 (time/, built with-DTIMESEEK).time.cfgandlibtimeUtil.soland in gen as well — index/query go through SQLite and silently no-op when built withoutUSE_SQLITE3(the -dev package is auto-installed whenapt-getexists; otherwise every DB call fails). -
gn1
A cross-platform, big/small endian, increasing/decreasing binary number generator.
-
diffs
Compares differences between two same-named files or directories (CMake target renamed from
analyzingtodiffs). Similarity is computed after stripping comments and whitespace.
-
pthdtest.exe
A thread pool based on
pthread(LinxSrvc/thread/pthdpool).
| Tool | What it exercises |
|---|---|
| chstest | sample client for the chsdev character device |
| chigpio | GPIO lines |
| mes909 | ME909S-821, a Huawei LTE 4G module |
| pipefifo | pipe / fifo samples |
| dirtyhack | the classic DirtyCOW write-up in code form |
| test_phm2f | tiny test showing phy_mem.ko usage |
| VideoCapture | video capture with v4l2 (Linux only) |
| imgfilesnap | snapshot grabber (Linux only) |
Plus three loadable modules — chsdev.ko, virtexdrv.ko (same namesake dirs) and phy_mem.ko (phm2f/) — each built against /lib/modules/$(uname -r)/build, insmod-ed (needs root, skipped when not present) and copied into ../kos. rdma/ builds the client/server pair above with set_sw-rxe.sh preparing a SoftRoCE link.
-
video_render
A video decode / render demo whose CMakeLists picks one of two paths: on Jetson (
aarch64+/etc/nv_tegra_release) it links the NVIDIA Multimedia API plusDRM/EGL/GLESv2/GStreamer; elsewhere it usesffmpeg+SDL2— and for kernels ≥6.8it swaps inmock/mock.cfor the retired features. Missing dependencies are installed automatically whenapt-get/yum/brewis found; withoutSDL2the target is skipped.check.shlands in gen next to the binary. -
dpsk_chat
A mini chat tool built on the
DeepSeekAPI. ExportDPSK_API_KEYbefore launching — otherwise it prints a notice and exits (dpsk/CurlReqs.cpp).⚠️ Key-value pairs such as model or stream live inparams.txt, which must sit in the working directory (a copy lands in gen).
| Project | What it is | How to build / run |
|---|---|---|
| Mac/Transfer | macOS SwiftUI client over a C++17 FTF transfer engine (Sources/FileTransferCore), one 64-byte big-endian header, port 8800, transfer history tab |
needs macOS 13 + Swift 5.9: ./build_app.sh produces FileTransferMac.app (plain swift build also works) |
| cyber | LoRA fine-tuning pipeline (PEFT, 4-bit capable) over chat exports: prepare_data.py → llm_train.py → inference.py, plus ollama_to_hf.py conversion |
pip install -r LinxSrvc/cyber/requirements.txt, then the scripts under cyber/scripts — see its readme |
| trade | single-file quantitative system (dual_ma_strategy.py + strategy.yaml): market feeds, CTP-style broker gateways, MA/RSI/MACD/ATR, risk control, Backtrader backtest, an optional TensorFlow LSTM predictor (falls back to a placeholder when absent), Greeks and a Rich dashboard |
pip install -r trade/requirements.txt, then python trade/dual_ma_strategy.py |
| vs-extension | VSCode "Files Comparison" extension (src/extension.ts), multi-select aware; the Python backend is symlinked in as scripts/similarity.py → ../../../toolset/similary.py |
make.sh inside the folder (also reachable via make -C LinxSrvc/vs-extension), packages similarity-*.vsix into gen |
| pyex | the sudoku CPython C extension, built from extend.c + sudoku.c |
./make.sh (PEP 668 aware python -m build), wheel into gen |
| test | GoogleTest + lcov harness, depends on 3rd/googletest and webevs/Utils.cpp |
./build.sh test (or ./test.sh inside the folder) |
| shell | ops helpers: x64mk/ builds an amd64 APK under QEMU, expect/ automates logins (contains plaintext passwords — keep private), blobs.sh cleans up .prototxt files, gitbase.sh rewrites git history, cudaturch installs PyTorch nightly, shadowsocks.sh bootstraps a proxy, del_mac_icon.sh / sign_gdb.sh are macOS helpers (codesigning gdb), plus the Windows launchers StartProcess.bat / RunsAutomaticly.vbs |
run each script directly |
One Qt Widgets desktop app (QtGames) mixing Qt 5/6, SDL2 and OpenGL, split into:
| Directory | What it holds |
|---|---|
app/ |
entry point and main window; --flappy renders the flappy-triangle scene, --echo opens Echo Resonance (the default build) |
engine/ |
OglMaterial (the QGLWidget base) and OglImgShow for image rendering |
echo_resonance/ |
the narrative puzzle game — echo fragments, deduction board and its audio layer (falls back to visual cues without Qt Multimedia) |
office/ |
WPS embedding UI, compiled only when the WPS SDK is available |
wpsapi/, third_party/wps_sdk/ |
vendored Kingsoft WPS headers used by office/ |
resources/ |
icons and .ui resources |
Use mkallcase.sh (qmake → make, degrading to CMake when no qmake slot is found; install pulls the apt dependencies) — or ./build.sh QtGames/ from the repository root, which is what CI does. Both place the binary in QtGames/build/. Linux needs Qt + SDL2 (+_image/_ttf), libpng, freeglut3 and OpenGL; -DK_LINE=ON / -DENABLE_OFFICE=ON switch the optional parts back on. On Windows use QtGames.vcxproj.
Microsoft .NET Framework 3.5 is needed to compile WinNTKline
| Project | What it is |
|---|---|
| CvMlwk | OpenCV and some Machine Learning learning cases |
| KlineUtil | utils for cef-browser, security libs, drawing K-line with GL, simulating CTP, etc. |
| IMclient | the Windows chat-room peer that client.exe is built from |
| Scadup | the Windows counterpart of kaics.exe — compiles ../../LinxSrvc/IM/KaiSocket.cc + KaiTest.cxx |
| MFCKline | the MFC dialog flavour of the K-line client (login / register / log windows, OpenGL drawing) |
| WPFKline | a K-line application using C# |
| TestUtils | test cases for the KlineUtil interfaces |
The solution is wider than this folder: it also references LinxSrvc projects (IM, gSOAPverify, hdware, webevs, thread) and QtGames/QtGames.vcxproj, all grouped under the Linux / Mix / K-line solution folders.
Prebuilt demo binaries kept as they were produced; the impact of one of them:
