Add support for first xfw boot slideshow

This commit is contained in:
Willy-JL
2023-03-25 22:30:50 +00:00
parent 5facf6dc89
commit 921143fa7b
3 changed files with 20 additions and 1 deletions
+3
View File
@@ -55,6 +55,9 @@ void XTREME_SETTINGS_LOAD() {
xtreme_settings->bad_bt_remember = false; // OFF
xtreme_settings->butthurt_timer = 43200; // 12 H
xtreme_settings->rgb_backlight = false; // OFF
if(!skip) {
XTREME_SETTINGS_SAVE();
}
}
}
}
@@ -12,6 +12,7 @@
#include <update_util/resources/manifest.h>
#include <toolbox/tar/tar_archive.h>
#include <toolbox/crc32_calc.h>
#include <xtreme/settings.h>
#define TAG "UpdWorkerBackup"
@@ -197,7 +198,15 @@ static bool update_task_post_update(UpdateTask* update_task) {
update_task_set_progress(update_task, UpdateTaskStageSplashscreenInstall, 0);
FuriString* tmp_path;
tmp_path = furi_string_alloc_set(update_task->update_path);
path_append(tmp_path, furi_string_get_cstr(update_task->manifest->splash_file));
if(storage_common_stat(update_task->storage, XTREME_SETTINGS_PATH, NULL) == FSE_NOT_EXIST) {
path_append(tmp_path, "xfwfirstboot.bin");
if(storage_common_stat(update_task->storage, furi_string_get_cstr(tmp_path), NULL) != FSE_OK) {
furi_string_set(tmp_path, update_task->update_path);
path_append(tmp_path, furi_string_get_cstr(update_task->manifest->splash_file));
}
} else {
path_append(tmp_path, furi_string_get_cstr(update_task->manifest->splash_file));
}
if(storage_common_copy(
update_task->storage,
furi_string_get_cstr(tmp_path),
+7
View File
@@ -10,6 +10,7 @@ import shutil
import zlib
import tarfile
import math
import pathlib
from slideshow import Main as SlideshowMain
@@ -137,6 +138,12 @@ class Main(App):
return 2
if self.args.splash:
SlideshowMain(no_exit=True)([
"-i",
str(pathlib.Path(self.args.splash).parent / "xfwfirstboot"),
"-o",
join(self.args.directory, "xfwfirstboot.bin"),
])
splash_args = [
"-i",
self.args.splash,