Skip to content

Commit

Permalink
Version 1.6.5 - Script will check for necessary apps and libs and sug…
Browse files Browse the repository at this point in the history
…gest where to find them if missing. Updated one patch.
  • Loading branch information
kekePower committed Dec 2, 2017
1 parent 1ebbf48 commit ca7cb84
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 74 deletions.
57 changes: 50 additions & 7 deletions build.leia
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/env zsh

SCRIPT_VERSION="1.6.4"
SCRIPT_VERSION="1.6.5"

if [[ ! ${1} == "fix" ]]; then
# A simple check to see if you're already running this script.
Expand Down Expand Up @@ -84,12 +84,6 @@ include themes/${THEME:l}
# Usage: loggy <message>
include common/loggy

if [[ ! -x $( which git ) ]]; then
MSG="${L_130}"
echo "${TIME}[$(date +%T)]${END} ${W}${MSG}${END}"
clean_exit ${0:t}
fi

# We try to find the system language and include it in the script.
# If we don't have the translation for the supplied language, the
# script will ask if the user wants to use en_US for now.
Expand Down Expand Up @@ -118,6 +112,55 @@ else
fi
fi

# This is the pre-check section where we look for necessary binaries
# First off is Git
typeset -a NOT_FOUND
if [[ ! -x $( which git ) ]]; then
git_MSG="${L_130}"
#echo "${TIME}[$(date +%T)]${END} ${W}${MSG}${END}"
git_URL="https://git-scm.org/"
NOT_FOUND=( git )
fi

# In Mageia 6, these two packages are not currently present
# RapidJSON and fmt
# Let's look for them and print out useful information
# Looking for RapidJSON
if [[ ! $( pkg-config --cflags RapidJSON ) ]]; then
rapidjson_MSG="${L_131}"
#echo "${TIME}[$(date +%T)]${END} ${W}${MSG}${END}"
rapidjson_URL="https://github.com/Tencent/rapidjson/releases"
echo "${TIME}[$(date +%T)]${END} ${W}${MSG}${END}"
NOT_FOUND+=( rapidjson )
fi

# Now we look for libfmt in /usr/lib and /usr/local/lib
if [[ ! -a /usr/lib/libfmt.a && ! -a /usr/lib64/libfmt.a && ! -a /usr/local/lib/libfmt.a && ! -a /usr/local/lib64/libfmt.a ]]; then
libfmt_MSG="${L_132}"
#echo "${TIME}[$(date +%T)]${END} ${W}${MSG}${END}"
libfmt_URL="https://github.com/fmtlib/fmt/releases"
#echo "${TIME}[$(date +%T)]${END} ${W}${MSG}${END}"
NOT_FOUND+=( libfmt )
fi

for not_found in ${NOT_FOUND}
do
MSG=""
# MSG="\$${not_found}_MSG"
echo "${TIME}[$(date +%T)]${END} ${WARNING}$( eval echo \$${not_found}_MSG:u )${END}"
MSG="${L_133}${not_found}"
echo "${TIME}[$(date +%T)]${END} ${YELLOW}${MSG}${END}"
URL="$( eval echo \$${not_found}_URL )"
# URL="\$${not_found}_URL"
echo "${TIME}[$(date +%T)]${END} ${W}${ARROW} ${URL}${END}"
done
if [[ ${NOT_FOUND[-1]} ]]; then
clean_exit ${0:t}
fi

#help=Help_${i}
# eval echo \$${help}

# Function: SHOWHELP
# Usage: ShowHelp ${0:t}
function ShowHelp () {
Expand Down
7 changes: 6 additions & 1 deletion include/build.leia/language/en_US.inc
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,9 @@ L_118="Clearing the ccache cache will significantly increase build times."
L_119="It will also make sure you build Kodi with the latest libraries."

L_120="All set. You can launch Kodi with the command"
L_121="You can view the log output in this file"
L_121="You can view the log output in this file"

L_130="git cound not be found."
L_131="RapidJSON could not be found."
L_132="libfmt could not be found."
L_133="Please install "
5 changes: 4 additions & 1 deletion include/build.leia/language/no_NB.inc
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,7 @@ L_119="Det vil også gjøre sitt til at Kodi blir bygget med de siste biblioteke
L_120="Det gikk veldig bra. Du kan starte Kodi med denne kommandoen"
L_121="Du kan se hele loggen i denne filen"

L_130="Du må ha git installert for å bruke dette skriptet."
L_130="git ble ikke funnet."
L_131="RapidJSON ble ikke funnet."
L_132="libfmt ble ikke funnet."
L_133="Vennligst installer "
49 changes: 27 additions & 22 deletions include/patches/add-kekePower-info.patch
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
Index: addons/skin.estuary/xml/SettingsSystemInfo.xml
--- addons/skin.estuary/xml/SettingsSystemInfo.xml
+++ addons/skin.estuary/xml/SettingsSystemInfo.xml (unsaved)
@@ -234,16 +234,26 @@
<font>font12</font>
--- SettingsSystemInfo.xml.orig 2017-11-15 13:59:29.108796515 +0100
+++ addons/skin.estuary/xml/SettingsSystemInfo.xml 2017-11-15 13:57:25.757407395 +0100
@@ -219,6 +219,39 @@
<shadowcolor>black</shadowcolor>
</control>
- <control type="label">
- <description>Vendor text url</description>
</control>
+ <control type="grouplist">
+ <description>Vendor text</description>
+ <itemgap>10</itemgap>
+ <top>170</top>
+ <left>1210</left>
+ <width>800</width>
+ <orientation>horizontal</orientation>
+ <control type="label">
+ <description>Vendor text label</description>
+ <width>auto</width>
+ <height>25</height>
+ <label>Provided by kekePower</label>
+ <font>font25_title</font>
+ <shadowcolor>black</shadowcolor>
+ </control>
+ </control>
+ <control type="grouplist">
+ <description>Vendor url</description>
Expand All @@ -15,23 +27,16 @@ Index: addons/skin.estuary/xml/SettingsSystemInfo.xml
+ <left>1210</left>
+ <width>800</width>
+ <orientation>horizontal</orientation>
+ <control type="label">
+ <description>Vendor url text</description>
<width>auto</width>
<height>25</height>
<label>https://github.com/kekePower/build.leia</label>
<font>font12</font>
- <shadowcolor>black</shadowcolor>
- </control>
- </control>
- </control>
+ <textcolor>button_focus</textcolor>
+ <control type="label">
+ <description>Vendor text url</description>
+ <width>auto</width>
+ <height>25</height>
+ <label>https://github.com/kekePower/build.leia</label>
+ <font>font12</font>
+ <textcolor>yellow</textcolor>
+ <shadowcolor>black</shadowcolor>
+ </control>
+ </control>
+ </control>
+ </control>
</control>
</control>
<control type="group">
<left>0</left>

43 changes: 0 additions & 43 deletions include/patches/diff

This file was deleted.

0 comments on commit ca7cb84

Please sign in to comment.