Welcome to mirror list, hosted at ThFree Co, Russian Federation.

install « remove_thumbnails.hmod « user_mods - github.com/ClusterM/hakchi2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b887093b3adf5c304f067b88aca4d8c0bd1ff75d (plain)
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
29
30
31
32
33
34
35
36
# Lines started with "#" are ignored and can be used as comments

# Next line defines "scnfile" variable with path to "sys_game_thumbnail.scn" file
# It's more complicated since SNES Mini relased. Path is defferent for NES Mini and SNES Mini.
# Lets try to find it
scnfile=$(find $mountpoint/usr/share -name "sys_game_thumbnail.scn") && scnfile=${scnfile:${#mountpoint}}
# Same with nes.json file
nesjson=/usr/share/clover-ui/resources/sprites/nes.json
# But nes.json exists on NES Mini only, otherwise we need packed.json
[ ! -f "$mountpoint/$nesjson" ] && nesjson=$(find $mountpoint/usr/share -name "packed.json") && nesjson=${nesjson:${#mountpoint}}

# This line defines "preinitfile" variable with pre-init file name
preinitfile=p81a8_hide_thumnbnails
# "restore" is hakchi function which copies original file to corresponding path in /var/lib/hakchi/rootfs
echo scnfile: $scnfile
restore $scnfile
echo nesjson: $nesjson
restore $nesjson
# sed is GNU util to modify file, this command replaces "enabled:true" to "enabled:false"
# Please note that we need to edit $rootfs$scnfile (writable file), not a just $scnfile (original read-only file)
sed -i -e 's/"enabled":true/"enabled":false/g' $rootfs$scnfile
# Same with nes.json file, most simple way is to replace coordinates sprite coords with zeros
# For NES Mini
sed -i -e 's/\[93,861,12,8\]/\[0,0,0,0\]/g' $rootfs$nesjson
sed -i -e 's/\[93,871,12,8\]/\[0,0,0,0\]/g' $rootfs$nesjson
sed -i -e 's/\[107,861,12,8\]/\[0,0,0,0\]/g' $rootfs$nesjson
# For SNES Mini
sed -i -e 's/\[145,881,12,8\]/\[0,0,0,0\]/g' $rootfs$nesjson
sed -i -e 's/\[159,881,12,8\]/\[0,0,0,0\]/g' $rootfs$nesjson
sed -i -e 's/\[173,881,12,8\]/\[0,0,0,0\]/g' $rootfs$nesjson

# Create pre-init script and echo "overmount" command to it
echo "overmount $scnfile" > $preinitpath/$preinitfile
echo "overmount $nesjson" >> $preinitpath/$preinitfile
# We should return 1 to prevent execution of automatic installer 
return 1