-
Notifications
You must be signed in to change notification settings - Fork 205
/
diy-O.sh
28 lines (26 loc) · 1.79 KB
/
diy-O.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
#获取目录
CURRENT_DIR=$(cd $(dirname $0); pwd)
num=$(find $CURRENT_DIR -name gradlew | awk -F"/" '{print NF-1}')
DIR=$(find $CURRENT_DIR -name gradlew | cut -d \/ -f$num)
cd $DIR
#名称修改
sed -i 's/TVBox/极影视/g' $CURRENT_DIR/$DIR/app/src/main/res/values/strings.xml
#背景修改
mv $CURRENT_DIR/DIY/app_bg.png $CURRENT_DIR/$DIR/app/src/main/res/drawable/app_bg.pn
#缩略图清晰度修改
sed -i 's/mContext, 400/mContext, 500/g' $CURRENT_DIR/$DIR/app/src/main/java/com/github/tvbox/osc/ui/activity/DetailActivity.java
sed -i 's/mContext, 300/mContext, 400/g' $CURRENT_DIR/$DIR/app/src/main/java/com/github/tvbox/osc/ui/activity/DetailActivity.java
sed -i 's/mContext, 400/mContext, 500/g' $CURRENT_DIR/$DIR/app/src/main/java/com/github/tvbox/osc/ui/adapter/GridAdapter.java
sed -i 's/mContext, 300/mContext, 400/g' $CURRENT_DIR/$DIR/app/src/main/java/com/github/tvbox/osc/ui/adapter/GridAdapter.java
sed -i 's/mContext, 400/mContext, 500/g' $CURRENT_DIR/$DIR/app/src/main/java/com/github/tvbox/osc/ui/adapter/HistoryAdapter.java
sed -i 's/mContext, 300/mContext, 400/g' $CURRENT_DIR/$DIR/app/src/main/java/com/github/tvbox/osc/ui/adapter/HistoryAdapter.java
#解决模拟器闪退
echo "" >>$CURRENT_DIR/$DIR/app/proguard-rules.pro
echo "#新增设定" >>$CURRENT_DIR/$DIR/app/proguard-rules.pro
echo "-keep class com.xunlei.downloadlib.** {*;}" >>$CURRENT_DIR/$DIR/app/proguard-rules.pro
#添加网速显示
#mv $CURRENT_DIR/DIY/BaseController.java $CURRENT_DIR/$DIR/app/src/main/java/com/github/tvbox/osc/player/controller/BaseController.java
#mv $CURRENT_DIR/DIY/player_vod_control_view.xml $CURRENT_DIR/$DIR//app/src/main/res/layout/player_vod_control_view.xml
#mv $CURRENT_DIR/DIY/player_live_control_view.xml $CURRENT_DIR/$DIR//app/src/main/res/layout/player_live_control_view.xml
echo 'DIY End'