FinceptTerminal is a modern finance application offering advanced market analytics, investment research, and economic data tools, designed for interactive exploration and data-driven decision-making in a user-friendly environment.
C++ ai-agentsalgorithmic-tradingbloomberg-terminalcppfinancefinancial-marketsfintechgood-first-issueinvestmentinvestment-researchmachine-learningopensourcepythonqtquantitative-financestock-markettrading
v4.0.2
tilakpatel220c6d17a54ada
diff --git a/.github/workflows/build-cpp.yml b/.github/workflows/build-cpp.ymlindex c72ac99f4..990e39ad1 100644--- a/.github/workflows/build-cpp.yml+++ b/.github/workflows/build-cpp.yml@@ -84,13 +84,16 @@ jobs:update-package-index: true# ---- System dependencies (Linux) ----+ # Ubuntu 22.04's default g++ is 11.4, but CMakeLists.txt requires GCC 12.3+.+ # Install gcc-12/g++-12 from the Ubuntu Toolchain PPA (pre-enabled on+ # ubuntu-22.04 runners) and pin it via CC/CXX for the rest of the job.- name: Install system dependencies (Linux)if: runner.os == 'Linux'run: |sudo add-apt-repository universe -ysudo apt-get update -qqsudo apt-get install -y \- cmake ninja-build g++ \+ cmake ninja-build gcc-12 g++-12 \libssl-dev \qt6-base-dev qt6-base-private-dev \qt6-tools-dev qt6-tools-dev-tools \@@ -103,6 +106,8 @@ jobs:libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 \libxcb-xinerama0 libxcb-xkb1 \pkg-config zip+ echo "CC=gcc-12" >> "$GITHUB_ENV"+ echo "CXX=g++-12" >> "$GITHUB_ENV"# ---- OpenSSL dev libs (Windows) ----# windows-2022 runners ship only the "Light" OpenSSL (no .lib files).diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex abce8e912..8e7654278 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -94,6 +94,11 @@ jobs:echo "Binary: $BINARY ($(du -sh "$BINARY" | cut -f1))"# ── Deploy Qt DLLs ────────────────────────────────────────────────────+ # Mirrors the matrix build in build-cpp.yml — both must stage the SAME+ # set of DLLs, plugins, and resources or the installer ships a broken+ # app. Any addition here should also go into build-cpp.yml (and vice+ # versa). Philosophy: ship everything windeployqt might miss, even if+ # it's redundant — a 10MB larger installer is better than a crashing app.- name: Deploy Qt DLLs (windeployqt)shell: bashworking-directory: fincept-qt@@ -107,6 +112,16 @@ jobs:[ -f "$WDQT" ] && "$WDQT" --release --no-translations --compiler-runtime \--include-soft-plugins --force "${BUILD_DIR}/${{ env.APP_NAME }}.exe"+ # qgeoview.dll is emitted by a FetchContent target and copied next to+ # the exe by a POST_BUILD custom_command — confirm it's present so we+ # catch the case where the custom_command silently failed.+ if [ -f "${BUILD_DIR}/qgeoview.dll" ]; then+ echo "qgeoview.dll present"+ else+ echo "::warning::qgeoview.dll missing from ${BUILD_DIR} — map widget will fail to load"+ fi++ # Qt Core DLLs — belt-and-suspenders for anything windeployqt misses.for qt_dll in \Qt6Core.dll Qt6Gui.dll Qt6Widgets.dll Qt6Charts.dll Qt6PrintSupport.dll \Qt6Network.dll Qt6Sql.dll Qt6Concurrent.dll Qt6WebSockets.dll \@@ -116,20 +131,32 @@ jobs:cp "${QT_BIN}/${qt_dll}" "${BUILD_DIR}/" || truedone- for ssl_dll in libssl-3-x64.dll libcrypto-3-x64.dll libssl-3.dll libcrypto-3.dll; do+ # OpenSSL — Qt6::Network needs these for HTTPS. Qt ships them in its+ # own bin/. Include the 1.1 names as a fallback for older Qt kits.+ for ssl_dll in \+ libssl-3-x64.dll libcrypto-3-x64.dll \+ libssl-3.dll libcrypto-3.dll \+ libssl-1_1-x64.dll libcrypto-1_1-x64.dll; do[ -f "${QT_BIN}/${ssl_dll}" ] && [ ! -f "${BUILD_DIR}/${ssl_dll}" ] && \cp "${QT_BIN}/${ssl_dll}" "${BUILD_DIR}/" || true[ -f "${OPENSSL_ROOT_DIR}/bin/${ssl_dll}" ] && [ ! -f "${BUILD_DIR}/${ssl_dll}" ] && \cp "${OPENSSL_ROOT_DIR}/bin/${ssl_dll}" "${BUILD_DIR}/" || truedone- for vcrt_dll in vcruntime140.dll vcruntime140_1.dll msvcp140.dll msvcp140_1.dll \- msvcp140_2.dll concrt140.dll; do+ # MSVC runtime — --compiler-runtime covers most but not all VS2022 17.x+ # DLLs (msvcp170, vcruntime140_2, vccorlib140 are sometimes missed).+ for vcrt_dll in \+ vcruntime140.dll vcruntime140_1.dll vcruntime140_2.dll \+ msvcp140.dll msvcp140_1.dll msvcp140_2.dll \+ msvcp170.dll \+ concrt140.dll vccorlib140.dll; doSYS32="/c/Windows/System32/${vcrt_dll}"[ -f "$SYS32" ] && [ ! -f "${BUILD_DIR}/${vcrt_dll}" ] && \cp "$SYS32" "${BUILD_DIR}/" || truedone+ # Qt plugin directories — whole-dir copy so we pick up every provided+ # plugin without maintaining a per-file allowlist.for plugin_dir in platforms sqldrivers imageformats iconengines styles tls \multimedia texttospeech networkinformation platforminputcontexts printsupport generic; do[ -d "${QT_PLUGINS}/${plugin_dir}" ] && \@@ -137,11 +164,17 @@ jobs:cp -n "${QT_PLUGINS}/${plugin_dir}/"*.dll "${BUILD_DIR}/${plugin_dir}/" 2>/dev/null || true; }done- for d3d_dll in d3dcompiler_47.dll opengl32sw.dll libEGL.dll libGLESv2.dll; do+ # Direct3D compiler + OpenGL SW fallback — needed on VMs / headless+ # machines without a proper GPU driver. dxcompiler/dxil: Qt 6.6+ D3D12+ # backend (DXC shader compiler) — on Win11 boxes without WinSDK.+ for d3d_dll in \+ d3dcompiler_47.dll opengl32sw.dll libEGL.dll libGLESv2.dll \+ dxcompiler.dll dxil.dll; do[ -f "${QT_BIN}/${d3d_dll}" ] && [ ! -f "${BUILD_DIR}/${d3d_dll}" ] && \cp "${QT_BIN}/${d3d_dll}" "${BUILD_DIR}/" || truedone+ # ICU — Qt 6 on Windows ships its own ICU for Unicode support.for icu_dll in "${QT_BIN}"/icu*.dll; dobase=$(basename "$icu_dll")[ -f "$icu_dll" ] && [ ! -f "${BUILD_DIR}/${base}" ] && \@@ -150,7 +183,26 @@ jobs:cp -r resources "${BUILD_DIR}/resources" 2>/dev/null || truecp -r scripts "${BUILD_DIR}/scripts" 2>/dev/null || true+ # qt.conf — pins plugin and data paths relative to the executable.+ # Without this, Qt falls back to hardcoded build-time paths which+ # don't exist on a clean machine and cause plugin load failures.printf '[Paths]\nPrefix = .\nPlugins = .\nLibraries = .\n' > "${BUILD_DIR}/qt.conf"++ # Fail early if anything essential didn't make it into the stage dir.+ echo ""+ echo "=== Staged Windows payload ==="+ MISSING=0+ for essential in \+ "${{ env.APP_NAME }}.exe" \+ Qt6Core.dll Qt6Gui.dll Qt6Widgets.dll Qt6Network.dll \+ platforms/qwindows.dll sqldrivers/qsqlite.dll \+ tls/qschannelbackend.dll; do+ if [ ! -f "${BUILD_DIR}/${essential}" ]; then+ echo "::error::Missing essential file: ${essential}"+ MISSING=1+ fi+ done+ [ "$MISSING" -eq 1 ] && exit 1echo "=== $(find "${BUILD_DIR}" -type f | wc -l) files staged ==="# ── Generate Installer ────────────────────────────────────────────────@@ -165,17 +217,18 @@ jobs:ls -lh ${{ env.APP_NAME }}-*-setup* 2>/dev/null || ls -lh *.exe 2>/dev/null || true# ── Upload ────────────────────────────────────────────────────────────+ # Narrow the glob to the installer output — the broader `*.exe` pattern+ # would also catch the main FinceptTerminal.exe binary, which we don't+ # want to publish as a release asset (users should run the installer).- name: Upload artifactuses: actions/upload-artifact@v4with:name: FinceptTerminal-Windows-x64-installer- path: |- fincept-qt/build/FinceptTerminal-*-setup*- fincept-qt/build/FinceptTerminal-*.exe+ path: fincept-qt/build/FinceptTerminal-*-windows-x64-setup.exeretention-days: 30# ═════════════════════════════════════════════════════════════════════════════-# JOB 2 — Linux x64 Installer (QtIFW .run)+# JOB 2 — Linux x64 Installer (self-contained AppImage, served as .run)# ═════════════════════════════════════════════════════════════════════════════build-linux:name: Linux x64 Installer@@ -196,12 +249,16 @@ jobs:update-package-index: true# ── System deps ───────────────────────────────────────────────────────+ # ubuntu-22.04 ships g++ 11.4 by default, but CMakeLists.txt enforces+ # GCC 12.3+. Install gcc-12/g++-12 and pin CC/CXX for the rest of the job.+ # wget/fuse are required for the linuxdeploy AppImage and the installer+ # bundling step below.- name: Install system dependenciesrun: |sudo add-apt-repository universe -ysudo apt-get update -qqsudo apt-get install -y \- cmake ninja-build g++ \+ cmake ninja-build gcc-12 g++-12 \libssl-dev \qt6-base-dev qt6-base-private-dev \qt6-tools-dev qt6-tools-dev-tools \@@ -213,28 +270,21 @@ jobs:libxcb-cursor0 libxcb-icccm4 libxcb-image0 \libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 \libxcb-xinerama0 libxcb-xkb1 \- python3 python3-pip pkg-config zip-- # ── Qt Installer Framework ────────────────────────────────────────────- - name: Install Qt Installer Framework- run: |- pip3 install aqtinstall- aqt install-tool linux desktop ${{ env.QT_IFW_TOOL }} \- --outputdir "${{ runner.temp }}/qtifw"- IFW_DIR="${{ runner.temp }}/qtifw/Tools/QtInstallerFramework/${{ env.QT_IFW_VERSION }}"- echo "QT_IFW_DIR=${IFW_DIR}" >> "$GITHUB_ENV"- echo "PATH=${IFW_DIR}/bin:${PATH}" >> "$GITHUB_ENV"+ python3 python3-pip pkg-config zip \+ wget file libfuse2 patchelf+ echo "CC=gcc-12" >> "$GITHUB_ENV"+ echo "CXX=g++-12" >> "$GITHUB_ENV"# ── Configure + Build ─────────────────────────────────────────────────+ # No FINCEPT_BUILD_INSTALLER / no QtIFW on Linux — we ship an AppImage+ # instead (see "Build AppImage" step below).- name: Configure CMakeworking-directory: fincept-qtrun: |cmake -B build -G Ninja \-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \-DCMAKE_C_COMPILER_LAUNCHER=ccache \- -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \- -DDEPLOY_QT=ON \- -DFINCEPT_BUILD_INSTALLER=ON+ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache- name: Buildworking-directory: fincept-qt@@ -249,49 +299,139 @@ jobs:echo "Binary: $BINARY ($(du -sh "$BINARY" | cut -f1))"file "$BINARY"- # ── Stage package ─────────────────────────────────────────────────────- - name: Stage package contents+ # ── Build self-contained AppImage ─────────────────────────────────────+ # The previous release workflow ran CPack IFW on Linux but didn't bundle+ # Qt at all — the installer produced a "binary + desktop file" payload+ # that crashed on every machine missing the matching apt Qt. We now ship+ # an AppImage instead: linuxdeploy walks the binary's needed-libraries+ # list, pulls in every transitive .so (Qt + XCB + ICU + OpenSSL + GL),+ # patchelfs the RPATH, and bakes it all into one executable file the+ # auto-updater can chmod+launch like a .run.+ #+ # Filename keeps the `-linux-x64-setup.run` suffix so it matches the+ # regex in update-manifest (AppImage is just a self-mounting executable+ # — the updater's "chmod +x and launch" path works identically).+ - name: Build AppImageworking-directory: fincept-qtrun: |set -euo pipefail- STAGE_DIR="build/stage"- mkdir -p "${STAGE_DIR}"- cp "build/${{ env.APP_NAME }}" "${STAGE_DIR}/"- chmod +x "${STAGE_DIR}/${{ env.APP_NAME }}"- cp -r resources "${STAGE_DIR}/resources" 2>/dev/null || true- cp -r scripts "${STAGE_DIR}/scripts" 2>/dev/null || true-- QT6_PLUGINS_DIR=$(qmake6 -query QT_INSTALL_PLUGINS 2>/dev/null || true)- if [ -n "${QT6_PLUGINS_DIR}" ]; then- for plugin_dir in platforms sqldrivers imageformats xcbglintegrations; do- mkdir -p "${STAGE_DIR}/plugins/${plugin_dir}"- cp -r "${QT6_PLUGINS_DIR}/${plugin_dir}/"*.so \- "${STAGE_DIR}/plugins/${plugin_dir}/" 2>/dev/null || true- done+ APPDIR="build/AppDir"+ mkdir -p "${APPDIR}/usr/bin"+ mkdir -p "${APPDIR}/usr/share/applications"+ mkdir -p "${APPDIR}/usr/share/icons/hicolor/256x256/apps"++ # Stage binary + desktop entry + icon+ cp "build/${{ env.APP_NAME }}" "${APPDIR}/usr/bin/"+ chmod +x "${APPDIR}/usr/bin/${{ env.APP_NAME }}"++ cat > "${APPDIR}/usr/share/applications/fincept-terminal.desktop" <<'EOF'+ [Desktop Entry]+ Name=Fincept Terminal+ Exec=FinceptTerminal+ Icon=fincept-terminal+ Type=Application+ Categories=Finance;+ EOF++ # Icon — use real one if available, else placeholder so linuxdeploy+ # doesn't abort on a missing .png (it's mandatory for valid AppImage).+ ICON_DEST="${APPDIR}/usr/share/icons/hicolor/256x256/apps/fincept-terminal.png"+ if [ -f "resources/icons/app_icon_256.png" ]; then+ cp "resources/icons/app_icon_256.png" "${ICON_DEST}"+ elif [ -f "resources/fincept.png" ]; then+ cp "resources/fincept.png" "${ICON_DEST}"+ else+ # 1x1 transparent PNG — keeps linuxdeploy happy.+ printf '\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x01\x00\x00\x00\x01\x08\x06\x00\x00\x00\x1f\x15\xc4\x89\x00\x00\x00\rIDATx\x9cc\x00\x01\x00\x00\x05\x00\x01\r\n-\xb4\x00\x00\x00\x00IEND\xaeB`\x82' > "${ICON_DEST}"fi- printf '[Paths]\nPrefix = .\nPlugins = plugins\nLibraries = .\n' \- > "${STAGE_DIR}/qt.conf"- echo "=== $(find "${STAGE_DIR}" -type f | wc -l) files staged ==="+ # App resources + Python analytics scripts live next to the binary+ # (matches AppPaths resolution on Linux).+ cp -r resources "${APPDIR}/usr/bin/resources" 2>/dev/null || true+ cp -r scripts "${APPDIR}/usr/bin/scripts" 2>/dev/null || true++ # Requirements files — PythonSetupManager reads these at first run.+ mkdir -p "${APPDIR}/usr/bin/resources"+ cp resources/requirements-numpy1.txt "${APPDIR}/usr/bin/resources/" 2>/dev/null || true+ cp resources/requirements-numpy2.txt "${APPDIR}/usr/bin/resources/" 2>/dev/null || true++ # Download linuxdeploy + Qt plugin+ wget -q "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage"+ wget -q "https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage"+ chmod +x linuxdeploy-x86_64.AppImage linuxdeploy-plugin-qt-x86_64.AppImage++ # Filename must match the regex in update-manifest:+ # FinceptTerminal-<version>-linux-x64-setup.run+ # where <version> is CMAKE_PROJECT_VERSION (e.g. 4.0.2), NOT the+ # tag (v4.0.2). Parse project() VERSION from CMakeLists.txt so we+ # stay in sync even when triggered via workflow_dispatch (no tag).+ VERSION=$(grep -Po 'project\(FinceptTerminal VERSION \K[0-9]+\.[0-9]+\.[0-9]+' CMakeLists.txt)+ if [ -z "${VERSION}" ]; then+ echo "::error::Could not parse project VERSION from CMakeLists.txt"+ exit 1+ fi+ echo "Package version: ${VERSION}"++ # Build the AppImage. The qt plugin traces Qt plugin dependencies+ # (platforms, sqldrivers, imageformats, tls, iconengines, svg, etc.)+ # in addition to the core Qt libs. UPDATE_INFORMATION embeds the+ # zsync update URL so AppImageUpdate can fetch deltas later.+ export QMAKE=$(which qmake6 || which qmake)+ export OUTPUT="FinceptTerminal-${VERSION}-linux-x64-setup.run"+ export UPDATE_INFORMATION="gh-releases-zsync|Fincept-Corporation|FinceptTerminal|latest|FinceptTerminal-*-linux-x64-setup.run.zsync"++ ./linuxdeploy-x86_64.AppImage \+ --appdir "${APPDIR}" \+ --plugin qt \+ --output appimage \+ --desktop-file "${APPDIR}/usr/share/applications/fincept-terminal.desktop" \+ --icon-file "${ICON_DEST}" \+ 2>&1++ # linuxdeploy names the output after the desktop entry — find it.+ if [ ! -f "${OUTPUT}" ]; then+ PRODUCED=$(find . -maxdepth 1 -name "*.AppImage" | head -1)+ if [ -z "${PRODUCED}" ]; then+ echo "::error::AppImage build failed — no .AppImage produced"+ ls -la+ exit 1+ fi+ mv "${PRODUCED}" "${OUTPUT}"+ fi+ chmod +x "${OUTPUT}"- # ── Generate Installer ────────────────────────────────────────────────- - name: Generate Installer (CPack IFW)- working-directory: fincept-qt/build- run: |- set -euo pipefail- export PATH="${QT_IFW_DIR}/bin:${PATH}"- command -v binarycreator || { echo "::error::binarycreator not found"; exit 1; }- cpack -G IFW --verbose- ls -lh ${{ env.APP_NAME }}-*-setup* 2>/dev/null || ls -lh *.run 2>/dev/null || true+ # Sanity check — AppImage must be ≥ 50MB (bare binary is ~20MB, +Qt+ # libs brings it to 80-150MB). A tiny AppImage means Qt wasn't bundled.+ SIZE_KB=$(du -k "${OUTPUT}" | cut -f1)+ if [ "${SIZE_KB}" -lt 51200 ]; then+ echo "::error::AppImage is only ${SIZE_KB}KB — Qt libs likely not bundled"+ exit 1+ fi++ # Stage in build/ where the upload step expects it.+ mkdir -p build+ mv "${OUTPUT}" "build/${OUTPUT}"+ echo "AppImage: build/${OUTPUT} ($(du -sh "build/${OUTPUT}" | cut -f1))"++ # Generate zsync file for delta updates (optional — manifest job+ # works fine without it).+ if command -v zsyncmake >/dev/null 2>&1; then+ zsyncmake "build/${OUTPUT}" -o "build/${OUTPUT}.zsync" || true+ else+ sudo apt-get install -y zsync -qq 2>/dev/null || true+ command -v zsyncmake >/dev/null 2>&1 && \+ zsyncmake "build/${OUTPUT}" -o "build/${OUTPUT}.zsync" || true+ fi# ── Upload ────────────────────────────────────────────────────────────+ # Version-stamped filename so update-manifest regex picks it up.- name: Upload artifactuses: actions/upload-artifact@v4with:name: FinceptTerminal-Linux-x64-installerpath: |- fincept-qt/build/FinceptTerminal-*-setup*- fincept-qt/build/FinceptTerminal-*.run+ fincept-qt/build/FinceptTerminal-*-linux-x64-setup.run+ fincept-qt/build/FinceptTerminal-*-linux-x64-setup.run.zsyncretention-days: 30# ═════════════════════════════════════════════════════════════════════════════@@ -330,16 +470,6 @@ jobs:- name: Install Python 3.12run: brew install [email protected] || brew upgrade [email protected] || true- # ── Qt Installer Framework ────────────────────────────────────────────- - name: Install Qt Installer Framework- run: |- pip3 install --break-system-packages aqtinstall- aqt install-tool mac desktop ${{ env.QT_IFW_TOOL }} \- --outputdir "${{ runner.temp }}/qtifw"- IFW_DIR="${{ runner.temp }}/qtifw/Tools/QtInstallerFramework/${{ env.QT_IFW_VERSION }}"- echo "QT_IFW_DIR=${IFW_DIR}" >> "$GITHUB_ENV"- echo "PATH=${IFW_DIR}/bin:${PATH}" >> "$GITHUB_ENV"-# ── Icon ──────────────────────────────────────────────────────────────- name: Generate .icns iconworking-directory: fincept-qt@@ -373,6 +503,8 @@ jobs:fi# ── Configure + Build ─────────────────────────────────────────────────+ # No FINCEPT_BUILD_INSTALLER on macOS — we ship a DMG built from the+ # post-processed bundle (see "Generate Installer (DMG)" step below).- name: Configure CMakeworking-directory: fincept-qtrun: |@@ -381,9 +513,7 @@ jobs:-DCMAKE_PREFIX_PATH="${QT_ROOT_DIR}" \-DCMAKE_OSX_ARCHITECTURES=arm64 \-DCMAKE_C_COMPILER_LAUNCHER=ccache \- -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \- -DFINCEPT_BUILD_INSTALLER=ON \- -DDEPLOY_QT=ON+ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache- name: Buildworking-directory: fincept-qt@@ -487,12 +617,69 @@ jobs:MACDEPLOYQT="${QT_ROOT_DIR}/bin/macdeployqt"if [ -x "${MACDEPLOYQT}" ]; thenecho "Running macdeployqt on ${APP_BUNDLE}"- "${MACDEPLOYQT}" "${APP_BUNDLE}" -verbose=1 || \+ # -always-overwrite keeps incremental runs idempotent on local+ # re-runs without affecting CI (which always starts clean).+ "${MACDEPLOYQT}" "${APP_BUNDLE}" -verbose=1 -always-overwrite || \echo "::warning::macdeployqt exited non-zero — continuing to explicit codesign"else- echo "::warning::macdeployqt not found at ${MACDEPLOYQT}"+ echo "::error::macdeployqt not found at ${MACDEPLOYQT} — bundle will be missing Qt frameworks"+ exit 1fi+ # Belt-and-suspenders: if any linked dylib is still pointing outside+ # the bundle (e.g. @rpath to /Users/runner/work/... or /opt/homebrew),+ # the app will crash on any other machine. Copy every non-system+ # non-bundled dylib into Frameworks/ and rewrite its install name.+ FRAMEWORKS="${APP_BUNDLE}/Contents/Frameworks"+ MAIN_BIN="${APP_BUNDLE}/Contents/MacOS/${{ env.APP_NAME }}"+ mkdir -p "${FRAMEWORKS}"++ # Walk every Mach-O inside the bundle. For each, inspect its linked+ # libraries; if any resolve to a path that isn't a system location+ # (/usr/lib, /System) and isn't already inside the bundle, copy it+ # in and rewrite the link with install_name_tool.+ bundle_external_deps() {+ local target="$1"+ otool -L "$target" 2>/dev/null | tail -n +2 | awk '{print $1}' | while read -r dep; do+ case "$dep" in+ /usr/lib/*|/System/*|@executable_path/*|@loader_path/*|@rpath/*) ;;+ "") ;;+ *)+ if [ -f "$dep" ]; then+ base=$(basename "$dep")+ if [ ! -f "${FRAMEWORKS}/${base}" ]; then+ cp "$dep" "${FRAMEWORKS}/"+ chmod u+w "${FRAMEWORKS}/${base}"+ install_name_tool -id "@rpath/${base}" "${FRAMEWORKS}/${base}" 2>/dev/null || true+ echo "Bundled missing dep: ${base}"+ fi+ install_name_tool -change "$dep" "@rpath/${base}" "$target" 2>/dev/null || true+ fi+ ;;+ esac+ done+ }++ # Main binary + every dylib in Frameworks+ bundle_external_deps "${MAIN_BIN}"+ find "${FRAMEWORKS}" -name "*.dylib" -type f 2>/dev/null | while read -r dylib; do+ bundle_external_deps "$dylib"+ done++ # Verify no un-bundled non-system deps remain.+ LEAKS=$(otool -L "${MAIN_BIN}" 2>/dev/null | tail -n +2 | awk '{print $1}' | \+ grep -vE '^(/usr/lib|/System|@executable_path|@loader_path|@rpath)' | \+ grep -v '^$' || true)+ if [ -n "${LEAKS}" ]; then+ echo "::warning::Main binary still references external paths:"+ echo "${LEAKS}"+ else+ echo "Main binary: no external path references"+ fi++ echo "=== Bundle Frameworks/ contents ==="+ ls -la "${FRAMEWORKS}" | head -50+# ── Deep ad-hoc re-sign the entire bundle ─────────────────────────────# This is the fix for issue #139. macdeployqt's signing of nested# frameworks is unreliable (known Qt bug — see GDATASoftwareAG fork).@@ -551,38 +738,44 @@ jobs:cp -R "build/${{ env.APP_NAME }}.app" "dist/"echo "Final bundle size: $(du -sh "dist/${{ env.APP_NAME }}.app" | cut -f1)"- # ── Generate Installer (IFW → DMG fallback) ───────────────────────────- - name: Generate Installer- working-directory: fincept-qt/build+ # ── Generate Installer (DMG via hdiutil) ──────────────────────────────+ # We intentionally skip CPack IFW on macOS: CPack's install(TARGETS ...+ # BUNDLE) rule packages the raw build-tree .app, NOT the post-processed+ # one we just ran macdeployqt + deep codesign over. Shipping the raw+ # bundle produces the dyld SIGKILL "Code Signature Invalid" crash+ # tracked in issue #139. A plain hdiutil DMG over `dist/` (which+ # contains the signed bundle) gives users a working drag-to-Apps DMG.+ - name: Generate Installer (DMG)+ working-directory: fincept-qtrun: |set -euo pipefail- export PATH="${QT_IFW_DIR}/bin:${PATH}"-- if command -v binarycreator &>/dev/null; then- echo "Running CPack IFW..."- cpack -G IFW --verbose- ls -lh ${{ env.APP_NAME }}-*-setup* 2>/dev/null || ls -lh *.dmg 2>/dev/null || true- else- echo "::warning::binarycreator not found — falling back to DMG via hdiutil"- STAGING="$(mktemp -d)/dmg_staging"- mkdir -p "${STAGING}"- cp -R "../dist/${{ env.APP_NAME }}.app" "${STAGING}/"- hdiutil create \- -volname "${{ env.APP_NAME }}" \- -srcfolder "${STAGING}" \- -ov -format UDZO \- "${{ env.APP_NAME }}-macOS-arm64.dmg"- ls -lh ${{ env.APP_NAME }}-*.dmg- fi+ # Parse project() VERSION so the DMG filename matches the regex in+ # update-manifest: FinceptTerminal-<version>-macos-arm64-setup.dmg+ VERSION=$(grep -Eo 'project\(FinceptTerminal VERSION [0-9]+\.[0-9]+\.[0-9]+' CMakeLists.txt | awk '{print $3}')+ [ -n "${VERSION}" ] || { echo "::error::Could not parse VERSION from CMakeLists.txt"; exit 1; }+ DMG_NAME="FinceptTerminal-${VERSION}-macos-arm64-setup.dmg"+ echo "DMG target: ${DMG_NAME}"++ STAGING="$(mktemp -d)/dmg_staging"+ mkdir -p "${STAGING}"+ cp -R "dist/${{ env.APP_NAME }}.app" "${STAGING}/"+ # Symlink /Applications so users can drag the app across in the DMG.+ ln -s /Applications "${STAGING}/Applications"++ hdiutil create \+ -volname "${{ env.APP_NAME }}" \+ -srcfolder "${STAGING}" \+ -ov -format UDZO \+ "build/${DMG_NAME}"++ ls -lh "build/${DMG_NAME}"# ── Upload ────────────────────────────────────────────────────────────- name: Upload artifactuses: actions/upload-artifact@v4with:name: FinceptTerminal-macOS-arm64-installer- path: |- fincept-qt/build/FinceptTerminal-*-setup*- fincept-qt/build/FinceptTerminal-*.dmg+ path: fincept-qt/build/FinceptTerminal-*-macos-arm64-setup.dmgretention-days: 30# ═════════════════════════════════════════════════════════════════════════════diff --git a/fincept-qt/CMakeLists.txt b/fincept-qt/CMakeLists.txtindex 062eb2969..fdc687ec6 100644--- a/fincept-qt/CMakeLists.txt+++ b/fincept-qt/CMakeLists.txt@@ -246,15 +246,21 @@ if(FINCEPT_HAS_PRIVATE_HEADERS)# QXlsx uses implicit const char* -> QString conversions which are banned# by Qt6's strict cast macros. Undefine them for this target only.+ # Also silence upstream warnings so CI's -Werror doesn't fail on third-party+ # code. /WX- is critical on MSVC: /W0 suppresses warnings but does NOT+ # disable the directory-inherited /WX (warnings-as-errors) that promotes+ # any surviving warning to a build-breaking error.if(MSVC)target_compile_options(QXlsx PRIVATE/UQT_NO_CAST_FROM_ASCII /UQT_NO_CAST_FROM_BYTEARRAY/UQT_NO_CAST_TO_ASCII /UQT_NO_URL_CAST_FROM_STRING+ /W0 /WX-)else()target_compile_options(QXlsx PRIVATE-UQT_NO_CAST_FROM_ASCII -UQT_NO_CAST_FROM_BYTEARRAY-UQT_NO_CAST_TO_ASCII -UQT_NO_URL_CAST_FROM_STRING+ -w -Wno-error)endif()else()@@ -284,6 +290,18 @@ set_target_properties(md4c PROPERTIES UNITY_BUILD OFF)if(TARGET md4c-html)set_target_properties(md4c-html PROPERTIES UNITY_BUILD OFF)endif()+# Silence upstream warnings so CI's -Werror doesn't fail on third-party code.+# /WX- / -Wno-error needed in addition to /W0 / -w because CI adds -Werror (/WX)+# at the directory level, which suppression flags alone don't override.+foreach(_md4c_tgt md4c md4c-html)+ if(TARGET ${_md4c_tgt})+ if(MSVC)+ target_compile_options(${_md4c_tgt} PRIVATE /W0 /WX-)+ else()+ target_compile_options(${_md4c_tgt} PRIVATE -w -Wno-error)+ endif()+ endif()+endforeach()# md4c's src/CMakeLists.txt installs from ${CMAKE_BINARY_DIR}/src/md4c.pc but# configure_file() writes to ${CMAKE_CURRENT_BINARY_DIR}/md4c.pc (the subbuild# dir). On CI these are different paths, causing CPack's "file INSTALL cannot@@ -319,6 +337,12 @@ set(BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)FetchContent_MakeAvailable(QGeoView)# QGeoView has anonymous-namespace symbol clashes under unity buildset_target_properties(qgeoview PROPERTIES UNITY_BUILD OFF)+# Silence upstream warnings so CI's -Werror doesn't fail on third-party code.+if(MSVC)+ target_compile_options(qgeoview PRIVATE /W0 /WX-)+else()+ target_compile_options(qgeoview PRIVATE -w -Wno-error)+endif()# Qt 6.8.3's FindWrapOpenGL.cmake adds "-framework AGL" which was removed in# macOS 14 (Sonoma). The patch in setup.sh fixes this at the Qt install level.@@ -362,7 +386,9 @@ if(UNIX)file(WRITE ${SingleApplication_SOURCE_DIR}/singleapplication.cpp "${_sa_src}")endif()if(MSVC)- target_compile_options(SingleApplication PRIVATE /W0)+ target_compile_options(SingleApplication PRIVATE /W0 /WX-)+else()+ target_compile_options(SingleApplication PRIVATE -w -Wno-error)endif()# ── Qt Advanced Docking System (detachable panels) ───────────────────────────@@ -385,8 +411,12 @@ set_target_properties(qtadvanceddocking-qt6 PROPERTIES UNITY_BUILD OFF)# Restore install rules for the main application targetsset(CMAKE_SKIP_INSTALL_RULES FALSE CACHE BOOL "" FORCE)+# Third-party code: silence warnings so CI's -Werror doesn't turn a benign+# upstream warning (e.g. -Wunused-but-set-variable on Clang) into a build failure.if(MSVC)- target_compile_options(qtadvanceddocking-qt6 PRIVATE /W0)+ target_compile_options(qtadvanceddocking-qt6 PRIVATE /W0 /WX-)+else()+ target_compile_options(qtadvanceddocking-qt6 PRIVATE -w -Wno-error)endif()# ── Source files by module ────────────────────────────────────────────────────@@ -2018,29 +2048,29 @@ if(FINCEPT_BUILD_INSTALLER)# Python-backed screens crash on an installed build.install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/scripts/"DESTINATION "scripts" COMPONENT scripts)- # Requirements files — read by PythonSetupManager::install_packages()- # during first-run setup. Missing files → setup fails on installed build.- install(FILES- "${CMAKE_CURRENT_SOURCE_DIR}/resources/requirements-numpy1.txt"- "${CMAKE_CURRENT_SOURCE_DIR}/resources/requirements-numpy2.txt"- DESTINATION "resources" COMPONENT core)- # Qt plugin directories- install(DIRECTORY "$<TARGET_FILE_DIR:FinceptTerminal>/platforms"- DESTINATION "." COMPONENT core OPTIONAL)- install(DIRECTORY "$<TARGET_FILE_DIR:FinceptTerminal>/sqldrivers"- DESTINATION "." COMPONENT core OPTIONAL)- install(DIRECTORY "$<TARGET_FILE_DIR:FinceptTerminal>/imageformats"- DESTINATION "." COMPONENT core OPTIONAL)- install(DIRECTORY "$<TARGET_FILE_DIR:FinceptTerminal>/styles"- DESTINATION "." COMPONENT core OPTIONAL)- install(DIRECTORY "$<TARGET_FILE_DIR:FinceptTerminal>/tls"- DESTINATION "." COMPONENT core OPTIONAL)- install(DIRECTORY "$<TARGET_FILE_DIR:FinceptTerminal>/multimedia"- DESTINATION "." COMPONENT core OPTIONAL)- install(DIRECTORY "$<TARGET_FILE_DIR:FinceptTerminal>/networkinformation"- DESTINATION "." COMPONENT core OPTIONAL)- install(DIRECTORY "$<TARGET_FILE_DIR:FinceptTerminal>/generic"+ # Full resources/ tree — icons, images, stylesheets, data files, etc.+ # Also catches requirements-*.txt. Without this, asset paths resolved+ # via AppPaths::resources_dir() return an empty dir and screens that+ # load PNGs / JSON config crash on missing-file errors.+ install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/resources/"+ DESTINATION "resources" COMPONENT core+ PATTERN ".git*" EXCLUDE+ PATTERN "*.pyc" EXCLUDE)+ # qt.conf — pins plugin/library paths relative to the exe. Without+ # this Qt uses hardcoded build-machine paths that don't exist on the+ # user's machine, producing "could not load the Qt platform plugin".+ install(FILES "$<TARGET_FILE_DIR:FinceptTerminal>/qt.conf"DESTINATION "." COMPONENT core OPTIONAL)+ # Qt plugin directories. OPTIONAL keeps the install non-fatal when+ # a plugin dir isn't produced by windeployqt on a given host (e.g.+ # texttospeech only appears when Qt TTS is present).+ foreach(_plugin_dir+ platforms sqldrivers imageformats iconengines styles tls+ multimedia texttospeech networkinformation platforminputcontexts+ printsupport generic)+ install(DIRECTORY "$<TARGET_FILE_DIR:FinceptTerminal>/${_plugin_dir}"+ DESTINATION "." COMPONENT core OPTIONAL)+ endforeach()endif()# ── CPack general metadata ───────────────────────────────────────────────