Skip to content

macOS standalone app

Muammar El Khatib edited this page Sep 2, 2020 · 12 revisions

If for any reason you want to build the latest version in github of Mkchromecast, or if you are seeing the Illegal instruction: 4 error or any other problem, you need to install python3 and all requirements contained in requirements.txt:

Install homebrew (I think it is a non-intrusive package manager for macOS):

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install python3, and git:

brew install python3 git

Once it is done, you can clone mkchromecast:

git clone https://github.com/muammar/mkchromecast

Now, get into the mkchromecast directory:

cd mkchromecast

Install the python3 requirements:

pip3 install -r requirements.txt

Then, you also need to install the following python modules:

pip3 install bs4
pip3 install google py2app

Once the requirements are fulfilled, you will need to install pyqt5 and qt5 using homebrew:

brew install pyqt5 qt5

To build the app, you need to use the provided Makefile as follows:

make deploy

This should create a mkchromecast/dist directory with both dmg and app files. Drag to install the app. You can check it with this:

open dist

Then, you can clean as follows:

make clean

If the application fails to load

That is most likely to be related to Qt5. You will need to fix the bundle. To do so, you need to clone macdeployqtfix:

git clone https://github.com/muammar/macdeployqtfix

Then, execute the following with python3:

python3 macdeployqtfix.py /path/to/mkchromecast.app/Contents/MacOS/Mkchromecast /usr/local/Cellar/qt/X.Y.Z

Note: Deploying using qt5 5.6.1 is not working right now. I have submitted a bug report in the qt bug tracking system. To install qt55.6.0 check this issue in homebrew.

Update: the problem mentioned above has been finally fixed upstream. However, it is possible to fix Qt macOS bundles by using https://github.com/muammar/macdeployqtfix. I cloned this tool from @aurelien-rainone.

Clone this wiki locally