Feature #6443

Make CHIRP on Macintosh self contained

Added by Barry Nelson 10 months ago. Updated 3 months ago.

Status:In Progress Start date:02/11/2019
Priority:Normal Due date:
Assignee:Dan Smith % Done:

90%

Category:-
Target version:chirp-daily
Chirp Version:daily Model affected:(All models)

Description

I have already been able to accomplish this by using the loading script below and copying all the dylib files to CHIRP.app/Contents/Resources/lib, copying all the Python packages to CHIRP.app/Contents/Resources/site-packages and copying a Python interpreter to CHIRP.app/Contents/CHIRP. This makes it so CHIRP no longer requires the KK7DS Python runtime.

Example at: https://drive.google.com/file/d/1zlN5RBJxgZ4fGoH6OzGuKr7krX_1RGu1/view?usp=sharing

#!/usr/bin/env bash

LOCATION=$(dirname "${BASH_SOURCE}")

PYTHON="${LOCATION}/../CHIRP"
export PYTHONPATH="/Library/Python/2.7/site-packages:$LOCATION/../Resources/site-packages:."
export DYLD_FALLBACK_LIBRARY_PATH="$LOCATION/../Resources/lib"

exec "$PYTHON" "${LOCATION}/../Resources/chirp/chirpw"

History

Updated by Barry Nelson 10 months ago

Note: I used dylib files and site-packages from brew. I tested it on another Mac running OS-X 10.14 where brew is not installed. My build machine was running 10.13. Both machines were 64 bit, my build will only work on a 64 bit OS, however, it should be possible to support 32 bit Macintoshes as this way well, if you want to go to the trouble. You could probably also leverage /usr/bin/python instead of building the interpreter binary, as python 2.7 does ship with OS-X.

Comments?

Updated by Barry Nelson 10 months ago

Example at https://drive.google.com/file/d/1zlN5RBJxgZ4fGoH6OzGuKr7krX_1RGu1/view?usp=sharing has been updated to the latest build as of 02/20/2019.

Updated by Barry Nelson 10 months ago

Example at https://drive.google.com/file/d/1zlN5RBJxgZ4fGoH6OzGuKr7krX_1RGu1/view?usp=sharing has been updated to the latest build as of 02/20/2019.

Updated by Barry Nelson 3 months ago

Code at https://drive.google.com/file/d/1zlN5RBJxgZ4fGoH6OzGuKr7krX_1RGu1/view?usp=sharing updated again as of 09/08/2019.

I also have another method of bundling the support files that I am testing using pyinstall, which is cross platform.

Updated by Dan Smith 3 months ago

I've integrated your approach as a test for the next daily build. We should build and release a "chirp-unified-...app.zip" file which is the standalone one. When that happens, I'll make a call for some people to do some testing of it and if that seems to go well, I'll disable building the runtime-dependent one.

Updated by Dan Smith 3 months ago

  • Status changed from New to In Progress

Updated by Barry Nelson 3 months ago

Is there somewhere I can download and look at your test build? The latest I see is from 09/05/2019.

Updated by Dan Smith 3 months ago

Next time I apply a patch it'll get generated with the other builds. I have one in the queue I need to test for the ICF module. I'll try to get to that this week, which'll generate a build.

Also available in: Atom PDF