Install Blink Qt locally
------------------------

# Install Xcode from Apple
# Install MacPorts from https://www.macports.org
# Install python from https://www.python.org
# Install Mac Ports from https://www.macports.org

To install blink-qt and its dependencies in Python user environment:

chmod +x ./install_blink.sh
./install_blink.sh

The packages will be installed in the folder:

~/Library/Python/3.9/lib/python/site-packages/

The binaries will be installed in the folder:

~/Library/Python/3.9/bin

To run Blink in place:

./run

To run Blink from local Python environment

~/Library/Python/3.9/bin/blink


Making Blink Qt app
-------------------

Generate a spec file used by pyinstaller using make_spec.sh script. The
resulting file must be tweaked, see the modified blink.specs file.

Copy blink.spec in the main source directory, edit it and set
codesign_identity to your Developer id.

pyinstaller blink.spec -y

The generated app can then be found in dist/ folder.

sudo port install create-dmg

To generate a .dmg run:

./macos/create_dmg.sh 

Note. The resulting DMG has a very large size due to bundling of all system
installed Qt6 frameworks and Python packages.  This can be optimized by
removing unused libraries during building the app stage.


Local storage
-------------

Blink Qt configuration and data is stored inside the folder:

~/Library/Application\ Support/Blink-Qt/


Qt6 notes
---------

Running on MacOS

https://stackoverflow.com/questions/33090346/is-there-any-way-to-use-qtwebengine-without-opengl

export QMLSCENE_DEVICE=softwarecontext


install_name_tool -add_rpath /Users/adigeo/.venv/blinqt5-windows/lib/python3.9/site-packages/PyQt5/Qt/lib  /Users/adigeo/.venv/blinqt5-windows/lib/python3.9/site-packages/PyQt5/QtWebKit.so
install_name_tool -add_rpath /Users/adigeo/.venv/blinqt5-windows/lib/python3.9/site-packages/PyQt5/Qt/lib  /Users/adigeo/.venv/blinqt5-windows/lib/python3.9/site-packages/PyQt5/QtWebKitWidgets.so
