Skip to content

Commit

Permalink
Enable different plugins for Endless Key
Browse files Browse the repository at this point in the history
The Endless Key app needs a different set of plugins than traditional
Kolibri.

#117
  • Loading branch information
jprvita committed Sep 14, 2023
1 parent c054539 commit 4224875
Showing 1 changed file with 34 additions and 5 deletions.
39 changes: 34 additions & 5 deletions hooks/image/60-kolibri-content
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,43 @@ prepare_kolibri_env()
source ${venv_dir}/bin/activate

pip install kolibri==${EIB_KOLIBRI_APP_VERSION}
pip install kolibri-app-desktop-xdg-plugin==${EIB_KOLIBRI_APP_DESKTOP_XDG_PLUGIN_VERSION}
pip install kolibri-desktop-auth-plugin==${EIB_KOLIBRI_DESKTOP_AUTH_PLUGIN_VERSION}

export KOLIBRI_HOME="${KOLIBRI_CONTENT_DIR}"

kolibri plugin enable kolibri.plugins.app
kolibri plugin enable kolibri_app_desktop_xdg_plugin
kolibri plugin enable kolibri_desktop_auth_plugin
if [ ${app_name} == "kolibri" ]; then
PLUGINS_DISABLE=()
PLUGINS_ENABLE=(
"kolibri.plugins.app"
"kolibri_app_desktop_xdg_plugin"
"kolibri_desktop_auth_plugin"
)
pip install kolibri-app-desktop-xdg-plugin==${EIB_KOLIBRI_APP_DESKTOP_XDG_PLUGIN_VERSION}
pip install kolibri-desktop-auth-plugin==${EIB_KOLIBRI_DESKTOP_AUTH_PLUGIN_VERSION}
elif [ ${app_name} == "endless-key" ]; then
PLUGINS_DISABLE=(
"kolibri.plugins.default_theme"
"kolibri.plugins.learn"
)
PLUGINS_ENABLE=(
"kolibri.plugins.app"
"kolibri_endless_key_theme"
# FIXME: enabling kolibri-explore-plugin fails because we are using a
# kolibri version that is too old.
#"kolibri_explore_plugin"
"kolibri_zim_plugin"
)
pip install kolibri_endless_key_theme
pip install kolibri_explore_plugin
pip install kolibri_zim_plugin
else
exit 1
fi
for plugin in "${PLUGINS_DISABLE[@]}"; do
kolibri plugin disable ${plugin}
done
for plugin in "${PLUGINS_ENABLE[@]}"; do
kolibri plugin enable ${plugin}
done

if [ ${app_name} == "kolibri" ]; then
INSTALL_CHANNELS=("${KOLIBRI_INSTALL_CHANNELS[@]}")
Expand Down

0 comments on commit 4224875

Please sign in to comment.