diff --git a/msys-install.sh b/msys-install.sh index fb551b0..1eb1de2 100755 --- a/msys-install.sh +++ b/msys-install.sh @@ -1,6 +1,11 @@ #!/bin/bash # vim: syn=sh ts=4 sts=4 sw=4 smartindent expandtab ff=unix +: ${INSTALL_PACKAGES:="YES"} + +INSTALL_PACKAGES="$( echo "$INSTALL_PACKAGES" | tr '[:lower:]' '[:upper:]' )" + + SELF="$( realpath "$0" )" PROJECT_DIR="$( dirname "$SELF")" : ${PYTHON_VENV_DIR:=$(cygpath "$USERPROFILE")/python-venv} @@ -8,15 +13,17 @@ venv="${PYTHON_VENV_DIR}/sgbackup" venv_bin="${venv}/bin" wvenv_bin="$(cygpath -w "$venv_bin")" -PACKAGES="gtk4 gobject-introspection python-pip python-gobject python-rapidfuzz" +if [ "$INSTALL_PACKAGES" = "YES" -o "$INSTALL_PACKAGES" = "TRUE" -o "$INSTALL_PACKAGES" = 1 ]; then + PACKAGES="gtk4 gobject-introspection python-pip python-gobject python-rapidfuzz" -_install_pkg="base-devel" -for i in $PACKAGES; do - _install_pkg="${_install_pkg} ${MINGW_PACKAGE_PREFIX}-$i" -done + _install_pkg="base-devel" + for i in $PACKAGES; do + _install_pkg="${_install_pkg} ${MINGW_PACKAGE_PREFIX}-$i" + done -pacman -Sy -pacman -S --noconfirm $_install_pkg + pacman -Sy + pacman -S --noconfirm $_install_pkg +fi if [ ! -f "$venv/bin/activate" ]; then python -m venv --system-site-packages "$venv" diff --git a/sgbackup/game.py b/sgbackup/game.py index e848447..d3507e7 100644 --- a/sgbackup/game.py +++ b/sgbackup/game.py @@ -1197,7 +1197,7 @@ class Game(GObject): return cls( savegame_root=data['savegame_root'], savegame_dir=data['savegame_dir'], - variables=dict(((v['name'],v['value']) for v in data['variables'])) if ('variables' in data and config['variables']) else None, + variables=dict([(v['name'],v['value']) for v in data['variables']]) if ('variables' in data and config['variables']) else None, file_match=file_match if 'file_match' in data else None , ignore_match=ignore_match if 'ignore_match' in data else None, installdir=data['installdir'] if ('installdir' in data and data['installdir']) else None