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 update AGL framework issue fix 0.1
tilakpatel22b31f38802b48
diff --git a/.cirrus.yml b/.cirrus.ymldeleted file mode 100644index 3f0ec5ac6..000000000--- a/.cirrus.yml+++ /dev/null@@ -1,162 +0,0 @@-## Cirrus CI — macOS Apple Silicon build-## Complements GitHub Actions (Linux + Windows).-## Free for public repos: ~3,300 macOS CPU-minutes/month.-## Runs on: push to main/develop, pull_request, tags (v*)--build_task:- name: macOS arm64 (Apple Silicon)- timeout_in: 90m-- only_if: $CIRRUS_BRANCH == 'main' || $CIRRUS_BRANCH == 'develop' || $CIRRUS_TAG != '' || $CIRRUS_PR != ''-- macos_instance:- # Sequoia — matches GitHub Actions macos-15 runners- image: ghcr.io/cirruslabs/macos-runner:sequoia-- env:- HOMEBREW_NO_AUTO_UPDATE: "1"- HOMEBREW_NO_INSTALL_CLEANUP: "1"- HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: "1"- BUILD_TYPE: Release- QT_VERSION: "6.8.3"- QT_MODULES: "qtcharts qtwebsockets qtmultimedia"- QT_INSTALL_DIR: "$HOME/Qt"- APP_NAME: FinceptTerminal-- # ── Homebrew tools cache (no Qt here — Qt installed via aqtinstall) ────────- brew_cache:- folder: "$HOME/Library/Caches/Homebrew"- fingerprint_script: echo "brew-tools-ccache-ninja-cmake-py312-$(date +%Y-%m)"- populate_script:- - brew install ccache ninja cmake [email protected]-- # ── Qt cache — keyed to exact version + modules ───────────────────────────- qt_cache:- folder: "$HOME/Qt"- fingerprint_script: echo "qt-${QT_VERSION}-macos-clang_64-${QT_MODULES}-v2"- populate_script:- # aqtinstall installs the official Qt release including private headers.- # This is the same tool jurplel/install-qt-action uses on GitHub Actions.- # Syntax: aqt install-qt --outputdir <dir> <host> <target> <version> [arch] -m <modules...>- # arch=clang_64 is the correct Qt 6 macOS identifier (universal binary, arm64+x86_64)- # Install path will be: $HOME/Qt/6.8.3/macos/- - pip3 install --break-system-packages aqtinstall- - aqt install-qt --outputdir "$HOME/Qt" mac desktop ${QT_VERSION} clang_64 -m ${QT_MODULES}-- # ── ccache build artifact cache ───────────────────────────────────────────- ccache_cache:- folder: "$HOME/.ccache"- fingerprint_script: echo "${QT_VERSION}-$(git log --oneline -10 | shasum | cut -c1-16)"-- # ── Init submodules (Cirrus clones the repo automatically) ───────────────- submodules_script: |- git submodule update --init --recursive-- # ── Resolve paths and export to env ───────────────────────────────────────- setup_script: |- set -euo pipefail- # aqtinstall with clang_64 installs into: $HOME/Qt/6.8.3/macos/- QT_ROOT="${QT_INSTALL_DIR}/${QT_VERSION}/macos"- CCACHE_BIN="$(brew --prefix ccache)/bin"- echo "QT_ROOT=${QT_ROOT}" >> $CIRRUS_ENV- echo "PATH=${QT_ROOT}/bin:${CCACHE_BIN}:$PATH" >> $CIRRUS_ENV- echo "Qt root: ${QT_ROOT}"- "${QT_ROOT}/bin/qmake" --version-- # ── Configure CMake ───────────────────────────────────────────────────────- configure_script: |- set -euo pipefail- cmake -B fincept-qt/build \- -S fincept-qt \- -G Ninja \- -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \- -DCMAKE_PREFIX_PATH="${QT_ROOT}" \- -DCMAKE_OSX_ARCHITECTURES=arm64 \- -DCMAKE_C_COMPILER_LAUNCHER=ccache \- -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \- -DFINCEPT_BUILD_INSTALLER=OFF \- -DDEPLOY_QT=OFF-- # ── Build ─────────────────────────────────────────────────────────────────- build_script: |- set -euo pipefail- cmake --build fincept-qt/build \- --config ${BUILD_TYPE} \- --parallel $(sysctl -n hw.logicalcpu)-- # ── Package ───────────────────────────────────────────────────────────────- package_script: |- set -euo pipefail- MACDEPLOYQT="${QT_ROOT}/bin/macdeployqt"- BUILD_DIR="fincept-qt/build"- DIST_DIR="fincept-qt/dist"- mkdir -p "${DIST_DIR}"-- # ── Locate or create .app bundle ─────────────────────────────────────────- if [ -d "${BUILD_DIR}/${APP_NAME}.app" ]; then- APP_BUNDLE="${BUILD_DIR}/${APP_NAME}.app"- else- APP_BUNDLE="${BUILD_DIR}/${APP_NAME}.app"- mkdir -p "${APP_BUNDLE}/Contents/MacOS"- cp "${BUILD_DIR}/${APP_NAME}" "${APP_BUNDLE}/Contents/MacOS/${APP_NAME}"- chmod +x "${APP_BUNDLE}/Contents/MacOS/${APP_NAME}"- cat > "${APP_BUNDLE}/Contents/Info.plist" <<'PLIST'- <?xml version="1.0" encoding="UTF-8"?>- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">- <plist version="1.0"><dict>- <key>CFBundleExecutable</key><string>FinceptTerminal</string>- <key>CFBundleIdentifier</key><string>in.fincept.terminal</string>- <key>CFBundleName</key><string>FinceptTerminal</string>- <key>CFBundlePackageType</key><string>APPL</string>- <key>CFBundleShortVersionString</key><string>4.0.0</string>- <key>NSHighResolutionCapable</key><true/>- </dict></plist>- PLIST- fi-- # ── macdeployqt — bundles all Qt frameworks + plugins + fixes rpaths ─────- echo "Running macdeployqt..."- "${MACDEPLOYQT}" "${APP_BUNDLE}" -always-overwrite 2>&1 || true-- # ── Embed Python 3.12 framework ───────────────────────────────────────────- PY_PREFIX="$(brew --prefix [email protected])"- PY_FRAMEWORK="${PY_PREFIX}/Frameworks/Python.framework"- BUNDLE_FRAMEWORKS="${APP_BUNDLE}/Contents/Frameworks"- mkdir -p "${BUNDLE_FRAMEWORKS}"-- if [ -d "${PY_FRAMEWORK}" ]; then- echo "Embedding Python.framework..."- cp -R "${PY_FRAMEWORK}" "${BUNDLE_FRAMEWORKS}/"- ln -sf "../Frameworks/Python.framework/Versions/3.12/bin/python3.12" \- "${APP_BUNDLE}/Contents/MacOS/python3" 2>/dev/null || true- echo "Python.framework embedded"- else- echo "WARNING: Python.framework not found — copying binary only"- PY_BIN="${PY_PREFIX}/bin/python3.12"- if [ -f "${PY_BIN}" ]; then- cp "${PY_BIN}" "${APP_BUNDLE}/Contents/MacOS/python3"- chmod +x "${APP_BUNDLE}/Contents/MacOS/python3"- fi- fi-- # ── Copy resources and Python analytics scripts ───────────────────────────- cp -r fincept-qt/resources "${APP_BUNDLE}/Contents/Resources/" 2>/dev/null || true- cp -r fincept-qt/scripts "${APP_BUNDLE}/Contents/Resources/scripts" 2>/dev/null || true-- # ── Move finished bundle into dist/ ──────────────────────────────────────- cp -r "${APP_BUNDLE}" "${DIST_DIR}/"-- # ── Diagnostics ──────────────────────────────────────────────────────────- BINARY="${DIST_DIR}/${APP_NAME}.app/Contents/MacOS/${APP_NAME}"- echo "=== Binary info ===" && file "${BINARY}" && lipo -info "${BINARY}"- echo "=== Bundle size ===" && du -sh "${DIST_DIR}/${APP_NAME}.app"- echo "=== Qt frameworks ===" && ls "${DIST_DIR}/${APP_NAME}.app/Contents/Frameworks/" | grep -i qt || true- echo "=== Plugins ===" && find "${DIST_DIR}/${APP_NAME}.app/Contents/PlugIns" -name "*.dylib" 2>/dev/null | sort || true-- # ── Tar to preserve execute permissions ──────────────────────────────────- tar -czf fincept-qt/dist.tar.gz -C "${DIST_DIR}" .- echo "Archive: fincept-qt/dist.tar.gz ($(du -sh fincept-qt/dist.tar.gz | cut -f1))"-- # ── Upload artifact ───────────────────────────────────────────────────────- dist_artifacts:- path: "fincept-qt/dist.tar.gz"diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.ymlnew file mode 100644index 000000000..b454257d6--- /dev/null+++ b/.github/workflows/build-macos.yml@@ -0,0 +1,156 @@+name: Build macOS (Apple Silicon)++on:+ workflow_dispatch:+ push:+ tags:+ - 'v*'++env:+ BUILD_TYPE: Release+ QT_VERSION: "6.8.3"+ QT_MODULES: "qtcharts qtwebsockets qtmultimedia"+ APP_NAME: FinceptTerminal++jobs:+ build:+ name: macOS arm64+ runs-on: macos-15++ steps:+ - name: Checkout+ uses: actions/checkout@v4+ with:+ submodules: recursive++ # ── ccache ────────────────────────────────────────────────────────────+ - name: Set up ccache+ uses: hendrikmuhs/ccache-action@v1+ with:+ key: macos-arm64-${{ env.QT_VERSION }}+ max-size: 500M++ # ── Install build tools ───────────────────────────────────────────────+ - name: Install build tools+ run: brew install ninja cmake++ # ── Install Qt 6.8.3 (official installer, includes private headers) ──+ - name: Install Qt ${{ env.QT_VERSION }}+ uses: jurplel/install-qt-action@v4+ with:+ version: ${{ env.QT_VERSION }}+ arch: clang_64+ modules: ${{ env.QT_MODULES }}+ cache: true+ cache-key-prefix: qt-macos-arm64++ # ── Configure CMake ───────────────────────────────────────────────────+ - name: Configure CMake+ working-directory: fincept-qt+ run: |+ cmake -B build \+ -G Ninja \+ -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \+ -DCMAKE_PREFIX_PATH="${QT_ROOT_DIR}" \+ -DCMAKE_OSX_ARCHITECTURES=arm64 \+ -DCMAKE_C_COMPILER_LAUNCHER=ccache \+ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \+ -DFINCEPT_BUILD_INSTALLER=OFF \+ -DDEPLOY_QT=OFF++ # ── Build ─────────────────────────────────────────────────────────────+ - name: Build+ working-directory: fincept-qt+ run: cmake --build build --config ${{ env.BUILD_TYPE }} --parallel $(sysctl -n hw.logicalcpu)++ # ── Verify binary ─────────────────────────────────────────────────────+ - name: Verify binary+ working-directory: fincept-qt+ run: |+ if [ -f "build/${{ env.APP_NAME }}" ]; then+ BINARY="build/${{ env.APP_NAME }}"+ elif [ -f "build/${{ env.APP_NAME }}.app/Contents/MacOS/${{ env.APP_NAME }}" ]; then+ BINARY="build/${{ env.APP_NAME }}.app/Contents/MacOS/${{ env.APP_NAME }}"+ else+ echo "ERROR: binary not found"+ find build -maxdepth 3 -name "${{ env.APP_NAME }}*" || true+ exit 1+ fi+ echo "Binary: $BINARY ($(du -sh "$BINARY" | cut -f1))"+ file "$BINARY"+ lipo -info "$BINARY"++ # ── Package (macdeployqt + Python + resources) ────────────────────────+ - name: Package+ working-directory: fincept-qt+ run: |+ set -euo pipefail+ MACDEPLOYQT="${QT_ROOT_DIR}/bin/macdeployqt"+ BUILD_DIR="build"+ DIST_DIR="dist"+ mkdir -p "${DIST_DIR}"++ # Locate or create .app bundle+ if [ -d "${BUILD_DIR}/${{ env.APP_NAME }}.app" ]; then+ APP_BUNDLE="${BUILD_DIR}/${{ env.APP_NAME }}.app"+ else+ APP_BUNDLE="${BUILD_DIR}/${{ env.APP_NAME }}.app"+ mkdir -p "${APP_BUNDLE}/Contents/MacOS"+ cp "${BUILD_DIR}/${{ env.APP_NAME }}" "${APP_BUNDLE}/Contents/MacOS/${{ env.APP_NAME }}"+ chmod +x "${APP_BUNDLE}/Contents/MacOS/${{ env.APP_NAME }}"+ cat > "${APP_BUNDLE}/Contents/Info.plist" <<'PLIST'+ <?xml version="1.0" encoding="UTF-8"?>+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">+ <plist version="1.0"><dict>+ <key>CFBundleExecutable</key><string>FinceptTerminal</string>+ <key>CFBundleIdentifier</key><string>in.fincept.terminal</string>+ <key>CFBundleName</key><string>FinceptTerminal</string>+ <key>CFBundlePackageType</key><string>APPL</string>+ <key>CFBundleShortVersionString</key><string>4.0.0</string>+ <key>NSHighResolutionCapable</key><true/>+ </dict></plist>+ PLIST+ fi++ # macdeployqt — bundles all Qt frameworks + plugins + fixes rpaths+ echo "Running macdeployqt..."+ "${MACDEPLOYQT}" "${APP_BUNDLE}" -always-overwrite 2>&1 || true++ # Embed Python 3.12 framework+ PY_PREFIX="$(brew --prefix [email protected] 2>/dev/null || brew --prefix python3)"+ PY_FRAMEWORK="${PY_PREFIX}/Frameworks/Python.framework"+ BUNDLE_FRAMEWORKS="${APP_BUNDLE}/Contents/Frameworks"+ mkdir -p "${BUNDLE_FRAMEWORKS}"+ if [ -d "${PY_FRAMEWORK}" ]; then+ echo "Embedding Python.framework..."+ cp -R "${PY_FRAMEWORK}" "${BUNDLE_FRAMEWORKS}/"+ ln -sf "../Frameworks/Python.framework/Versions/3.12/bin/python3.12" \+ "${APP_BUNDLE}/Contents/MacOS/python3" 2>/dev/null || true+ else+ echo "WARNING: Python.framework not found — skipping embed"+ fi++ # Copy resources and Python analytics scripts+ cp -r resources "${APP_BUNDLE}/Contents/Resources/" 2>/dev/null || true+ cp -r scripts "${APP_BUNDLE}/Contents/Resources/scripts" 2>/dev/null || true++ # Move bundle to dist/+ cp -r "${APP_BUNDLE}" "${DIST_DIR}/"++ # Diagnostics+ BINARY="${DIST_DIR}/${{ env.APP_NAME }}.app/Contents/MacOS/${{ env.APP_NAME }}"+ echo "=== Bundle size ===" && du -sh "${DIST_DIR}/${{ env.APP_NAME }}.app"+ echo "=== Qt frameworks ===" && ls "${DIST_DIR}/${{ env.APP_NAME }}.app/Contents/Frameworks/" | grep -i qt || true+ echo "=== Plugins ===" && find "${DIST_DIR}/${{ env.APP_NAME }}.app/Contents/PlugIns" -name "*.dylib" 2>/dev/null | sort || true++ # Tar to preserve execute permissions+ tar -czf dist.tar.gz -C "${DIST_DIR}" .+ echo "Archive: dist.tar.gz ($(du -sh dist.tar.gz | cut -f1))"++ # ── Upload artifact ───────────────────────────────────────────────────+ - name: Upload artifact+ uses: actions/upload-artifact@v4+ with:+ name: FinceptTerminal-macOS-arm64+ path: fincept-qt/dist.tar.gz+ retention-days: 30diff --git a/fincept-qt/CMakeLists.txt b/fincept-qt/CMakeLists.txtindex ff216bf61..5b9759249 100644--- a/fincept-qt/CMakeLists.txt+++ b/fincept-qt/CMakeLists.txt@@ -154,10 +154,16 @@ foreach(_pc md4c.pc md4c-html.pc)endforeach()# ── QGeoView (interactive map widget with OSM tiles) ─────────────────────────+# PATCH_COMMAND removes -framework AGL which was deleted in macOS 14 (Sonoma).+# QGeoView's CMakeLists links it unconditionally; we strip it before configure.+# sed -i '' is macOS BSD sed syntax; on Linux sed -i (no argument) is used —+# the || true ensures it is a no-op on platforms where the pattern isn't found.FetchContent_Declare(QGeoViewGIT_REPOSITORY https://github.com/AmonRaNet/QGeoView.gitGIT_TAG master+ PATCH_COMMAND+ sed -i.bak "s/AGL//g" <SOURCE_DIR>/lib/CMakeLists.txt || true)set(QGV_BUILD_SAMPLES OFF CACHE BOOL "" FORCE)set(QGV_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)@@ -165,20 +171,6 @@ 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)-# AGL framework was removed in macOS 14 (Sonoma). QGeoView links it unconditionally-# which breaks builds on Sequoia+. Strip it from the target's link libraries.-if(APPLE)- get_target_property(_qgv_libs qgeoview LINK_LIBRARIES)- if(_qgv_libs)- list(REMOVE_ITEM _qgv_libs "-framework AGL")- set_target_properties(qgeoview PROPERTIES LINK_LIBRARIES "${_qgv_libs}")- endif()- get_target_property(_qgv_iface_libs qgeoview INTERFACE_LINK_LIBRARIES)- if(_qgv_iface_libs)- list(REMOVE_ITEM _qgv_iface_libs "-framework AGL")- set_target_properties(qgeoview PROPERTIES INTERFACE_LINK_LIBRARIES "${_qgv_iface_libs}")- endif()-endif()# ── SingleApplication (single-process enforcement + new-window IPC) ──────────# When the user re-launches the exe, the secondary instance sends "--new-window"