Skip to content
This repository was archived by the owner on Sep 26, 2024. It is now read-only.

Commit 7fb6339

Browse files
authored
Merge pull request #168 from thw26/todos
Minor fixes and resolve installer TODOs.
2 parents 7cca5a7 + bf8d462 commit 7fb6339

File tree

3 files changed

+46
-30
lines changed

3 files changed

+46
-30
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
# Changelog
2+
* 3.7.1
3+
- Add installer `-V|--verbose`. Fix #165. [T. H. Wright]
4+
- Add installer `-k|--make_skel` and `-b|--custom-binary-path`. Resolve TODOs. Fix #166. [T. H. Wright]
5+
- Disable wine 8.0 installs. Fix #148. [T. H. Wright]
26
* 3.7.0
37
- Decoupled script from `zenity` and compatible with `dialog` and `whiptail`. Fix #104. [T. H. Wright]
48
- Make bash path environment agnostic [Vskillet]
59
- Add bash completion file [T. H. Wright]
610
- Fix controlPanel's `--winetricks` function [T. H. Wright]
711
- Fix installer's `-c|--config` function [T. H. Wright]
12+
- Fix launcher's `-s|--short` function [T. H. Wright]
813
* 3.6.3-1
914
- Introduce logos_info() and logos_warn() to simplify script feedback. [T. H. Wright]
1015
* 3.6.2

LogosLinuxInstaller.sh

+35-28
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,21 @@ Installs ${FLPRODUCT} Bible Software with Wine on Linux.
4545
Options:
4646
-h --help Prints this help message and exit.
4747
-v --version Prints version information and exit.
48+
-V --verbose Enable extra CLI verbosity.
4849
-D --debug Makes Wine print out additional info.
4950
-c --config Use the Logos on Linux config file when
5051
setting environment variables. Defaults to:
5152
\$HOME/.config/Logos_on_Linux/Logos_on_Linux.conf
5253
Optionally can accept a config file provided by
5354
the user.
55+
-b --custom-binary-path Set a custom path to search for wine binaries
56+
during the install.
5457
-r --regenerate-scripts Regenerates the Logos.sh and controlPanel.sh
5558
scripts using the config file.
5659
-F --skip-fonts Skips installing corefonts and tahoma.
5760
-f --force-root Sets LOGOS_FORCE_ROOT to true, which permits
5861
the root user to run the script.
62+
-k --make-skel Make a skeleton install only.
5963
EOF
6064
}
6165

@@ -65,17 +69,13 @@ die-if-root() {
6569
fi
6670
}
6771

68-
verbose() {
69-
[[ $VERBOSE = true ]] && return 0 || return 1
70-
}
72+
verbose() { [[ $VERBOSE = true ]] && return 0 || return 1; };
7173

72-
debug() {
73-
[[ $DEBUG = true ]] && return 0 || return 1
74-
}
74+
debug() { [[ $DEBUG = true ]] && return 0 || return 1; };
7575

7676
die() { echo >&2 "$*"; exit 1; };
7777

78-
t(){ type "$1"&>/dev/null;}
78+
t(){ type "$1"&>/dev/null; };
7979

8080
# Sources:
8181
# https://askubuntu.com/a/1021548/680649
@@ -449,20 +449,6 @@ make_skel() {
449449
verbose && echo "skel64 done!"
450450
}
451451

