mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-06-07 19:01:54 -07:00
Add support for first xfw boot slideshow
This commit is contained in:
@@ -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),
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user