Project

General

Profile

Actions

Feature #6443

open

Make CHIRP on Macintosh self contained

Added by Barry Nelson almost 6 years ago. Updated over 4 years ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
02/11/2019
Due date:
% Done:

90%

Estimated time:
Chirp Version:
daily
Model affected:
(All models)
I read the instructions above:

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"

Actions #1

Updated by Barry Nelson almost 6 years 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?

Actions #2

Updated by Barry Nelson almost 6 years 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.

Actions #3

Updated by Barry Nelson almost 6 years 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.

Actions #4

Updated by Barry Nelson about 5 years 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.

Actions #5

Updated by Dan Smith about 5 years 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.

Actions #6

Updated by Dan Smith about 5 years ago

  • Status changed from New to In Progress
Actions #7

Updated by Barry Nelson about 5 years ago

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

Actions #8

Updated by Dan Smith about 5 years 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.

Actions #9

Updated by Barry Nelson almost 5 years ago

Please take a I look at https://chirp.danplanet.com/issues/7147

I believe that the command
export DYLD_VERSIONED_LIBRARY_PATH="$LOCATION/../Resources/lib"

should be added to the loader script to prevent conflicts with other python versions and libraries the user may have installed. The complete loader script should then look like this:

#!/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"
export DYLD_VERSIONED_LIBRARY_PATH="$LOCATION/../Resources/lib"

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

Actions #10

Updated by Bernhard Hailer over 4 years ago

Is this complete, by any chance? Thanks.

Actions

Also available in: Atom PDF