From cb4d3fe159e5b3511622b95c826341c7d1828a20 Mon Sep 17 00:00:00 2001 From: JezerM Date: Wed, 17 Nov 2021 13:12:39 -0600 Subject: [PATCH 1/2] Possible bugfix --- web-greeter/browser/browser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web-greeter/browser/browser.py b/web-greeter/browser/browser.py index 88388b4..f148bd1 100644 --- a/web-greeter/browser/browser.py +++ b/web-greeter/browser/browser.py @@ -247,14 +247,14 @@ class Browser(Application): self.show() def load(self): - self.load_script(':/_greeter/js/bundle.js', 'Web Greeter Bundle') - self.load_theme() self.greeter = Greeter() self.greeter_config = Config() self.theme_utils = ThemeUtils(self.greeter) self.bridge_objects = (self.greeter, self.greeter_config, self.theme_utils) self.initialize_bridge_objects() + self.load_script(':/_greeter/js/bundle.js', 'Web Greeter Bundle') + self.load_theme() def _initialize_devtools(self): self.dev_view = QWebEngineView(parent=self.window) From 27629754ad210420788f101479ae8dbf978a6231 Mon Sep 17 00:00:00 2001 From: JezerM Date: Thu, 18 Nov 2021 22:29:03 -0600 Subject: [PATCH 2/2] README updated. Some bugfixes. --- README.md | 15 ++++++++------- build/utils.sh | 51 ++++++++++++++++++++++++++++---------------------- 2 files changed, 37 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 297cd8d..9331223 100644 --- a/README.md +++ b/README.md @@ -22,12 +22,13 @@ Gruvbox and Dracula themes! - Tab completion for zsh and bash. ## Dependencies -| | arch | ubuntu | fedora | openSUSE | -|-----------------------|---------------|----------------------|---------------------|-----------------------| -|**liblightdm-gobject** |lightdm |liblightdm-gobject-dev|lightdm-gobject-devel|liblightdm-gobject-1-0 | -|**pygobject** |python-gobject |python3-gi |pygobject3 |python3-gobject | -|**pyqt5** |python-pyqt5 |python3-pyqt5 |python3-qt5 |python3-qt5 | -|**qt5-webengine** |qt5-webengine |libqt5webengine5 |qt5-qtwebengine |libqt5-qtwebengine | +| | arch | ubuntu | fedora | openSUSE | +|--------------------------|---------------------|----------------------|---------------------|----------------------| +|**liblightdm-gobject** |lightdm |liblightdm-gobject-dev|lightdm-gobject-devel|liblightdm-gobject-1-0| +|**pygobject** |python-gobject |python3-gi |pygobject3 |python3-gobject | +|**pyqt5** |python-pyqt5 |python3-pyqt5 |python3-qt5 |python3-qt5 | +|**qt5-webengine** |qt5-webengine |libqt5webengine5 |qt5-qtwebengine |libqt5-qtwebengine | +|**gobject-introspection** |gobject-introspection|gobject-introspection |gobject-introspection|gobject-introspection | ### PIP - PyGObject @@ -52,7 +53,7 @@ sudo pip install -r requirements.txt sudo make install ``` -Whis will build and install **web-greeter** in a zippy way, which compresses the python code as a zip and uses it as a binary. Either `sudo make install_freeze` to build and install with cx_freeze. The zippy method depends on the actual python interpreter and its libraries, so you could have problems when updating python or removing any dependency, while the cx_freeze method tries to fix this "problem". +This will build and install **web-greeter** in a zippy way, which compresses the python code as a zip and uses it as a binary. Either `sudo make install_freeze` to build and install with cx_freeze. The zippy method depends on the actual python interpreter and its libraries, so you could have problems when updating python or removing any dependency, while the cx_freeze method tries to fix this "problem". See [latest release][releases]. diff --git a/build/utils.sh b/build/utils.sh index 9be7517..da46651 100755 --- a/build/utils.sh +++ b/build/utils.sh @@ -51,7 +51,11 @@ do_build_freeze() { do_install() { [[ -e "${DESTDIR}" ]] || mkdir -p "${DESTDIR}" cp -R "${INSTALL_ROOT}"/* "${DESTDIR}" - [[ -e "${DESTDIR}"/opt/web-greeter ]] && ln -sf "${DESTDIR}"/opt/web-greeter/web-greeter ${DESTDIR}${PREFIX}/bin/web-greeter + if [[ -e "${DESTDIR}"/opt/web-greeter ]]; then + opt_web=$(echo "${DESTDIR}"/opt/web-greeter/web-greeter | sed -E 's/\/\//\//g') + dest_bin=$(echo "${DESTDIR}"/"${PREFIX}"/bin/web-greeter | sed -E 's/\/\//\//g') + ln -sf "${opt_web}" "${dest_bin}" + fi } init_build_dir() { @@ -64,37 +68,39 @@ init_build_dir() { prepare_install() { cd "${BUILD_DIR}" + INSTALL_PREFIX=$(echo ${INSTALL_ROOT}/${PREFIX} | sed -E 's/\/\//\//g') mkdir -p \ - "${INSTALL_ROOT}${PREFIX}"/share/{man/man1,metainfo,web-greeter,xgreeters,applications,zsh/vendor-completions,bash-completion/completions} \ - "${INSTALL_ROOT}"/etc/{lightdm,xdg/lightdm/lightdm.conf.d} + "${INSTALL_PREFIX}"/share/{man/man1,metainfo,web-greeter,xgreeters,applications,zsh/vendor-completions,bash-completion/completions} \ + "${INSTALL_ROOT}"/etc/{lightdm,xdg/lightdm/lightdm.conf.d} \ + "${INSTALL_PREFIX}"/bin # Themes - (cp -R "${REPO_DIR}/themes" "${INSTALL_ROOT}${PREFIX}/share/web-greeter" \ - && cd "${INSTALL_ROOT}${PREFIX}/share/web-greeter" \ + (cp -R "${REPO_DIR}/themes" "${INSTALL_PREFIX}/share/web-greeter" \ + && cd "${INSTALL_PREFIX}/share/web-greeter" \ && mv themes/_vendor .) # Man Page - cp "${BUILD_DIR}/dist/${PKGNAME}.1" "${INSTALL_ROOT}${PREFIX}/share/man/man1" + cp "${BUILD_DIR}/dist/${PKGNAME}.1" "${INSTALL_PREFIX}/share/man/man1" # Command line completions if [[ -f /usr/bin/bash ]]; then - cp "${BUILD_DIR}/dist/${PKGNAME}-bash" "${INSTALL_ROOT}${PREFIX}/share/bash-completion/completions/${PKGNAME}" + cp "${BUILD_DIR}/dist/${PKGNAME}-bash" "${INSTALL_PREFIX}/share/bash-completion/completions/${PKGNAME}" fi if [[ -f /usr/bin/zsh ]]; then - cp "${BUILD_DIR}/dist/${PKGNAME}-zsh" "${INSTALL_ROOT}${PREFIX}/share/zsh/vendor-completions/_${PKGNAME}" + cp "${BUILD_DIR}/dist/${PKGNAME}-zsh" "${INSTALL_PREFIX}/share/zsh/vendor-completions/_${PKGNAME}" fi # Greeter Config cp "${BUILD_DIR}/dist/${PKGNAME}.yml" "${INSTALL_ROOT}/etc/lightdm" # AppData File - cp "${BUILD_DIR}/dist/${PKGNAME}.appdata.xml" "${INSTALL_ROOT}${PREFIX}/share/metainfo" + cp "${BUILD_DIR}/dist/${PKGNAME}.appdata.xml" "${INSTALL_PREFIX}/share/metainfo" # Greeter desktop File - cp "${BUILD_DIR}/dist/web-xgreeter.desktop" "${INSTALL_ROOT}${PREFIX}/share/xgreeters/web-greeter.desktop" + cp "${BUILD_DIR}/dist/web-xgreeter.desktop" "${INSTALL_PREFIX}/share/xgreeters/web-greeter.desktop" # Application desktop File - cp "${BUILD_DIR}/dist/web-greeter.desktop" "${INSTALL_ROOT}${PREFIX}/share/applications/web-greeter.desktop" + cp "${BUILD_DIR}/dist/web-greeter.desktop" "${INSTALL_PREFIX}/share/applications/web-greeter.desktop" # Xgreeter wrapper cp "${BUILD_DIR}/dist/90-greeter-wrapper.conf" \ @@ -104,7 +110,7 @@ prepare_install() { # Don't install hidden files find "${INSTALL_ROOT}" -type f -name '.git*' -delete - rm -rf "${INSTALL_ROOT}/usr/share/web-greeter/themes/default/.tx" + rm -rf "${INSTALL_PREFIX}/share/web-greeter/themes/default/.tx" if [[ "${DESTDIR}" != '/' ]]; then # Save a list of installed files for uninstall command @@ -114,7 +120,7 @@ prepare_install() { do [[ -d "${_file}" && *'/web-greeter/'* != "${_file}" ]] && continue - echo "${_file##*/install_root}" >> "${INSTALL_ROOT}${PREFIX}/share/web-greeter/.installed_files" + echo "${_file##*/install_root}" >> "${INSTALL_PREFIX}/share/web-greeter/.installed_files" done < /tmp/.installed_files @@ -124,41 +130,42 @@ prepare_install() { do_uninstall() { # Man Page - rm -f ${DESTDIR}${PREFIX}/share/man/man1/web-greeter.1 + DESTDIR_PREFIX=$(echo ${DESTDIR}/${PREFIX} | sed -E 's/\/\//\//g') + rm -f ${DESTDIR_PREFIX}/share/man/man1/web-greeter.1 # Command line completions if [[ -f /usr/bin/bash ]]; then - rm -f ${DESTDIR}${PREFIX}/share/bash-completion/completions/${PKGNAME} + rm -f ${DESTDIR_PREFIX}/share/bash-completion/completions/${PKGNAME} fi if [[ -f /usr/bin/zsh ]]; then - rm -f ${DESTDIR}${PREFIX}/share/zsh/vendor-completions/_${PKGNAME} + rm -f ${DESTDIR_PREFIX}/share/zsh/vendor-completions/_${PKGNAME} fi # Greeter Config #rm ${DESTDIR}/etc/lightdm/${PKGNAME}.yml # Themes - #rm -rf ${DESTDIR}${PREFIX}/share/web-greeter + #rm -rf ${DESTDIR_PREFIX}/share/web-greeter # AppData File - rm -f ${DESTDIR}${PREFIX}/share/metainfo/${PKGNAME}.appdata.xml + rm -f ${DESTDIR_PREFIX}/share/metainfo/${PKGNAME}.appdata.xml # Greeter desktop file - rm -f ${DESTDIR}${PREFIX}/share/xgreeters/web-greeter.desktop + rm -f ${DESTDIR_PREFIX}/share/xgreeters/web-greeter.desktop # Application desktop file - rm -f ${DESTDIR}${PREFIX}/share/applications/web-greeter.desktop + rm -f ${DESTDIR_PREFIX}/share/applications/web-greeter.desktop # XGreeter wrapper rm -f ${DESTDIR}/etc/xdg/lightdm/lightdm.conf.d/90-greeter-wrapper.conf rm -f ${DESTDIR}/etc/lightdm/Xgreeter # Binary - rm -f ${DESTDIR}${PREFIX}/bin/web-greeter + rm -f ${DESTDIR_PREFIX}/bin/web-greeter [[ -e "${DESTDIR}"/opt/web-greeter ]] && rm -rf ${DESTDIR}/opt/web-greeter echo "Themes are not uninstalled. Remove them manually: - ${DESTDIR}${PREFIX}/share/web-greeter/" + ${DESTDIR_PREFIX}/share/web-greeter/" echo "web-greeter config was not uninstalled. Remove it manually: ${DESTDIR}/etc/lightdm/${PKGNAME}.yml" }