Skip to content

Commit

Permalink
Merge pull request #124 from kloptops/main
Browse files Browse the repository at this point in the history
Fixed a/b button during install, added code stuff.
  • Loading branch information
kloptops committed Apr 12, 2024
2 parents 8b44f4d + 04e85c1 commit b50ecb5
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 8 deletions.
7 changes: 6 additions & 1 deletion PortMaster/device_info.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,18 @@
#
# usage `source <path_to>/device_info.txt`

DEVICE_INFO_VERSION="0.1.6"
DEVICE_INFO_VERSION="0.1.7"

if [ -z "$controlfolder" ]; then
SCRIPT_DIR="$(dirname "$0")"
else
SCRIPT_DIR="$controlfolder"
fi

if [ -z "$PM_VERSION" ] && [ -f "$SCRIPT_DIR/version" ]; then
PM_VERSION="$(cat "$SCRIPT_DIR/version")"
fi

CFW_NAME="Unknown"
CFW_VERSION="Unknown"

Expand Down Expand Up @@ -290,6 +294,7 @@ cat << __INFO_DUMP__ | tee "$HOME/device_info_${CFW_NAME}_${DEVICE_NAME}.txt"
# ${DEVICE_NAME} - ${CFW_NAME}
\`\`\`bash
DEVICE_INFO_VERSION=${DEVICE_INFO_VERSION}
PM_VERSION=${PM_VERSION:-Unknown}
CFW_NAME=${CFW_NAME}
CFW_VERSION=${CFW_VERSION}
DEVICE_NAME=${DEVICE_NAME}
Expand Down
12 changes: 9 additions & 3 deletions PortMaster/pugwash
Original file line number Diff line number Diff line change
Expand Up @@ -1853,11 +1853,14 @@ def portmaster_check_update(pm, config, temp_dir):
release_channel=release_channel)

if update_ask:
if pm.message_box(update_reason, want_cancel=True):
old_check = config['no-check']
config['no-check'] = True

config['no-check'] = True
pm.hm = HarbourMaster(config, temp_dir=temp_dir, callback=pm)
pm.hm = HarbourMaster(config, temp_dir=temp_dir, callback=pm)
if pm.hm.platform.WANT_XBOX_FIX:
pm.events.fix_xbox_mode()

if pm.message_box(update_reason, want_cancel=True):
pm.do_install(
"PortMaster",
release_info[release_channel]['url'],
Expand All @@ -1874,6 +1877,9 @@ def portmaster_check_update(pm, config, temp_dir):

return True

config['no-check'] = old_check
pm.hm = None

return False


Expand Down
2 changes: 1 addition & 1 deletion PortMaster/pylibs/harbourmaster/harbour.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def load_info(self, force_load=False):
if self.runtimes_info is None:
self.runtimes_info = {}

if self.config['offline']:
if self.config['offline'] or self.config['no-check']:
if not porters_file.is_file():
with open(porters_file, 'w') as fh:
fh.write('{}')
Expand Down
2 changes: 1 addition & 1 deletion PortMaster/pylibs/harbourmaster/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ def gamelist_add(self, gameinfo_file):


class PlatformTesting(PlatformBase):
WANT_XBOX_FIX = True
WANT_XBOX_FIX = False

def gamelist_file(self):
return self.hm.ports_dir / 'gamelist.xml'
Expand Down
2 changes: 1 addition & 1 deletion PortMaster/pylibs/pugscene.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ def __init__(self, gui):
_("Update PortMaster"),
description=_("Force check for a new PortMaster version."))

if self.gui.hm.device['name'] != 'muOS':
if self.gui.hm.device['name'] not in ('muOS', 'TrimUI'):
self.tags['option_list'].add_option(
'restore-portmaster',
_("Restore PortMaster"),
Expand Down
7 changes: 6 additions & 1 deletion PortMaster/trimui/image_smash.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
#!/bin/sh
# TRIMUI EDITION

if [ -f "/mnt/SDCARD/System/bin/gm" ]; then
source /mnt/SDCARD/System/etc/ex_config

find "/mnt/SDCARD/Imgs/PORTS/" -type f \( -iname "*.jpg" -o -iname "*.png" \) -exec sh -c 'input="{}"; output="$(echo "$input" | sed "s/\(.*\)\..*/\1/").png"; gm convert "$input" -resize "244x244>" "$output"' \;
find "/mnt/SDCARD/Imgs/PORTS/" -type f \( -iname "*.jpg" -o -iname "*.png" \) -exec sh -c 'input="{}"; output="$(echo "$input" | sed "s/\(.*\)\..*/\1/").png"; gm -verbose convert "$input" "244x244>" "$output"; echo "$input"' \; >> /mnt/SDCARD/Apps/PortMaster/PortMaster/image_smash.log
fi

if [ -f /mnt/SDCARD/Roms/PORTS/PORTS_cache7.db ]; then
rm -f /mnt/SDCARD/Roms/PORTS/PORTS_cache7.db
fi

0 comments on commit b50ecb5

Please sign in to comment.