-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
meta-opentrons: add plymouth for boot splash
Adds - plymouth - a theme for plymouth that shows a simple image
- Loading branch information
Showing
5 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
layers/meta-opentrons/recipes-core/plymouth/files/logo-splash.plymouth
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[Plymouth Theme] | ||
Name=Opentrons Boot Splash | ||
Description=Display a static image as a boot splash | ||
ModuleName=script | ||
|
||
[script] | ||
ImageDir=/usr/share/plymouth/themes/logo-splash | ||
ScriptFile=/usr/share/plymouth/themes/logo-splash/logo-splash.script |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions
15
layers/meta-opentrons/recipes-core/plymouth/files/logo-splash.script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
image = Image("logo-splash.png"); | ||
|
||
pos_x = Window.GetWidth()/2 - image.GetWidth()/2; | ||
pos_y = Window.GetHeight()/2 - image.GetHeight()/2; | ||
|
||
sprite = Sprite(image); | ||
sprite.SetX(pos_x); | ||
sprite.SetY(pos_y); | ||
|
||
fun refresh_callback () { | ||
sprite.SetOpacity(1); | ||
spr.SetZ(15); | ||
} | ||
|
||
Plymouth.SetRefreshFunction (refresh_callback); |
22 changes: 22 additions & 0 deletions
22
layers/meta-opentrons/recipes-core/plymouth/plymouth_%.bbappend
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
|
||
SRC_URI += " \ | ||
file://logo-splash.png \ | ||
file://logo-splash.plymouth \ | ||
" | ||
|
||
PACKAGECONFIG = "pango drm" | ||
|
||
EXTRA_OECONF += "--with-udev --with-runtimedir=/run" | ||
|
||
do_install:append () { | ||
install -d 0644 ${D}${datadir}/plymouth/themes/logo-splash | ||
install -m 0644 ${WORKDIR}/torizonlogo-white.png ${D}${datadir}/plymouth/themes/logo-splash/logo-splash.png | ||
install -m 0644 ${WORKDIR}/logo-splash.plymouth ${D}${datadir}/plymouth/themes/logo-splash/logo-splash.plymouth | ||
} | ||
|
||
FILES:${PN}:append := "\ | ||
${datadir}/plymouth/themes/logo-splash \ | ||
${datadir}/plymouth/themes/logo-splash/logo-splash.png \ | ||
${datadir}/plymouth/themes/logo-splash/logo-splash.script \ | ||
" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters