新的分辨率生成方式,更接近原生选项
This commit is contained in:
parent
43b1281ef6
commit
198a85080f
2 changed files with 124 additions and 14 deletions
69
hidpi-zh.sh
69
hidpi-zh.sh
|
@ -140,12 +140,19 @@ EOF
|
||||||
|
|
||||||
read -p "选择你想要的配置: " res
|
read -p "选择你想要的配置: " res
|
||||||
case $res in
|
case $res in
|
||||||
1 ) create_res 1680x945 1600x900 1440x810;;
|
1 ) create_res_1 1920x1080 1680x945 1440x810 1280x720 1024x576
|
||||||
2 ) create_res 2048x1152 1920x1080 1840x1035 1760x990;;
|
;;
|
||||||
|
2 ) create_res_1 2048x1152 1920x1080 1680x945 1440x810 1280x720
|
||||||
|
create_res_2 1024x576
|
||||||
|
create_res_3 960x540
|
||||||
|
create_res_4 2048x1152
|
||||||
|
;;
|
||||||
3 ) custom_res;;
|
3 ) custom_res;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
create_res 1280x720 1024x576 960x540 640x360
|
create_res_2 1280x720 960x540 640x360
|
||||||
|
create_res_3 840x472 720x405 640x360 576x324 512x288 420x234 400x225 320x180
|
||||||
|
create_res_4 1920x1080 1680x945 1440x810 1280x720 1024x576 960x540 640x360
|
||||||
|
|
||||||
cat >> "$dpiFile" <<-\FFF
|
cat >> "$dpiFile" <<-\FFF
|
||||||
</array>
|
</array>
|
||||||
|
@ -186,13 +193,61 @@ function create_res()
|
||||||
hidpi=$(printf '%08x %08x' $(($width*2)) $(($height*2)) | xxd -r -p | base64)
|
hidpi=$(printf '%08x %08x' $(($width*2)) $(($height*2)) | xxd -r -p | base64)
|
||||||
#
|
#
|
||||||
cat << OOO >> $dpiFile
|
cat << OOO >> $dpiFile
|
||||||
<!-- $res -->
|
<data>${hidpi:0:11}AAAAB</data>
|
||||||
<data>${hidpi:0:11}A</data>
|
|
||||||
<data>${hidpi:0:11}AAAABACAAAA==</data>
|
<data>${hidpi:0:11}AAAABACAAAA==</data>
|
||||||
<data>${hidpi:0:11}AAAAJAKAAAA==</data>
|
|
||||||
|
|
||||||
OOO
|
OOO
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
function create_res_1()
|
||||||
|
{
|
||||||
|
for res in $@; do
|
||||||
|
width=$(echo $res | cut -d x -f 1)
|
||||||
|
height=$(echo $res | cut -d x -f 2)
|
||||||
|
hidpi=$(printf '%08x %08x' $(($width*2)) $(($height*2)) | xxd -r -p | base64)
|
||||||
|
#
|
||||||
|
cat << OOO >> $dpiFile
|
||||||
|
<data>${hidpi:0:11}A</data>
|
||||||
|
OOO
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
function create_res_2()
|
||||||
|
{
|
||||||
|
for res in $@; do
|
||||||
|
width=$(echo $res | cut -d x -f 1)
|
||||||
|
height=$(echo $res | cut -d x -f 2)
|
||||||
|
hidpi=$(printf '%08x %08x' $(($width*2)) $(($height*2)) | xxd -r -p | base64)
|
||||||
|
#
|
||||||
|
cat << OOO >> $dpiFile
|
||||||
|
<data>${hidpi:0:11}AAAABACAAAA==</data>
|
||||||
|
OOO
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
function create_res_3()
|
||||||
|
{
|
||||||
|
for res in $@; do
|
||||||
|
width=$(echo $res | cut -d x -f 1)
|
||||||
|
height=$(echo $res | cut -d x -f 2)
|
||||||
|
hidpi=$(printf '%08x %08x' $(($width*2)) $(($height*2)) | xxd -r -p | base64)
|
||||||
|
#
|
||||||
|
cat << OOO >> $dpiFile
|
||||||
|
<data>${hidpi:0:11}AAAAB</data>
|
||||||
|
OOO
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
function create_res_4()
|
||||||
|
{
|
||||||
|
for res in $@; do
|
||||||
|
width=$(echo $res | cut -d x -f 1)
|
||||||
|
height=$(echo $res | cut -d x -f 2)
|
||||||
|
hidpi=$(printf '%08x %08x' $(($width*2)) $(($height*2)) | xxd -r -p | base64)
|
||||||
|
#
|
||||||
|
cat << OOO >> $dpiFile
|
||||||
|
<data>${hidpi:0:11}AAAAJAKAAAA==</data>
|
||||||
|
OOO
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
69
hidpi.sh
69
hidpi.sh
|
@ -138,12 +138,19 @@ EOF
|
||||||
|
|
||||||
read -p "Enter your choice: " res
|
read -p "Enter your choice: " res
|
||||||
case $res in
|
case $res in
|
||||||
1 ) create_res 1680x945 1600x900 1440x810;;
|
1 ) create_res_1 1920x1080 1680x945 1440x810 1280x720 1024x576
|
||||||
2 ) create_res 2048x1152 1920x1080 1840x1035 1760x990;;
|
;;
|
||||||
|
2 ) create_res_1 2048x1152 1920x1080 1680x945 1440x810 1280x720
|
||||||
|
create_res_2 1024x576
|
||||||
|
create_res_3 960x540
|
||||||
|
create_res_4 2048x1152
|
||||||
|
;;
|
||||||
3 ) custom_res;;
|
3 ) custom_res;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
create_res 1280x720 1024x576 960x540 640x360
|
create_res_2 1280x720 960x540 640x360
|
||||||
|
create_res_3 840x472 720x405 640x360 576x324 512x288 420x234 400x225 320x180
|
||||||
|
create_res_4 1920x1080 1680x945 1440x810 1280x720 1024x576 960x540 640x360
|
||||||
|
|
||||||
cat >> "$dpiFile" <<-\FFF
|
cat >> "$dpiFile" <<-\FFF
|
||||||
</array>
|
</array>
|
||||||
|
@ -184,13 +191,61 @@ function create_res()
|
||||||
hidpi=$(printf '%08x %08x' $(($width*2)) $(($height*2)) | xxd -r -p | base64)
|
hidpi=$(printf '%08x %08x' $(($width*2)) $(($height*2)) | xxd -r -p | base64)
|
||||||
#
|
#
|
||||||
cat << OOO >> $dpiFile
|
cat << OOO >> $dpiFile
|
||||||
<!-- $res -->
|
<data>${hidpi:0:11}AAAAB</data>
|
||||||
<data>${hidpi:0:11}A</data>
|
|
||||||
<data>${hidpi:0:11}AAAABACAAAA==</data>
|
<data>${hidpi:0:11}AAAABACAAAA==</data>
|
||||||
<data>${hidpi:0:11}AAAAJAKAAAA==</data>
|
|
||||||
|
|
||||||
OOO
|
OOO
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
function create_res_1()
|
||||||
|
{
|
||||||
|
for res in $@; do
|
||||||
|
width=$(echo $res | cut -d x -f 1)
|
||||||
|
height=$(echo $res | cut -d x -f 2)
|
||||||
|
hidpi=$(printf '%08x %08x' $(($width*2)) $(($height*2)) | xxd -r -p | base64)
|
||||||
|
#
|
||||||
|
cat << OOO >> $dpiFile
|
||||||
|
<data>${hidpi:0:11}A</data>
|
||||||
|
OOO
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
function create_res_2()
|
||||||
|
{
|
||||||
|
for res in $@; do
|
||||||
|
width=$(echo $res | cut -d x -f 1)
|
||||||
|
height=$(echo $res | cut -d x -f 2)
|
||||||
|
hidpi=$(printf '%08x %08x' $(($width*2)) $(($height*2)) | xxd -r -p | base64)
|
||||||
|
#
|
||||||
|
cat << OOO >> $dpiFile
|
||||||
|
<data>${hidpi:0:11}AAAABACAAAA==</data>
|
||||||
|
OOO
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
function create_res_3()
|
||||||
|
{
|
||||||
|
for res in $@; do
|
||||||
|
width=$(echo $res | cut -d x -f 1)
|
||||||
|
height=$(echo $res | cut -d x -f 2)
|
||||||
|
hidpi=$(printf '%08x %08x' $(($width*2)) $(($height*2)) | xxd -r -p | base64)
|
||||||
|
#
|
||||||
|
cat << OOO >> $dpiFile
|
||||||
|
<data>${hidpi:0:11}AAAAB</data>
|
||||||
|
OOO
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
function create_res_4()
|
||||||
|
{
|
||||||
|
for res in $@; do
|
||||||
|
width=$(echo $res | cut -d x -f 1)
|
||||||
|
height=$(echo $res | cut -d x -f 2)
|
||||||
|
hidpi=$(printf '%08x %08x' $(($width*2)) $(($height*2)) | xxd -r -p | base64)
|
||||||
|
#
|
||||||
|
cat << OOO >> $dpiFile
|
||||||
|
<data>${hidpi:0:11}AAAAJAKAAAA==</data>
|
||||||
|
OOO
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue