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
fix: remove hardcoded API key, fix CI packaging for all platforms
tilakpatel223ea6220da875
diff --git a/.github/workflows/build-cpp.yml b/.github/workflows/build-cpp.ymlindex 2349f5d21..6a68960df 100644--- a/.github/workflows/build-cpp.yml+++ b/.github/workflows/build-cpp.yml@@ -174,17 +174,24 @@ jobs:run: |mkdir -p distcp build/Release/${{ matrix.exe }} dist/- # windeployqt bundles Qt DLLs and dependencies- "${QT_ROOT_DIR}/bin/windeployqt.exe" \- --release \- --no-translations \- --no-system-d3d-compiler \- --no-opengl-sw \- dist/${{ matrix.exe }} || \- "${QT_ROOT_DIR}/../msvc2022_64/bin/windeployqt.exe" \- --release \- --no-translations \- dist/${{ matrix.exe }} || true+ # windeployqt is always an x64 host tool — find it in the x64 Qt bin dir.+ # For x64 builds QT_ROOT_DIR points to msvc2022_64, so bin/windeployqt.exe works.+ # For ARM64 cross-compiled builds QT_ROOT_DIR points to msvc2022_arm64_cross_compiled;+ # windeployqt.exe lives one level up in msvc2022_64/bin instead.+ WDQT="${QT_ROOT_DIR}/bin/windeployqt.exe"+ if [ ! -f "$WDQT" ]; then+ WDQT="${QT_ROOT_DIR}/../msvc2022_64/bin/windeployqt.exe"+ fi+ if [ -f "$WDQT" ]; then+ "$WDQT" \+ --release \+ --no-translations \+ --no-system-d3d-compiler \+ --no-opengl-sw \+ dist/${{ matrix.exe }}+ else+ echo "::warning::windeployqt not found — Qt DLLs not bundled"+ ficp -r resources dist/resources 2>/dev/null || truecp -r scripts dist/scripts 2>/dev/null || true@@ -194,14 +201,31 @@ jobs:working-directory: fincept-qtrun: |mkdir -p dist- # Wrap in .app bundle if not already+ MACDEPLOYQT="${QT_ROOT_DIR}/bin/macdeployqt"APP="build/${{ matrix.exe }}.app"if [ -d "$APP" ]; then- macdeployqt "$APP" -dmg 2>/dev/null || true+ # .app bundle — run macdeployqt to embed Qt frameworks+ "$MACDEPLOYQT" "$APP" 2>/dev/null || truecp -r "$APP" dist/else- cp "build/${{ matrix.exe }}" dist/- chmod +x "dist/${{ matrix.exe }}"+ # Plain binary — create a minimal .app bundle manually then deploy+ BUNDLE="dist/${{ matrix.exe }}.app"+ mkdir -p "$BUNDLE/Contents/MacOS"+ cp "build/${{ matrix.exe }}" "$BUNDLE/Contents/MacOS/${{ matrix.exe }}"+ chmod +x "$BUNDLE/Contents/MacOS/${{ matrix.exe }}"+ cat > "$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+ "$MACDEPLOYQT" "$BUNDLE" 2>/dev/null || trueficp -r resources dist/resources 2>/dev/null || truecp -r scripts dist/scripts 2>/dev/null || truediff --git a/fincept-qt/CMakeLists.txt b/fincept-qt/CMakeLists.txtindex 561fd358f..c8c33b561 100644--- a/fincept-qt/CMakeLists.txt+++ b/fincept-qt/CMakeLists.txt@@ -850,7 +850,12 @@ endif()# ── Windows: deploy Qt DLLs ──────────────────────────────────────────────────if(WIN32)- find_program(WINDEPLOYQT_EXE windeployqt HINTS "C:/Qt/6.8.3/msvc2022_64/bin")+ find_program(WINDEPLOYQT_EXE windeployqt+ HINTS+ "$ENV{QT_ROOT_DIR}/bin"+ "C:/Qt/6.8.3/msvc2022_64/bin"+ "C:/Qt/6.8.2/msvc2022_64/bin"+ )if(WINDEPLOYQT_EXE)# Only deploy Qt DLLs when explicitly requested via -DDEPLOY_QT=ON# Avoids 10-30s overhead on every incremental builddiff --git a/fincept-qt/src/app/main.cpp b/fincept-qt/src/app/main.cppindex 4484d7038..4c52cfc6e 100644--- a/fincept-qt/src/app/main.cpp+++ b/fincept-qt/src/app/main.cpp@@ -38,7 +38,10 @@ int main(int argc, char* argv[]) {// Initialize configauto& config = fincept::AppConfig::instance();fincept::HttpClient::instance().set_base_url(config.api_base_url());- fincept::HttpClient::instance().set_auth_header("fk_user_vU20qwUxKtPmg0fWpriNBhcAnBVGgOtJxsKiiwfD9Qo");+ const QString saved_token = config.auth_token();+ if (!saved_token.isEmpty()) {+ fincept::HttpClient::instance().set_auth_header(saved_token);+ }// Register migrations explicitly (avoids MSVC /OPT:REF stripping static-init TUs)fincept::register_migration_v001();