mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2024-12-18 05:21:47 +03:00
7dff001d75
This ensures graphical progress is shown ASAP when dependencies are equally likely to run. Otherwise, when the graphical step was ready, and switchroot about to run, the shell step could run before the splash. This means that, in practice, a long running task like e2fsck could have prevented the splash to show. It doesn't make sense to make the other tasks depend on a splash task! There is no intention to implement any other special-cased ordering. If there is the need to, it might mean that there is a deficiency in the design.
25 lines
398 B
Ruby
25 lines
398 B
Ruby
# Adds a minimal set of files required for logging-in.
|
|
class Tasks::Splash < Task
|
|
attr_reader :image
|
|
|
|
def initialize(image)
|
|
add_dependency(:Target, :Graphics)
|
|
@image = image
|
|
end
|
|
|
|
def run()
|
|
begin
|
|
System.run("ply-image", "/splash.#{image}.png")
|
|
rescue System::CommandError
|
|
end
|
|
end
|
|
|
|
def name()
|
|
"#{super}(#{image})"
|
|
end
|
|
|
|
def ux_priority()
|
|
-100
|
|
end
|
|
end
|