theme: move TW_THEME_VERSION to variables.h
Automatically add the current theme version to the splash and ui xmls during the build Change-Id: I52f8cb41fabe34a8849ecc54ece3c0fb645dcd74
This commit is contained in:
@@ -560,6 +560,12 @@ endif
|
||||
|
||||
LOCAL_REQUIRED_MODULES += $(TWRP_REQUIRED_MODULES)
|
||||
|
||||
TW_THEME_VERSION := $(shell echo "`grep TW_THEME_VERSION bootable/recovery/variables.h | cut -d ' ' -f 3`")
|
||||
|
||||
LOCAL_POST_INSTALL_CMD += \
|
||||
sed -i "s/{themeversion}/$(TW_THEME_VERSION)/" $(TARGET_RECOVERY_ROOT_OUT)/twres/splash.xml; \
|
||||
sed -i "s/{themeversion}/$(TW_THEME_VERSION)/" $(TARGET_RECOVERY_ROOT_OUT)/twres/ui.xml;
|
||||
|
||||
include $(BUILD_EXECUTABLE)
|
||||
|
||||
# Symlink for file_contexts
|
||||
|
||||
+1
-3
@@ -53,9 +53,7 @@ extern "C" {
|
||||
#include "objects.hpp"
|
||||
#include "blanktimer.hpp"
|
||||
|
||||
// version 2 requires theme to handle power button as action togglebacklight
|
||||
// version 4 adds fastbootd support
|
||||
#define TW_THEME_VERSION 4
|
||||
#include "../variables.h"
|
||||
|
||||
#define TW_THEME_VER_ERR -2
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<author>TeamWin</author>
|
||||
<title>TWRP</title>
|
||||
<description>splash screen</description>
|
||||
<themeversion>4</themeversion>
|
||||
<themeversion>{themeversion}</themeversion>
|
||||
</details>
|
||||
|
||||
<resources>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<title>Backup Naowz</title>
|
||||
<description>Default basic theme</description>
|
||||
<preview>preview.png</preview>
|
||||
<themeversion>4</themeversion>
|
||||
<themeversion>{themeversion}</themeversion>
|
||||
</details>
|
||||
|
||||
<include>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<author>TeamWin</author>
|
||||
<title>TWRP</title>
|
||||
<description>splash screen</description>
|
||||
<themeversion>4</themeversion>
|
||||
<themeversion>{themeversion}</themeversion>
|
||||
</details>
|
||||
|
||||
<resources>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<title>Backup Naowz</title>
|
||||
<description>Default basic theme</description>
|
||||
<preview>preview.png</preview>
|
||||
<themeversion>4</themeversion>
|
||||
<themeversion>{themeversion}</themeversion>
|
||||
</details>
|
||||
|
||||
<include>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<author>TeamWin</author>
|
||||
<title>TWRP</title>
|
||||
<description>splash screen</description>
|
||||
<themeversion>4</themeversion>
|
||||
<themeversion>{themeversion}</themeversion>
|
||||
</details>
|
||||
|
||||
<resources>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<title>Backup Naowz</title>
|
||||
<description>Default basic theme</description>
|
||||
<preview>preview.png</preview>
|
||||
<themeversion>4</themeversion>
|
||||
<themeversion>{themeversion}</themeversion>
|
||||
</details>
|
||||
|
||||
<include>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<author>TeamWin</author>
|
||||
<title>TWRP</title>
|
||||
<description>splash screen</description>
|
||||
<themeversion>4</themeversion>
|
||||
<themeversion>{themeversion}</themeversion>
|
||||
</details>
|
||||
|
||||
<resources>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<title>Backup Naowz</title>
|
||||
<description>Default basic theme</description>
|
||||
<preview>preview.png</preview>
|
||||
<themeversion>4</themeversion>
|
||||
<themeversion>{themeversion}</themeversion>
|
||||
</details>
|
||||
|
||||
<include>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<author>TeamWin</author>
|
||||
<title>TWRP</title>
|
||||
<description>splash screen</description>
|
||||
<themeversion>3</themeversion>
|
||||
<themeversion>{themeversion}</themeversion>
|
||||
</details>
|
||||
|
||||
<resources>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<title>Backup Naowz</title>
|
||||
<description>Default basic theme</description>
|
||||
<preview>preview.png</preview>
|
||||
<themeversion>4</themeversion>
|
||||
<themeversion>{themeversion}</themeversion>
|
||||
</details>
|
||||
|
||||
<include>
|
||||
|
||||
@@ -149,6 +149,12 @@
|
||||
#define TW_IS_SUPER "tw_is_super"
|
||||
#define TW_AUTO_REFLASHTWRP_VAR "tw_auto_reflashtwrp"
|
||||
|
||||
// Theme versioning
|
||||
// version 2 requires theme to handle power button as action togglebacklight
|
||||
// version 4 adds listbox support to reboot page
|
||||
// version 5 adds File Manager options, nano & Flash Current TWRP
|
||||
#define TW_THEME_VERSION 5
|
||||
|
||||
// Also used:
|
||||
// tw_boot_is_mountable
|
||||
// tw_system_is_mountable
|
||||
|
||||
Reference in New Issue
Block a user