From 7abbee91824debdeb256d47e3e9c46132fd6f2f7 Mon Sep 17 00:00:00 2001 From: itdominator <1itdominator@gmail.com> Date: Tue, 19 Jul 2022 16:46:38 -0500 Subject: [PATCH] Addec compilation to binary using Nuitka --- .../solarfm-0.0.1/SolarFM/create-binary.sh | 17 +++++++++++++++++ .../{solarfm.sh => create-standalone.sh} | 7 +++---- .../SolarFM/solarfm/core/controller_data.py | 2 +- 3 files changed, 21 insertions(+), 5 deletions(-) create mode 100755 src/versions/solarfm-0.0.1/SolarFM/create-binary.sh rename src/versions/solarfm-0.0.1/SolarFM/{solarfm.sh => create-standalone.sh} (50%) diff --git a/src/versions/solarfm-0.0.1/SolarFM/create-binary.sh b/src/versions/solarfm-0.0.1/SolarFM/create-binary.sh new file mode 100755 index 0000000..2cd29cc --- /dev/null +++ b/src/versions/solarfm-0.0.1/SolarFM/create-binary.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# . CONFIG.sh + +# set -o xtrace ## To debug scripts +# set -o errexit ## To exit on error +# set -o errunset ## To exit if a variable is referenced but not set + + +function main() { + cd "$(dirname "")" + echo "Working Dir: " $(pwd) + + source "/home/abaddon/Portable_Apps/py-venvs/gtk-apps-venv/venv/bin/activate" + python -m nuitka --onefile --follow-imports --linux-onefile-icon="/home/abaddon/.config/solarfm/solarfm.png" solarfm/__main__.py -o solarfm.a +} +main "$@"; diff --git a/src/versions/solarfm-0.0.1/SolarFM/solarfm.sh b/src/versions/solarfm-0.0.1/SolarFM/create-standalone.sh similarity index 50% rename from src/versions/solarfm-0.0.1/SolarFM/solarfm.sh rename to src/versions/solarfm-0.0.1/SolarFM/create-standalone.sh index 67de002..ccc97e0 100755 --- a/src/versions/solarfm-0.0.1/SolarFM/solarfm.sh +++ b/src/versions/solarfm-0.0.1/SolarFM/create-standalone.sh @@ -8,11 +8,10 @@ function main() { - SCRIPTPATH="$( cd "$(dirname "")" >/dev/null 2>&1 ; pwd -P )" - cd "${SCRIPTPATH}" + cd "$(dirname "")" echo "Working Dir: " $(pwd) - source "/home/abaddon/Portable_Apps/py-venvs/flask-apps-venv/venv/bin/activate" - python ./solarfm + source "/home/abaddon/Portable_Apps/py-venvs/gtk-apps-venv/venv/bin/activate" + python -m nuitka --follow-imports --standalone --linux-onefile-icon="/home/abaddon/.config/solarfm/solarfm.png" solarfm/__main__.py } main "$@"; diff --git a/src/versions/solarfm-0.0.1/SolarFM/solarfm/core/controller_data.py b/src/versions/solarfm-0.0.1/SolarFM/solarfm/core/controller_data.py index 6a787f4..4a5e5f8 100644 --- a/src/versions/solarfm-0.0.1/SolarFM/solarfm/core/controller_data.py +++ b/src/versions/solarfm-0.0.1/SolarFM/solarfm/core/controller_data.py @@ -120,7 +120,7 @@ class Controller_Data: self.warning_color = self.settings.get_warning_color() self.error_color = self.settings.get_error_color() - sys.excepthook = self.custom_except_hook + # sys.excepthook = self.custom_except_hook self.window.connect("delete-event", self.tear_down) GLib.unix_signal_add(GLib.PRIORITY_DEFAULT, signal.SIGINT, self.tear_down)