Use dates in Contents to be able to cache folders in server
Use-cases to test that I think of:
-
first run
(no gcompris-qt.conf and no ~/.cache/KDE/gcompris-qt/ folders)
-
accept -> voices + background music + wordset (there is actually a bug with wordset not being loaded at first run) -
refuse -> nothing downloaded. Either check or uncheck automatic downloads
-
second run with refused at first run and automatic downloads
(gcompris-qt.conf and no ~/.cache/KDE/gcompris-qt/ folders)
-
will download voices + background music + wordset
-
second run with refused at first run and no automatic downloads
(gcompris-qt.conf and no ~/.cache/KDE/gcompris-qt/ folders)
-
will not download voices + background music + wordset
Use-cases with full rcc :
-
first run and full.rcc exists
(gcompris-qt.conf does not exist)
-
if answer no to download, don't download anything and use full.rcc -
if answer yes to download, download and use separate rcc files, and keep full.rcc as fallback
-
second run and full.rcc exists and automatic
(gcompris-qt.conf does exist)
-
download/update separate voices + background music + wordset / voices and wordset present
- No network:
-
Manually adding rcc/Contents files without network at all.
- first run with separate rcc files already installed (in user or system path):
-
It should show the dialog asking if user wants to automatically download/update files (of course only if WITH_DOWNLOAD=ON). Now it doesn't show the dialog and defaults to automatic downloads.
- RCC files installed in system path:
-
Use rcc files in system path if they exist (all same behaviour as rcc files in user path, except don't try to delete them when downloading new ones). -
If newer files exist on the server, download them in user path and use them instead of system files.
-
WITH_DOWNLOAD
flag:
-
Adding rcc/contents in system path (for embedded apk, and some linux distros packaging it, on linux the path would be /usr/share/KDE/gcompris-qt/data3/). And with or without the WITH_DOWNLOAD build flag: with WITH_DOWNLOAD=OFF use the system rcc files and all download features are disabled; with WITH_DOWNLOAD=ON check if newer files exist on the server and install them in ~/.cache/KDE/gcompris-qt/data3/ if automatic download is activated or when pressing the button to check for updates, else use system rcc files if they are up-to-date.
- Misc:
-
Make sure that the build flag DOWNLOAD_ASSETS still works as it should (used in android_build_embedded_apk.sh for example). -
Need to check if we clean the previous rcc and if we do, how
Edited by Timothée Giet