Skip to content

Commit

Permalink
Release/1.5.0 (#1926)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
piiq authored Jun 10, 2022
1 parent 4ad367d commit 79e9275
Show file tree
Hide file tree
Showing 15 changed files with 111 additions and 30,534 deletions.
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/[email protected]
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

0 comments on commit 79e9275

Please sign in to comment.