Skip to content

Commit

Permalink
Merge pull request #155 from kloptops/main
Browse files Browse the repository at this point in the history
Added uppercase for batocera/knulli device name, additional device in…
  • Loading branch information
kloptops authored Jul 29, 2024
2 parents 08bdef2 + a7f7631 commit 94404fb
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 3 deletions.
2 changes: 1 addition & 1 deletion PortMaster/device_info.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ elif [ -f "$HOME/.config/.OS_ARCH" ]; then
elif [ -f "$HOME/.var/app/net.retrodeck.retrodeck/config/retrodeck/retrodeck.cfg" ]; then
DEVICE_NAME="RetroDECK"
elif [ -f "/boot/boot/batocera.board" ]; then
DEVICE_NAME=$(cat /boot/boot/batocera.board)
DEVICE_NAME=$(tr '[a-z]' '[A-Z]' < /boot/boot/batocera.board)
elif [ -f "/sys/firmware/devicetree/base/model" ]; then
DEVICE_NAME=$(cat "/sys/firmware/devicetree/base/model" | cut -d' ' -f 2)

Expand Down
21 changes: 19 additions & 2 deletions PortMaster/muos/PortMaster.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,20 @@ if [ -n "$AUTOINSTALL" ]; then

for file_name in "$controlfolder/autoinstall"/*.squashfs
do
if [ ! -f "$file_name" ]; then
continue
fi

$ESUDO mv -f "$file_name" "$controlfolder/libs"
PortMasterDialog "message" "- SUCCESS: $(basename $file_name)"
done

for file_name in "$controlfolder/autoinstall"/*.zip
do
if [ ! -f "$file_name" ]; then
continue
fi

if [[ "$(basename $file_name)" == "PortMaster.zip" ]]; then
continue
fi
Expand All @@ -62,9 +70,15 @@ if [ -n "$AUTOINSTALL" ]; then
else
PortMasterDialog "message" "- FAILURE: $(basename $file_name)"
fi

touch "$controlfolder/.muos-refresh"
done

if [ -f "$controlfolder/autoinstall/PortMaster.zip" ]; then
if [ ! -f "$file_name" ]; then
continue
fi

file_name="$controlfolder/autoinstall/PortMaster.zip"

if [[ $(PortMasterDialogResult "install" "$file_name") == "OKAY" ]]; then
Expand All @@ -75,12 +89,15 @@ if [ -n "$AUTOINSTALL" ]; then
fi
fi

touch "$controlfolder/.muos-refresh"

PortMasterDialog "messages_end"
if [ -z "$GW" ]; then
PortMasterDialogMessageBox "Finished running autoinstall.\n\nNo internet connection present so exiting."
PortMasterDialogExit

rm -f "${controlfolder}/.muos-refresh"
# HULK SMASH
${controlfolder}/muos/image_smash.txt

exit 0
else
PortMasterDialogMessageBox "Finished running autoinstall."
Expand Down
3 changes: 3 additions & 0 deletions PortMaster/pylibs/harbourmaster/hardware.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@
"Anbernic RG351MP": {"device": "rg351mp", "manufacturer": "Anbernic", "cfw": ["ArkOS", "AmberELEC", "JELOS", "TheRA"]},
"Anbernic RG503": {"device": "rg503", "manufacturer": "Anbernic", "cfw": ["ArkOS", "JELOS", "ROCKNIX"]},
"Anbernic RG552": {"device": "rg552", "manufacturer": "Anbernic", "cfw": ["AmberELEC", "JELOS", "ROCKNIX"]},
"Anbernic RG40XX H": {"device": "rg40xx-h", "manufacturer": "Anbernic", "cfw": ["muOS", "Batocera", "ROCKNIX"]},
"Anbernic RG35XX PLUS": {"device": "rg35xx-plus", "manufacturer": "Anbernic", "cfw": ["muOS", "Batocera", "ROCKNIX"]},
"Anbernic RG35XX H": {"device": "rg35xx-h", "manufacturer": "Anbernic", "cfw": ["muOS", "Batocera", "ROCKNIX"]},
"Anbernic RG35XX SP": {"device": "rg35xx-sp", "manufacturer": "Anbernic", "cfw": ["muOS", "Batocera", "ROCKNIX"]},
"Anbernic RG28XX": {"device": "rg28xx", "manufacturer": "Anbernic", "cfw": ["muOS", "Batocera", "ROCKNIX"]},
"Anbernic RG351P/M": {"device": "rg351p", "manufacturer": "Anbernic", "cfw": ["ArkOS (Wummle)", "AmberELEC", "JELOS", "ROCKNIX"]},
"Anbernic RG351V": {"device": "rg351v", "manufacturer": "Anbernic", "cfw": ["ArkOS", "AmberELEC", "JELOS", "ROCKNIX"]},

Expand Down Expand Up @@ -81,6 +83,7 @@
"rg353ps": {"resolution": ( 640, 480), "analogsticks": 2, "cpu": "rk3566", "capabilities": ["power"], "ram": 1024},

# Anbernic RG35XX
"rg40xx-h": {"resolution": (640, 480), "analogsticks": 2, "cpu": "h700", "capabilities": ["power"], "ram": 1024},
"rg35xx-h": {"resolution": (640, 480), "analogsticks": 2, "cpu": "h700", "capabilities": ["power"], "ram": 1024},
"rg35xx-plus": {"resolution": (640, 480), "analogsticks": 0, "cpu": "h700", "capabilities": ["power"], "ram": 1024},
"rg35xx-sp": {"resolution": (640, 480), "analogsticks": 0, "cpu": "h700", "capabilities": ["power"], "ram": 1024},
Expand Down
35 changes: 35 additions & 0 deletions PortMaster/pylibs/pugscene.py
Original file line number Diff line number Diff line change
Expand Up @@ -2008,6 +2008,11 @@ def update_filters(self):
"mono": _("{runtime_name} Runtime").format(runtime_name="Mono"),
"rlvm": _("{runtime_name} Runtime").format(runtime_name="RLVM"),
"solarus": _("{runtime_name} Runtime").format(runtime_name="Solarus"),

# Architecture
"armhf": _("ARM 32bit"),
"aarch64": _("ARM 64bit"),
"x86_64": _("x86 64bit"),
}

# Hack to make other appear last, by default the order will be 0, you can set it to -1 for it to appear at the top.
Expand All @@ -2034,6 +2039,7 @@ def update_filters(self):
'attr',
# 'status',
'genres',
# 'architecture',
'porters',
]

Expand Down Expand Up @@ -2128,6 +2134,35 @@ def update_filters(self):
if selected_option == hm_genre:
selected_offset = len(self.tags['filter_list'].options) - 1

elif display_order == 'architecture':
for hm_genre in ['armhf', 'aarch64', 'x86_64']:
if hm_genre in self.locked_genres:
continue

if hm_genre in self.list_scene.options['skip_genres']:
continue

if hm_genre in genres:
ports = total_ports
text = [" ", "_CHECKED", f" {filter_translation.get(hm_genre, hm_genre)}", None, " ", f" {ports}"]
else:
ports = len(self.gui.hm.list_ports(genres + [hm_genre]))
text = [" ", "_UNCHECKED", f" {filter_translation.get(hm_genre, hm_genre)}", None, " ", f" {ports}"]

if ports == 0:
continue

if first_add:
if add_blank:
self.tags['filter_list'].add_option(None, "")
self.tags['filter_list'].add_option(None, _("Architecture:"))
first_add = False

self.tags['filter_list'].add_option(hm_genre, text)

if selected_option == hm_genre:
selected_offset = len(self.tags['filter_list'].options) - 1

elif display_order == 'status':
for hm_genre in ['full', 'demo', 'free', 'paid']:
if hm_genre in self.locked_genres:
Expand Down

0 comments on commit 94404fb

Please sign in to comment.