452-
# TODO: Move this to a CLI optarg.
453-
454-
# #======= Parsing =============
455-
# case "${1}" in
456-
# "skel64")
457-
# export WINE_EXE="wine64"
458-
# make_skel "${WINE_EXE}" "none.AppImage"
459-
# rm -rf "${WORKDIR}"
460-
# exit 0
461-
# ;;
462-
# *)
463-
# verbose && echo "No arguments parsed."
464-
# esac
465-
466452
## BEGIN CHECK DEPENDENCIES FUNCTIONS
467453
check_commands() {
468454
for cmd in "$@"; do
@@ -618,7 +604,9 @@ wineBinaryVersionCheck() {
618604
if [ -x "${TESTBINARY}" ]; then
619605
TESTWINEVERSION=$("$TESTBINARY" --version | awk -F' ' '{print $1}' | awk -F'-' '{print $2}' | awk -F'.' '{print $1"."$2}');
620606
if (( $(echo "$TESTWINEVERSION >= $WINE_MINIMUM" | bc -l) )); then
621-
return 0;
607+
if (( $(echo "$TESTWINEVERSION != 8.0" | bc -l) )); then
608+
return 0;
609+
fi
622610
elif [[ ${TESTBINARY} =~ .*"Proton - Experimental".* ]]; then
623611
return 0;
624612
# If it is a symlink, check its actual path. If it is Proton, let it pass.
@@ -645,7 +633,7 @@ checkPath() {
645633

646634
createWineBinaryList() {
647635
#TODO: Make optarg to add custom path to this array.
648-
WINEBIN_PATH_ARRAY=( "/usr/local/bin" "$HOME/bin" "$HOME/PlayOnLinux/wine/linux-amd64/*/bin" "$HOME/.steam/steam/steamapps/common/Proton - Experimental/files/bin" )
636+
WINEBIN_PATH_ARRAY=( "/usr/local/bin" "$HOME/bin" "$HOME/PlayOnLinux/wine/linux-amd64/*/bin" "$HOME/.steam/steam/steamapps/common/Proton - Experimental/files/bin" "${CUSTOMBINPATH}" )
649637

650638
# Temporarily modify PATH for additional WINE64 binaries.
651639
for p in "${WINEBIN_PATH_ARRAY[@]}"; do
@@ -797,6 +785,11 @@ checkExistingInstall() {
797785
}
798786

799787
beginInstall() {
788+
if [ "${SKEL}" -eq "1" ]; then
789+
verbose && echo "Making a skeleton install of the project only. Exiting after completion."
790+
make_skel "none.AppImage"
791+
exit 0;
792+
fi
800793
if [ -n "${WINEBIN_CODE}" ]; then
801794
case "${WINEBIN_CODE}" in
802795
"System"|"Proton"|"PlayOnLinux"|"Custom")
@@ -1217,8 +1210,6 @@ postInstall() {
12171210

12181211
main() {
12191212
echo "$LOGOS_SCRIPT_TITLE, $LOGOS_SCRIPT_VERSION by $LOGOS_SCRIPT_AUTHOR."
1220-
die-if-root;
1221-
getDialog;
12221213
debug && logos_info "Debug mode enabled."
12231214

12241215
# BEGIN PREPARATION
@@ -1253,6 +1244,11 @@ main() {
12531244
fi
12541245
}
12551246

1247+
# BEGIN SCRIPT
1248+
1249+
die-if-root;
1250+
getDialog;
1251+
12561252
# BEGIN OPTARGS
12571253
RESET_OPTARGS=true
12581254
for arg in "$@"
@@ -1263,16 +1259,19 @@ do
12631259
fi
12641260
case "$arg" in # Relate long options to short options
12651261
--help) set -- "$@" -h ;;
1266-
--version) set -- "$@" -V ;;
1262+
--version) set -- "$@" -v ;;
1263+
--verbose) set -- "$@" -V ;;
12671264
--config) set -- "$@" -c ;;
12681265
--skip-fonts) set -- "$@" -F ;;
12691266
--regenerate-scripts) set -- "$@" -r ;;
12701267
--force-root) set -- "$@" -f ;;
12711268
--debug) set -- "$@" -D ;;
1269+
--make-skel) set -- "$@" -k ;;
1270+
--custom-binary-path) set -- "$@" -b ;;
12721271
*) set -- "$@" "$arg" ;;
12731272
esac
12741273
done
1275-
OPTSTRING=':hvcDfFr' # Available options
1274+
OPTSTRING=':hvVcDfFrkb:' # Available options
12761275

12771276
# First loop: set variable options which may affect other options
12781277
while getopts "$OPTSTRING" opt; do
@@ -1304,11 +1303,19 @@ while getopts "$OPTSTRING" opt; do
13041303
logos_info "No config file found."
13051304
fi
13061305
;;
1306+
V) export VERBOSE="true" ;;
13071307
F) export SKIP_FONTS="1" ;;
13081308
f) export LOGOS_FORCE_ROOT="1"; ;;
13091309
r) export REGENERATE="1"; ;;
1310-
D) export DEBUG=true;
1310+
D) export DEBUG="true";
13111311
WINEDEBUG=""; ;;
1312+
k) export SKEL="1"; ;;
1313+
b) CUSTOMBINPATH="$2";
1314+
if [ -d "$CUSTOMBINPATH" ]; then
1315+
export CUSTOMBINPATH;
1316+
else
1317+
logos_info "$LOGOS_SCRIPT_TITLE: User supplied path: \"${OPTARG}\". Custom binary path does not exist." >&2 && usage >&2 && exit
1318+
fi; shift 2 ;;
13121319
\?) logos_info "$LOGOS_SCRIPT_TITLE: -$OPTARG: undefined option." >&2 && usage >&2 && exit ;;
13131320
:) logos_info "$LOGOS_SCRIPT_TITLE: -$OPTARG: missing argument." >&2 && usage >&2 && exit ;;
13141321
esac

README.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,26 @@ This repository contains a set of bash scripts for installing Logos Bible (Verbu
1111

1212
```
1313
Usage: ./LogosLinuxInstaller.sh
14-
Installs Bible Software with Wine on Linux.
14+
Installs ${FLPRODUCT} Bible Software with Wine on Linux.
1515
1616
Options:
1717
-h --help Prints this help message and exit.
1818
-v --version Prints version information and exit.
19+
-V --verbose Enable extra CLI verbosity.
1920
-D --debug Makes Wine print out additional info.
2021
-c --config Use the Logos on Linux config file when
2122
setting environment variables. Defaults to:
22-
$HOME/.config/Logos_on_Linux/Logos_on_Linux.conf
23+
\$HOME/.config/Logos_on_Linux/Logos_on_Linux.conf
2324
Optionally can accept a config file provided by
2425
the user.
26+
-b --custom-binary-path Set a custom path to search for wine binaries
27+
during the install.
2528
-r --regenerate-scripts Regenerates the Logos.sh and controlPanel.sh
2629
scripts using the config file.
2730
-F --skip-fonts Skips installing corefonts and tahoma.
2831
-f --force-root Sets LOGOS_FORCE_ROOT to true, which permits
2932
the root user to run the script.
33+
-k --make-skel Make a skeleton install only.
3034
```
3135

3236
## Logos.sh

0 commit comments

Comments
 (0)