diff --git a/data/mycroft-gui-core-loader.in b/data/mycroft-gui-core-loader.in old mode 100644 new mode 100755 index 39bb605..811653c --- a/data/mycroft-gui-core-loader.in +++ b/data/mycroft-gui-core-loader.in @@ -1,11 +1,39 @@ -#!/bin/sh +#!/usr/bin/sh -#If startup command is defined use it -if ! test -z "$MYCROFT_START_CMD"; then - $MYCROFT_START_CMD +# Rewritten for RPM installation support on blackPanther OS +# Charles K Barza * info@blakpanther.hu + +if [ "x86_64" = "$(uname -m)" ] ;then + LIB="/usr/lib64" else - # Use default git install location - cd "${MYCROFT_CORE_DIR}" || exit + LIB="/usr/lib" +fi + +if [[ $( pgrep -f "python3 (.*)-m mycroft.*${1}" ) ]] ; then + echo "MyCroft Already running on your system...." + else + if [ -x $LIB/mycroft-core/start-mycroft.sh ] ;then + cd $LIB/mycroft-core || exit + ./start-mycroft.sh all + elif [ -x /usr/share/mycroft-core/start-mycroft.sh ] ;then + cd /usr/share/mycroft-core|| exit ./start-mycroft.sh all + elif [ -x $HOME/mycroft-core/start-mycroft.sh ];then + cd "$HOME/mycroft-core" || exit + ./start-mycroft.sh all + + else + FIND=$(find $HOME -maxdepth 5 -type f -name start-mycroft.sh -print -quit) + if [ -n "$FIND" ];then + SOURCE="${FIND}" + DIR="$( dirname "$SOURCE" )" + echo "Found MyCroft Install Here: $DIR" + cd $DIR || exit + ./start-mycroft.sh all + else + echo "Missing Mycroft installation.... exiting" + fi + fi + fi diff --git a/data/mycroft-gui-core-stop.in b/data/mycroft-gui-core-stop.in old mode 100644 new mode 100755 index 9e078f9..e27cade --- a/data/mycroft-gui-core-stop.in +++ b/data/mycroft-gui-core-stop.in @@ -1,9 +1,40 @@ -#!/bin/sh -#If stop command is defined use it -if ! test -z "$MYCROFT_STOP_CMD"; then - $MYCROFT_STOP_CMD +#!/usr/bin/sh +# Rewritten for RPM installation support on blackPanther OS +# Charles K Barza * info@blakpanther.hu + +if [ "x86_64" = "$(uname -m)" ] ;then + LIB="/usr/lib64" else - # Use default git install - cd "${MYCROFT_CORE_DIR}"|| exit + LIB="/usr/lib" +fi + +if [[ $( pgrep -f "python3 (.*)-m mycroft.*${1}" ) ]] ; then + if [ -x $LIB/mycroft-core/stop-mycroft.sh ] ;then + cd $LIB/mycroft-core || exit + ./stop-mycroft.sh + elif [ -x /usr/share/mycroft-core/stop-mycroft.sh ] ;then + cd /usr/share/mycroft-core|| exit + ./stop-mycroft.sh + elif [ -x $HOME/mycroft-core/stop-mycroft.sh ];then + cd "$HOME/mycroft-core" || exit + ./stop-mycroft.sh + + else + FIND=$(find $HOME -maxdepth 5 -type f -name stop-mycroft.sh -print -quit) + if [ -n "$FIND" ];then + SOURCE="${FIND}" + DIR="$( dirname "$SOURCE" )" + echo "Found MyCroft Install Here: $DIR" + cd $DIR || exit ./stop-mycroft.sh + else + echo "Missing Mycroft installation.... exiting" + fi + fi + + else + + echo "Mycroft not running on your system...." + fi + diff --git a/data/mycroft-gui-ptt-loader.in b/data/mycroft-gui-ptt-loader.in old mode 100644 new mode 100755 index 0c72637..44b174c --- a/data/mycroft-gui-ptt-loader.in +++ b/data/mycroft-gui-ptt-loader.in @@ -1,4 +1,31 @@ -#!/bin/sh +#!/usr/bin/sh + +# Rewritten for RPM installation support on blackPanther OS +# Charles K Barza * info@blakpanther.hu + +if [ "x86_64" = "$(uname -m)" ] ;then + LIB="/usr/lib64" +else + LIB="/usr/lib" +fi + + if [ -x $LIB/mycroft-core/start-mycroft.sh ] ;then + source $LIB/mycroft-core/venv-activate.sh && mycroft_ptt_client + elif [ -x /usr/share/mycroft-core/start-mycroft.sh ] ;then + source /usr/share/mycroft-core/venv-activate.sh && mycroft_ptt_client + elif [ -x $HOME/mycroft-core/start-mycroft.sh ];then + source $HOME/mycroft-core/venv-activate.sh && mycroft_ptt_client + + else + FIND=$(find $HOME -maxdepth 5 -type f -name start-mycroft.sh -print -quit) + if [ -n "$FIND" ];then + SOURCE="${FIND}" + DIR="$( dirname "$SOURCE" )" + echo "Found MyCroft Install Here: $DIR" + source $DIR/venv-activate.sh && mycroft_ptt_client + else + echo "Missing Mycroft installation.... exiting" + fi + fi + -# Use default git install location -source ${MYCROFT_CORE_DIR}/venv-activate.sh && mycroft_ptt_client diff --git a/dev_setup.sh b/dev_setup.sh index 9036d2c..e9c7fb1 100755 --- a/dev_setup.sh +++ b/dev_setup.sh @@ -30,9 +30,10 @@ show_menus() { echo "3. MANJARO/ARCH" echo "4. ALPINE LINUX" echo "5. openSUSE Leap 15.x" - echo "6. OTHERS" - echo "7. UPDATE INSTALLATION" - echo "8. EXIT" + echo "6. blackPanther OS 18.x" + echo "7. OTHERS" + echo "8. UPDATE INSTALLATION" + echo "9. EXIT" } read_options() { @@ -45,9 +46,10 @@ read_options() { 3) manjaro ;; 4) alpine ;; 5) opensuse ;; - 6) others ;; - 7) updateinstall;; - 8) exit 0;; + 6) blackpantheros ;; + 7) others ;; + 8) updateinstall;; + 9) exit 0;; *) echo -e "${RED}Error...${STD}" && sleep 2 esac } @@ -109,6 +111,21 @@ opensuse() { } +blackpantheros() { + echo "Starting Installation For blackPanther OS 18.x" + echo "" + echo "The development headers for the following packages will be installed: cmake extra-cmake-modules kio-devel kio-extras5 plasma-framework libqt5-qtwebsockets libqt5-qtwebview libqt5-qtdeclarative libqt5-qtmultimedia libQt5QuickControls2 libqt5-qtwebengine libqt5-qtbase ki18n kdbusaddons" + echo "" + echo "Please Enter Authentication For Installing System Dependencies" + if [ -x /usr/bin/sudo ];then + sudo installing cmake extra-cmake-modules kio-devel kioarchive-devel plasma-framework-devel qtwebsockets5-devel qt5webview-devel qt5qml-devel qt5multimedia-devel qt5quickcontrols2-devel qt5webengine-devel qtbase5-devel ki18n-devel kdbusaddons-devel + else + # self authenticaion + installing cmake extra-cmake-modules kio-devel kioarchive-devel plasma-framework-devel qtwebsockets5-devel qt5webview-devel qt5qml-devel qt5multimedia-devel qt5quickcontrols2-devel qt5webengine-devel qtbase5-devel ki18n-devel kdbusaddons-devel + fi + build_gui +} + updateinstall() { echo "Pulling Latest Changes From Master" git pull origin master