Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/1.5.0 #1926

Merged
merged 19 commits into from
Jun 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -40,6 +36,8 @@ bots/interactive/*.html
dist/*
build/terminal
build/nsis/app
DMG/*
*.dmg

# Jupyter Lab Extension build files
jupyterlab/*/*.bundle.*
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -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
Expand Down
46 changes: 37 additions & 9 deletions build/pyinstaller/build4mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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 " | | | (_) "
Expand All @@ -19,4 +19,4 @@ The boot up process might take a while. Please be patient...
"
echo "$BOOTUP_MESSAGE"

"$SCRIPTDIR"/OpenBB/OpenBBTerminal
"$SCRIPTDIR"/.OpenBB/OpenBBTerminal
20 changes: 20 additions & 0 deletions build/pyinstaller/setup_icons.applescript
Original file line number Diff line number Diff line change
@@ -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)
1 change: 1 addition & 0 deletions build/pyinstaller/terminal.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down
Binary file added images/dmg_volume.icns
Binary file not shown.
Binary file added images/openbb_dmg_background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/openbb_dmg_background@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/openbb_folder_icon.icns
Binary file not shown.
Loading