From 79e9275ccf4616cb04119758518e80be198bdaf8 Mon Sep 17 00:00:00 2001 From: Theodore Aptekarev Date: Fri, 10 Jun 2022 22:32:13 +0300 Subject: Release/1.5.0 (#1926) * Add more build assets and all notebook checkpoints to ignore * Delete old reports that were accidentally added to the repo * Fix portfolios not bundling * Add mac installer image assets * Update license * Make the code folder hidden in macOS package * Add folder and launcher icons programmatically during build * Change dmg creation tool to create-dmg * Update macOS installation docs * Bump project version * Update macOS installation instruction image links * Fix macOS installation instructions styling * Unify macOS install instructions image size * Point download links to the website vs github * Fix macOS launcher self-quarantine command * Fix routines not launching in packaged apps * Fix .openbb test mode not displaying filenames during test run * Remove file with weird apple character in path --- .gitignore | 8 +- LICENSE | 2 +- build/pyinstaller/build4mac.sh | 46 +- .../OpenBB Terminal/OpenBB Terminal | 4 +- build/pyinstaller/setup_icons.applescript | 20 + build/pyinstaller/terminal.spec | 1 + images/dmg_volume.icns | Bin 0 -> 674218 bytes images/openbb_dmg_background.png | Bin 0 -> 13236 bytes images/openbb_dmg_background@2x.png | Bin 0 -> 33150 bytes images/openbb_folder_icon.icns | Bin 0 -> 84165 bytes .../stored/20220404_092139_crypto_market.html | 15253 ------------------- .../stored/20220404_100708_crypto_market.html | 15220 ------------------ pyproject.toml | 2 +- terminal.py | 24 +- website/content/_index.md | 65 +- 15 files changed, 111 insertions(+), 30534 deletions(-) create mode 100644 build/pyinstaller/setup_icons.applescript create mode 100644 images/dmg_volume.icns create mode 100644 images/openbb_dmg_background.png create mode 100644 images/openbb_dmg_background@2x.png create mode 100644 images/openbb_folder_icon.icns delete mode 100644 openbb_terminal/jupyter/reports/stored/20220404_092139_crypto_market.html delete mode 100644 openbb_terminal/jupyter/reports/stored/20220404_100708_crypto_market.html diff --git a/.gitignore b/.gitignore index 63ed8ea8d2b..85867164489 100644 --- a/.gitignore +++ b/.gitignore @@ -20,15 +20,11 @@ openbb_terminal/config_plot.py openbb_terminal/config_terminal.py openbb_terminal/feature_flags.py openbb_terminal/reports/stored/* -openbb_terminal/dashboards/.ipynb_checkpoints -openbb_terminal/custom_reports/*/.ipynb_checkpoints -openbb_terminal/reports/.ipynb_checkpoints -openbb_terminal/reports/widgets/.ipynb_checkpoints !openbb_terminal/reports/stored/.gitkeep !openbb_terminal/dashboards/*.ipynb !openbb_terminal/reports/*.ipynb openbb_terminal/portfolio/portfolios/* -.ipynb_checkpoints/* +**/.ipynb_checkpoints *.swp *.http bots/interactive/*.html @@ -40,6 +36,8 @@ bots/interactive/*.html dist/* build/terminal build/nsis/app +DMG/* +*.dmg # Jupyter Lab Extension build files jupyterlab/*/*.bundle.* diff --git a/LICENSE b/LICENSE index c3ddb31fb53..b366787995e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2021 Didier Rodrigues Lopes +Copyright (c) 2021-2022 OpenBB Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/build/pyinstaller/build4mac.sh b/build/pyinstaller/build4mac.sh index bd841bad191..8159341362b 100755 --- a/build/pyinstaller/build4mac.sh +++ b/build/pyinstaller/build4mac.sh @@ -13,20 +13,48 @@ rm -rf openbb_terminal/logs pyinstaller build/pyinstaller/terminal.spec +# Assign icons to the built folder and launcher +osascript build/pyinstaller/setup_icons.applescript + # Create the folder that is used for packaging mkdir DMG # Copy relevant artifacts to the packaging folder cp -r build/pyinstaller/macOS_package_assets/* DMG/ -mv dist/OpenBBTerminal DMG/"$DISK_IMAGE_NAME"/OpenBB - -# Copy launcher and other artifacts to the DMG -hdiutil create \ - -volname "$DISK_IMAGE_NAME" \ - -srcfolder DMG \ - -ov \ - -format UDZO \ - "$DISK_IMAGE_NAME".dmg +mv dist/OpenBBTerminal DMG/"$DISK_IMAGE_NAME"/.OpenBB + +# Create a DMG with create-dmg +# +# NOTE: +# Code signing and notarization requires adding the following: +# +# --codesign "Common name of the Developer certificate" +# --format UDIF +# --notarize "Notarization identity " see: +# https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/customizing_the_notarization_workflow + +if ! command -v create-dmg &> /dev/null +then + echo "create could not be found" + echo "install create-dmg from brew or github" + exit +fi + +create-dmg \ + --volname "OpenBB Terminal" \ + --volicon "images/dmg_volume.icns" \ + --background "images/openbb_dmg_background.png" \ + --icon "OpenBB Terminal" 190 250 \ + --window-pos 190 120 \ + --window-size 800 400 \ + --icon-size 100 \ + --text-size 14 \ + --app-drop-link 600 250 \ + --eula LICENSE \ + --format UDZO \ + --no-internet-enable \ + "OpenBB Terminal".dmg DMG + # Clean Up artifacts from this build rm -rf build/terminal && rm -rf dist && rm -rf DMG diff --git a/build/pyinstaller/macOS_package_assets/OpenBB Terminal/OpenBB Terminal b/build/pyinstaller/macOS_package_assets/OpenBB Terminal/OpenBB Terminal index 0a7ee1b600f..5503832bff9 100755 --- a/build/pyinstaller/macOS_package_assets/OpenBB Terminal/OpenBB Terminal +++ b/build/pyinstaller/macOS_package_assets/OpenBB Terminal/OpenBB Terminal @@ -3,7 +3,7 @@ clear SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -xattr -r -d com.apple.quarantine "$SCRIPTDIR"/OpenBB +xattr -r -d com.apple.quarantine "$SCRIPTDIR"/.OpenBB echo " _ _ _ " echo " | | | (_) " @@ -19,4 +19,4 @@ The boot up process might take a while. Please be patient... " echo "$BOOTUP_MESSAGE" -"$SCRIPTDIR"/OpenBB/OpenBBTerminal +"$SCRIPTDIR"/.OpenBB/OpenBBTerminal diff --git a/build/pyinstaller/setup_icons.applescript b/build/pyinstaller/setup_icons.applescript new file mode 100644 index 00000000000..8bbce2b5471 --- /dev/null +++ b/build/pyinstaller/setup_icons.applescript @@ -0,0 +1,20 @@ +use framework "Foundation" +use framework "AppKit" +use scripting additions + +-- Get script location +tell application "Finder" + set current_path to POSIX path of (container of (path to me) as alias) +end tell + +-- Set OpenBB Terminal folder icon relative to script location +set sourcePath to current_path & "../../images/openbb_folder_icon.icns" +set destPath to current_path & "macOS_package_assets/OpenBB Terminal" +set imageData to (current application's NSImage's alloc()'s initWithContentsOfFile:sourcePath) +(current application's NSWorkspace's sharedWorkspace()'s setIcon:imageData forFile:destPath options:2) + +-- Set OpenBB Terminal launcher icon relative to script location +set sourcePath to current_path & "../../images/openbb.icns" +set destPath to current_path & "macOS_package_assets/OpenBB Terminal/OpenBB Terminal" +set imageData to (current application's NSImage's alloc()'s initWithContentsOfFile:sourcePath) +(current application's NSWorkspace's sharedWorkspace()'s setIcon:imageData forFile:destPath options:2) diff --git a/build/pyinstaller/terminal.spec b/build/pyinstaller/terminal.spec index acf568bd267..1b3ba0ed7a6 100644 --- a/build/pyinstaller/terminal.spec +++ b/build/pyinstaller/terminal.spec @@ -29,6 +29,7 @@ set_key(default_env_file, "OPENBB_LOGGING_COMMIT_HASH", str(commit_hash)) added_files = [ (os.path.join(os.getcwd(), "openbb_terminal"), "openbb_terminal"), (os.path.join(os.getcwd(), "routines"), "routines"), + (os.path.join(os.getcwd(), "portfolio"), "portfolio"), (os.path.join(os.getcwd(), "i18n"), "i18n"), (os.path.join(os.getcwd(), "styles"), "styles"), (os.path.join(pathex, "property_cached"), "property_cached"), diff --git a/images/dmg_volume.icns b/images/dmg_volume.icns new file mode 100644 index 00000000000..255d73c02aa Binary files /dev/null and b/images/dmg_volume.icns differ diff --git a/images/openbb_dmg_background.png b/images/openbb_dmg_background.png new file mode 100644 index 00000000000..12894a59ad5 Binary files /dev/null and b/images/openbb_dmg_background.png differ diff --git a/images/openbb_dmg_background@2x.png b/images/openbb_dmg_background@2x.png new file mode 100644 index 00000000000..ee38fefa1bf Binary files /dev/null and b/images/openbb_dmg_background@2x.png differ diff --git a/images/openbb_folder_icon.icns b/images/openbb_folder_icon.icns new file mode 100644 index 00000000000..cf4b7e36087 Binary files /dev/null and b/images/openbb_folder_icon.icns differ diff --git a/openbb_terminal/jupyter/reports/stored/20220404_092139_crypto_market.html b/openbb_terminal/jupyter/reports/stored/20220404_092139_crypto_market.html deleted file mode 100644 index 62fb3feafee..00000000000 --- a/openbb_terminal/jupyter/reports/stored/20220404_092139_crypto_market.html +++ /dev/null @@ -1,15253 +0,0 @@ - - - - - -20220404_092139_crypto_market - - - - - - - - -