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.3 update
tilakpatel22888a3acf166d
diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex 7f3c780aa..ba91e67b5 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -640,10 +640,17 @@ jobs:PLISTfi- # CMake's POST_BUILD rule copies scripts/ to Contents/MacOS/scripts/.- # PythonRunner::find_scripts_dir() resolves relative to- # applicationDirPath() (= Contents/MacOS on macOS), so this layout- # is load-bearing — do not move scripts/ to Contents/Resources/.+ # CMake's POST_BUILD rule copies scripts/ + resources/ + yt-dlp+ # into Contents/MacOS/ (portable layout for Linux/Windows builds).+ # On macOS that's not the canonical .app layout and codesign+ # refuses to sign any bundle with non-Mach-Os in Contents/MacOS/,+ # so the "Canonicalise bundle layout" block further down in this+ # step moves them into Contents/Resources/ before signing.+ # PythonRunner::find_scripts_dir(),+ # PythonSetupManager::find_requirements_file(), and+ # VideoPlayerWidget::resolve_ytdlp_program() each carry an+ # `../Resources/...` candidate so the C++ side picks up the new+ # location after the move.# Embed Python.framework before codesign so it's signed as part of# the bundle. We use `rsync -a` (not `ditto`) because ditto under@@ -798,20 +805,55 @@ jobs:echo "Python.framework structure OK"fi- # Resources (icons, requirements-*.txt) go in Contents/Resources/ —- # macOS convention for non-code assets, read via QStandardPaths.- # Scripts are ALREADY in Contents/MacOS/scripts/ via CMake POST_BUILD;- # do not duplicate them into Resources/ (doubles bundle size and- # creates two trees for codesign to hash).+ # Top-level Resources/ for icons (Info.plist's CFBundleIconFile+ # is read from here).mkdir -p "${APP_BUNDLE}/Contents/Resources"cp -r resources "${APP_BUNDLE}/Contents/Resources/" 2>/dev/null || true+ # ── Canonicalise bundle layout for codesign ──────────────────────+ # CMake's POST_BUILD steps copy scripts/, resources/, and yt-dlp+ # into Contents/MacOS/ (alongside the binary), which is portable+ # to Linux/Windows where there's no .app bundle. On macOS that+ # layout is FATAL for codesign: anything in Contents/MacOS/ that+ # isn't a Mach-O makes codesign reject the bundle with+ # "code object is not signed at all+ # In subcomponent: .../Contents/MacOS/<...>"+ # So we relocate the offending paths into Contents/Resources/+ # before signing. PythonRunner / PythonSetupManager /+ # VideoPlayerWidget all have `../Resources/...` in their+ # candidate search lists, so the C++ side keeps working.+ echo "Canonicalising bundle layout (moving non-Mach-O content out of MacOS/)..."++ # scripts/ → Contents/Resources/scripts/ (preserve dir name)+ if [ -d "${APP_BUNDLE}/Contents/MacOS/scripts" ]; then+ rm -rf "${APP_BUNDLE}/Contents/Resources/scripts"+ mv "${APP_BUNDLE}/Contents/MacOS/scripts" \+ "${APP_BUNDLE}/Contents/Resources/scripts"+ echo " moved Contents/MacOS/scripts → Contents/Resources/scripts"+ fi++ # MacOS/resources/* → Contents/Resources/ (FLATTEN — PythonSetupManager+ # searches `../Resources/<filename>`, not `../Resources/resources/...`).+ if [ -d "${APP_BUNDLE}/Contents/MacOS/resources" ]; then+ rsync -a "${APP_BUNDLE}/Contents/MacOS/resources/" \+ "${APP_BUNDLE}/Contents/Resources/"+ rm -rf "${APP_BUNDLE}/Contents/MacOS/resources"+ echo " merged Contents/MacOS/resources/* → Contents/Resources/"+ fi++ # yt-dlp → Contents/Resources/yt-dlp+ if [ -f "${APP_BUNDLE}/Contents/MacOS/yt-dlp" ]; then+ mv "${APP_BUNDLE}/Contents/MacOS/yt-dlp" \+ "${APP_BUNDLE}/Contents/Resources/yt-dlp"+ echo " moved Contents/MacOS/yt-dlp → Contents/Resources/yt-dlp"+ fi+echo "Bundle staged at: ${APP_BUNDLE}"echo "Pre-sign size: $(du -sh "${APP_BUNDLE}" | cut -f1)"- echo "=== Contents/MacOS/ top level ==="+ echo "=== Contents/MacOS/ top level (should be Mach-Os only) ==="ls -la "${APP_BUNDLE}/Contents/MacOS/" | head -10- echo "=== Scripts count under MacOS/scripts ==="- find "${APP_BUNDLE}/Contents/MacOS/scripts" -type f 2>/dev/null | wc -l || true+ echo "=== Scripts count under Contents/Resources/scripts ==="+ find "${APP_BUNDLE}/Contents/Resources/scripts" -type f 2>/dev/null | wc -l || true# ── Run macdeployqt on the fully staged bundle ────────────────────────# macdeployqt copies Qt frameworks, fixes rpaths, and signs everythingdiff --git a/fincept-qt/src/python/PythonRunner.cpp b/fincept-qt/src/python/PythonRunner.cppindex cdca6bfb1..79c0ae96c 100644--- a/fincept-qt/src/python/PythonRunner.cpp+++ b/fincept-qt/src/python/PythonRunner.cpp@@ -259,7 +259,11 @@ QString PythonRunner::find_scripts_dir() const {QString exe_dir = QCoreApplication::applicationDirPath();// Check relative to exe: scripts/, ../scripts/, etc.+ // macOS-canonical first: signed bundles must keep scripts/ in+ // Contents/Resources/ (not Contents/MacOS/) — anything other than+ // Mach-Os in MacOS/ makes codesign reject the bundle as malformed.QStringList candidates = {+ exe_dir + "/../Resources/scripts", // macOS canonical (.app/Contents/Resources/scripts)exe_dir + "/scripts",exe_dir + "/../scripts",exe_dir + "/../../scripts",diff --git a/fincept-qt/src/python/PythonSetupManager.cpp b/fincept-qt/src/python/PythonSetupManager.cppindex f230557fa..19da12832 100644--- a/fincept-qt/src/python/PythonSetupManager.cpp+++ b/fincept-qt/src/python/PythonSetupManager.cpp@@ -850,8 +850,11 @@ QString PythonSetupManager::find_requirements_file(const QString& filename) consQString exe_dir = QCoreApplication::applicationDirPath();LOG_INFO("PythonSetup", "find_requirements_file: searching for " + filename + " exe_dir=" + exe_dir);- // Search relative to executable+ // Search relative to executable.+ // macOS-canonical first: signed bundles must keep resources/ outside+ // Contents/MacOS/ (codesign rejects anything non-Mach-O in MacOS/).QStringList candidates = {+ exe_dir + "/../Resources/" + filename, // macOS canonical (.app/Contents/Resources/...)exe_dir + "/resources/" + filename,exe_dir + "/../resources/" + filename,exe_dir + "/../../resources/" + filename,diff --git a/fincept-qt/src/screens/dashboard/widgets/VideoPlayerWidget.cpp b/fincept-qt/src/screens/dashboard/widgets/VideoPlayerWidget.cppindex afb8b229d..3aeae5fbf 100644--- a/fincept-qt/src/screens/dashboard/widgets/VideoPlayerWidget.cpp+++ b/fincept-qt/src/screens/dashboard/widgets/VideoPlayerWidget.cpp@@ -251,7 +251,11 @@ QString VideoPlayerWidget::resolve_ytdlp_program() const {const QString exe_name = "yt-dlp";#endifconst QString exe_dir = QCoreApplication::applicationDirPath();+ // macOS-canonical first: signed bundles must keep yt-dlp in+ // Contents/Resources/ (not Contents/MacOS/) — anything non-Mach-O in+ // MacOS/ makes codesign reject the bundle.const QStringList local_candidates = {+ QDir(exe_dir).filePath("../Resources/" + exe_name), // macOS canonicalQDir(exe_dir).filePath(exe_name),QDir(exe_dir).filePath("tools/" + exe_name),QDir(exe_dir).filePath("bin/" + exe_name),