diff --git a/.gitattributes b/.gitattributes index 7b47b3fb5..f778fc419 100644 --- a/.gitattributes +++ b/.gitattributes @@ -9,3 +9,4 @@ static/build/.tmp_update/updater text eol=lf static/dist/.tmp_update/updater text eol=lf static/dist/miyoo/app/.tmp_update/updater text eol=lf static/dist/miyoo/app/MainUI text eol=lf +static/dist/.tmp_update/bin/shutdown text eol=lf diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9348bf286..7f823d04a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ jobs: name: Check build runs-on: ubuntu-latest container: - image: ghcr.io/onionui/miyoomini-toolchain:latest + image: aemiii91/miyoomini-toolchain:latest options: --user root steps: - name: Checkout repository diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 310805639..5011b663a 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -15,7 +15,7 @@ jobs: name: Pre-release runs-on: ubuntu-latest container: - image: ghcr.io/onionui/miyoomini-toolchain:latest + image: aemiii91/miyoomini-toolchain:latest options: --user root steps: - name: Checkout repository diff --git a/.github/workflows/tagged-release.yml b/.github/workflows/tagged-release.yml index f03940f07..c3f1d71be 100644 --- a/.github/workflows/tagged-release.yml +++ b/.github/workflows/tagged-release.yml @@ -10,7 +10,7 @@ jobs: name: Tagged release runs-on: ubuntu-latest container: - image: ghcr.io/onionui/miyoomini-toolchain:latest + image: aemiii91/miyoomini-toolchain:latest options: --user root steps: - name: Checkout repository diff --git a/Makefile b/Makefile index 9175f43f6..df26782d3 100644 --- a/Makefile +++ b/Makefile @@ -48,7 +48,7 @@ ifeq (,$(GTEST_INCLUDE_DIR)) GTEST_INCLUDE_DIR = /usr/include/ endif -TOOLCHAIN := mholdg16/miyoomini-toolchain:latest +TOOLCHAIN := aemiii91/miyoomini-toolchain:latest include ./src/common/commands.mk @@ -190,22 +190,22 @@ dist: build @$(ECHO) $(PRINT_RECIPE) # Package configs @cp -R $(TEMP_DIR)/configs/Saves/CurrentProfile/ $(TEMP_DIR)/configs/Saves/GuestProfile - @cd $(TEMP_DIR)/configs && zip -rq $(BUILD_DIR)/.tmp_update/config/configs.pak . + @cd $(TEMP_DIR)/configs && 7z a -r -mtm=off $(BUILD_DIR)/.tmp_update/config/configs.pak . -bsp0 -bso0 @rm -rf $(TEMP_DIR)/configs @rmdir $(TEMP_DIR) # Package RetroArch separately - @cd $(BUILD_DIR) && zip -rq retroarch.pak RetroArch + @cd $(BUILD_DIR) && 7z a -r -mtm=off retroarch.pak RetroArch -bsp0 -bso0 @mkdir -p $(DIST_DIR)/RetroArch @mv $(BUILD_DIR)/retroarch.pak $(DIST_DIR)/RetroArch/ @echo $(RA_SUBVERSION) > $(DIST_DIR)/RetroArch/ra_package_version.txt # Package Onion core - @cd $(BUILD_DIR) && zip -rq $(DIST_DIR)/miyoo/app/.tmp_update/onion.pak . -x RetroArch RetroArch/\* + @cd $(BUILD_DIR) && 7z a -r -mtm=off $(DIST_DIR)/miyoo/app/.tmp_update/onion.pak . -xr!RetroArch -bsp0 -bso0 @$(ECHO) "\n-> [DIST READY!]" release: dist @$(ECHO) $(PRINT_RECIPE) @rm -f $(RELEASE_DIR)/$(RELEASE_NAME).zip - @cd $(DIST_DIR) && zip -rq $(RELEASE_DIR)/$(RELEASE_NAME).zip . + @cd $(DIST_DIR) && 7z a -r -mtc=off $(RELEASE_DIR)/$(RELEASE_NAME).zip . -bsp0 -bso0 @$(ECHO) "\n-> [RELEASE READY!]" clean: diff --git a/src/axp/Makefile b/src/axp/Makefile index cf9c7ac69..e786a47a6 100644 --- a/src/axp/Makefile +++ b/src/axp/Makefile @@ -2,7 +2,7 @@ include ../common/config.mk TARGET = axp CFLAGS := $(CFLAGS) -Os -ffunction-sections -fdata-sections -Wall -LDFLAGS := $(LDFLAGS) -Wl,--gc-sections -s +LDFLAGS := $(LDFLAGS) -Wl,--gc-sections include ../common/commands.mk include ../common/recipes.mk diff --git a/src/batmon/Makefile b/src/batmon/Makefile index d567fcccb..d8e4ed7cb 100644 --- a/src/batmon/Makefile +++ b/src/batmon/Makefile @@ -2,7 +2,7 @@ INCLUDE_SHMVAR=1 include ../common/config.mk TARGET = batmon -LDFLAGS := $(LDFLAGS) -s -pthread +LDFLAGS := $(LDFLAGS) -pthread include ../common/commands.mk include ../common/recipes.mk diff --git a/src/bootScreen/Makefile b/src/bootScreen/Makefile index 7cbcaaa1f..b7183cc17 100644 --- a/src/bootScreen/Makefile +++ b/src/bootScreen/Makefile @@ -3,7 +3,7 @@ INCLUDE_SHMVAR=1 include ../common/config.mk TARGET = bootScreen -LDFLAGS := $(LDFLAGS) -s -lSDL -lSDL_image -lSDL_ttf -lSDL_mixer +LDFLAGS := $(LDFLAGS) -lSDL -lSDL_image -lSDL_ttf -lSDL_mixer include ../common/commands.mk include ../common/recipes.mk diff --git a/src/chargingState/Makefile b/src/chargingState/Makefile index 60e672665..26661b722 100644 --- a/src/chargingState/Makefile +++ b/src/chargingState/Makefile @@ -2,7 +2,7 @@ INCLUDE_CJSON=1 include ../common/config.mk TARGET = chargingState -LDFLAGS := $(LDFLAGS) -s -lSDL -lSDL_image -lSDL_ttf +LDFLAGS := $(LDFLAGS) -lSDL -lSDL_image -lSDL_ttf include ../common/commands.mk include ../common/recipes.mk diff --git a/src/common/config.mk b/src/common/config.mk index efb7a8044..3cd7f8b12 100644 --- a/src/common/config.mk +++ b/src/common/config.mk @@ -34,7 +34,7 @@ OFILES = $(CFILES:.c=.o) $(CPPFILES:.cpp=.o) CFLAGS := -I../../include -I../common -DPLATFORM_$(shell echo $(PLATFORM) | tr a-z A-Z) -DONION_VERSION="\"$(VERSION)\"" -Wall ifeq ($(DEBUG),1) -CFLAGS := $(CFLAGS) -DLOG_DEBUG -g +CFLAGS := $(CFLAGS) -DLOG_DEBUG -g3 endif ifeq ($(TEST),1) diff --git a/src/easter/Makefile b/src/easter/Makefile index ac4392e7d..11942b589 100644 --- a/src/easter/Makefile +++ b/src/easter/Makefile @@ -1,7 +1,7 @@ include ../common/config.mk TARGET = easter -LDFLAGS := $(LDFLAGS) -s -lSDL -lSDL_image -lSDL_ttf -lSDL_mixer +LDFLAGS := $(LDFLAGS) -lSDL -lSDL_image -lSDL_ttf -lSDL_mixer include ../common/commands.mk include ../common/recipes.mk diff --git a/src/jpg2png/Makefile b/src/jpg2png/Makefile index 5c244d6e6..878197aa4 100644 --- a/src/jpg2png/Makefile +++ b/src/jpg2png/Makefile @@ -10,7 +10,7 @@ CFILES = $(foreach dir, $(SOURCES), $(wildcard $(dir)/*.c)) OFILES = $(CFILES:.c=.o) CFLAGS = -Os $(ARCH) -ffunction-sections -fdata-sections -Wall -LDFLAGS = $(ARCH) -lmi_sys -lmi_gfx -lpng -Wl,-Bstatic -ljpeg -Wl,-Bdynamic -s +LDFLAGS = $(ARCH) -lmi_sys -lmi_gfx -lpng -Wl,-Bstatic -ljpeg -Wl,-Bdynamic $(TARGET): $(OFILES) $(CC) $(OFILES) -o $@ $(LDFLAGS) diff --git a/src/keymon/Makefile b/src/keymon/Makefile index 5781df5ac..17a8b4305 100644 --- a/src/keymon/Makefile +++ b/src/keymon/Makefile @@ -4,7 +4,7 @@ include ../common/config.mk TARGET = keymon CFLAGS := $(CFLAGS) -Os -ffunction-sections -fdata-sections -LDFLAGS := $(LDFLAGS) -lpthread -lpng -Wl,--gc-sections -s +LDFLAGS := $(LDFLAGS) -lpthread -lpng -Wl,--gc-sections include ../common/commands.mk include ../common/recipes.mk diff --git a/src/packageManager/Makefile b/src/packageManager/Makefile index 9041efaed..253cfd8a2 100644 --- a/src/packageManager/Makefile +++ b/src/packageManager/Makefile @@ -2,7 +2,7 @@ INCLUDE_CJSON=1 include ../common/config.mk TARGET = packageManager -LDFLAGS := $(LDFLAGS) -s -lSDL -lSDL_image -lSDL_ttf +LDFLAGS := $(LDFLAGS) -lSDL -lSDL_image -lSDL_ttf include ../common/commands.mk include ../common/recipes.mk diff --git a/src/playActivity/Makefile b/src/playActivity/Makefile index ad80c47e2..ade1a4b1e 100644 --- a/src/playActivity/Makefile +++ b/src/playActivity/Makefile @@ -1,7 +1,7 @@ include ../common/config.mk TARGET = playActivity -LDFLAGS := $(LDFLAGS) -s -lsqlite3 +LDFLAGS := $(LDFLAGS) -lsqlite3 include ../common/commands.mk include ../common/recipes.mk diff --git a/src/playActivityUI/Makefile b/src/playActivityUI/Makefile index b4eb37cc8..5d9df26a8 100644 --- a/src/playActivityUI/Makefile +++ b/src/playActivityUI/Makefile @@ -1,7 +1,7 @@ include ../common/config.mk TARGET = playActivityUI -LDFLAGS := $(LDFLAGS) -s -lSDL -lSDL_image -lSDL_ttf -lsqlite3 +LDFLAGS := $(LDFLAGS) -lSDL -lSDL_image -lSDL_ttf -lsqlite3 include ../common/commands.mk include ../common/recipes.mk diff --git a/src/pngScale/Makefile b/src/pngScale/Makefile index a72692b29..714026287 100644 --- a/src/pngScale/Makefile +++ b/src/pngScale/Makefile @@ -2,7 +2,7 @@ INCLUDE_SHMVAR=1 include ../common/config.mk TARGET = pngScale -LDFLAGS := $(LDFLAGS) -lSDL -lmi_sys -lmi_gfx -lpng -s +LDFLAGS := $(LDFLAGS) -lSDL -lmi_sys -lmi_gfx -lpng include ../common/commands.mk include ../common/recipes.mk diff --git a/src/randomGamePicker/Makefile b/src/randomGamePicker/Makefile index 80fa124e6..4ec76f28b 100644 --- a/src/randomGamePicker/Makefile +++ b/src/randomGamePicker/Makefile @@ -2,7 +2,7 @@ INCLUDE_CJSON=1 include ../common/config.mk TARGET = randomGamePicker -LDFLAGS := $(LDFLAGS) -s -lsqlite3 +LDFLAGS := $(LDFLAGS) -lsqlite3 include ../common/commands.mk include ../common/recipes.mk diff --git a/src/themeSwitcher/Makefile b/src/themeSwitcher/Makefile index 47184bc2d..c3bfd6528 100644 --- a/src/themeSwitcher/Makefile +++ b/src/themeSwitcher/Makefile @@ -2,7 +2,7 @@ INCLUDE_CJSON=1 include ../common/config.mk TARGET = themeSwitcher -LDFLAGS := $(LDFLAGS) -s -lSDL -lSDL_image -lSDL_ttf +LDFLAGS := $(LDFLAGS) -lSDL -lSDL_image -lSDL_ttf include ../common/commands.mk include ../common/recipes.mk diff --git a/static/build/miyoo/app/Exo-2-Bold-Italic_Universal.ttf b/static/build/miyoo/app/Exo-2-Bold-Italic_Universal.ttf index a0098cd0f..05d5b4cdb 100644 Binary files a/static/build/miyoo/app/Exo-2-Bold-Italic_Universal.ttf and b/static/build/miyoo/app/Exo-2-Bold-Italic_Universal.ttf differ diff --git a/static/build/miyoo/app/lang/ru.lang b/static/build/miyoo/app/lang/ru.lang index 353f2a689..d65bcc3b2 100644 --- a/static/build/miyoo/app/lang/ru.lang +++ b/static/build/miyoo/app/lang/ru.lang @@ -50,10 +50,10 @@ "47": "Секунды", "48": "В", "49": "Плейлист", - "50": "Очистить", - "51": "Открыть", - "52": "Удалить", - "53": "Обновляю", + "50": "Очистить список", + "51": "Запустить", + "52": "Удалить из списка", + "53": "Очистка всех игровых кэшей", "54": "Обновить ROMы", "55": "Добавить в избранное", "56": "Обновить", @@ -62,12 +62,12 @@ "59": "Номер модели", "60": "Серийный номер", "61": "Версия прошивки", - "62": "Процессор", + "62": "Частота процессора", "63": "%dМгц", - "64": "Оперативная память", + "64": "Объем памяти", "65": "%dМб", - "66": "Карта памяти", - "67": "Сброс всех настроек", + "66": "Занятый/общий объем хранилища", + "67": "Сброс настроек", "68": "Сбросить все системные настройки?\nСодержимое карты памяти\nне будет удалено.", "69": "Обновить ROMы на карте памяти", "70": "Перезагрузить", @@ -77,17 +77,17 @@ "74": "Неизвестный", "75": "Загрузка", "76": "Загрузка", - "77": "Очистить список", - "78": "Очистить список последних игр?\nСохранения и сами игры\nс карты памяти удалены не будут.", - "79": "Очистить избранное", - "80": "Убрать все игры из избранного?\nСохранения и сами игры\nс карты памяти удалены не будут.", - "81": "Убрать из избранного", - "82": "Убрать игру из избранного?\nСохранения и сама игра\nс карты памяти удалены не будут.", + "77": "Очистить список недавних игр?", + "78": "Сохранения и сами игры\nс карты памяти удалены не будут.", + "79": "Очистить список избранного?", + "80": "Сохранения и сами игры\nс карты памяти удалены не будут.", + "81": "Убрать игру из избранного?", + "82": "Сохранения и сама игра\nс карты памяти удалены не будут.", "83": "Сканирую игры", "84": "Информация об игре", "85": "Создать кэш", "86": "Выключение", - "87": "Выключить через %d секунд", + "87": "Выключение через %d секунд", "88": "Откр", "89": "Возв", "90": "Нав", @@ -96,7 +96,7 @@ "93": "Сохранить", "94": "Загрузить", "95": "Громкость", - "96": "Выход из Игры", + "96": "Выход в меню", "97": "Запись %d/%d", "98": "Пусто", "99": "Нет обложки", @@ -110,20 +110,20 @@ "107": "Прилож.", "108": "Выключить устройство?", "109": "Тест кнопок", - "110": "Назначение кнопок", + "110": "Переназначение кнопок", "111": "Выход", "112": "Сохранить и выйти", "113": "Через %d минут", "114": "Никогда", "115": "Спящий режим", - "116": "Удалить ROM", - "117": "Удалить ROM из этого списка?", - "118": "Цвет", + "116": "Удалить игру с карты памяти?", + "117": "Подтвердите, что вы хотите удалить\nэту игру с вашей карты памяти.", + "118": "Экран", "119": "Яркость", "120": "Тон", "121": "Насыщенность", "122": "Контраст", - "123": "Перезагрузите,\nчтобы применить изменения.", + "123": " \n \nНастройки экрана сохранены!\nПожалуйста, перезагрузите устройство.\n \n ", "124": "Применить изменения", "125": "Темы", "126": "Размер шрифта", @@ -133,29 +133,29 @@ "130": "Исправления", "131": "WIFI", "132": " ", - "133": "Connect", - "134": "Hotspot", + "133": "Подключиться", + "134": "Точка доступа", "135": "SSID", - "136": "Password", + "136": "Пароль", "137": "Bluetooth", "138": "Netplay", - "139": "Reset Bluetooth Service", - "140": "Scanning", - "141": "No Device Found", - "142": "Bluetooth Not Ready", - "143": "Put roms into following directory", - "144": "Bluetooth Reset", - "145": "Hotspot is on", - "146": "CPU Frequency", - "147": "Connected", - "148": "My Device", - "149": "Other Device", - "150": "Info", - "151": "Input SSID", - "152": "Input Password", - "153": "Search", - "154": "Fail to connect\nCheck your password\nOr reboot router", - "155": "Website", + "139": "Сбросить сервис Bluetooth", + "140": "Сканирование", + "141": "Устройства не найдены", + "142": "Bluetooth не готов", + "143": "Поместите ROMы в указанный каталог", + "144": "Сброс Bluetooth", + "145": "Точка доступа включена", + "146": "Частота ЦПУ", + "147": "Подключено", + "148": "Моё устройство", + "149": "Другое устройство", + "150": "Инфо", + "151": "Введите SSID", + "152": "Введите пароль", + "153": "Поиск", + "154": "Не удается установить соединение\nПроверьте ваш пароль\nили перезагрузите маршрутизатор", + "155": "Веб-сайт", "300": "Далее", "301": "Продолжить" -} \ No newline at end of file +} diff --git a/static/dist/miyoo/app/.tmp_update/install.sh b/static/dist/miyoo/app/.tmp_update/install.sh index 0fbb9cf52..0387e8582 100644 --- a/static/dist/miyoo/app/.tmp_update/install.sh +++ b/static/dist/miyoo/app/.tmp_update/install.sh @@ -588,73 +588,76 @@ unzip_progress() { echo " - Extract '$zipfile' into $dest" + verify_file -verify_file + echo "Starting..." > /tmp/.update_msg + sleep 3 -echo "Starting..." > /tmp/.update_msg -sleep 3 - -if [ -f "/mnt/SDCARD/.tmp_update/onion.pak" ]; then - echo "onion.pak exists" - sleep 1 -else - echo "onion.pak is missing, extraction will fail" -fi + if [ -f "/mnt/SDCARD/.tmp_update/onion.pak" ]; then + echo "onion.pak exists" + sleep 1 + else + echo "onion.pak is missing, extraction will fail" + fi -verify_file + verify_file -sleep 1 + sleep 1 -# Run the 7z extraction command in the background and redirect output to /tmp/.extraction_output -(7z x -aoa -o"$dest" "$zipfile" -bsp1 -bb > /tmp/.extraction_output ; echo $? > "/tmp/extraction_status" ) & + # Run the 7z extraction command in the background and redirect output to /tmp/.extraction_output + (7z x -aoa -o"$dest" "$zipfile" -bsp1 -bb > /tmp/.extraction_output ; echo $? > "/tmp/extraction_status" ) & -sleep 1 + sleep 1 -if pgrep 7z > /dev/null; then - echo "7Z is running" - sleep 1 -else - echo "7Z is NOT running and should be" - sleep 1 -fi - -if [ -f "/mnt/SDCARD/.tmp_update/onion.pak" ]; then - echo "onion.pak still exists" - sleep 1 -else - echo "onion.pak is still missing, extraction has probably failed" - sleep 1 - echo "the build will say it's complete but isn't" -fi + if pgrep 7z > /dev/null; then + echo "7Z is running" + sleep 1 + else + echo "7Z is NOT running and should be" + sleep 1 + fi -# Continuously update /tmp/.update_msg every 500 milliseconds until the command line finishes -a=$(pgrep 7z) -while [ -n "$a" ]; do - last_line=$(tail -n 1 /tmp/.extraction_output) - value=$(echo "$last_line" | sed 's/.* \([0-9]\+\)%.*/\1/') - if [ "$value" -eq "$value" ] 2>/dev/null; then # check if the value is numeric - echo "$msg $value%" > /tmp/.update_msg + if [ -f "/mnt/SDCARD/.tmp_update/onion.pak" ]; then + echo "onion.pak still exists" + sleep 1 + else + echo "onion.pak is still missing, extraction has probably failed" + sleep 1 + echo "the build will say it's complete but isn't" fi - > /tmp/.extraction_output # to avoid to parse a too big file - sleep 0.5 - a=$(pgrep 7z) -done -# Check the exit status of the extraction command -extraction_status=$(cat "/tmp/extraction_status") -if [ "$extraction_status" -ne 0 ]; then - touch $sysdir/.installFailed - echo ":: Installation failed!" - sync - reboot - sleep 10 - exit 0 -else - echo "$msg 100%" >> /tmp/.update_msg -fi + # Continuously update /tmp/.update_msg every 500 milliseconds until the command line finishes + a=$(pgrep 7z) + while [ -n "$a" ]; do + last_line=$(tail -n 1 /tmp/.extraction_output) + value=$(echo "$last_line" | sed 's/.* \([0-9]\+\)%.*/\1/') + if [ "$value" -eq "$value" ] 2>/dev/null; then # check if the value is numeric + if [ $value -eq 0 ]; then + echo "Preparing folders..." > /tmp/.update_msg # It gets stuck a bit at 0%, so don't show percentage yet + else + echo "$msg $value%" > /tmp/.update_msg # Now we can show completion percentage + fi + fi + > /tmp/.extraction_output # to avoid to parse a too big file + sleep 0.5 + a=$(pgrep 7z) + done + + # Check the exit status of the extraction command + extraction_status=$(cat "/tmp/extraction_status") + if [ "$extraction_status" -ne 0 ]; then + touch $sysdir/.installFailed + echo ":: Installation failed!" + sync + reboot + sleep 10 + exit 0 + else + echo "$msg 100%" >> /tmp/.update_msg + fi -rm /tmp/extraction_status -rm /tmp/.extraction_output + rm /tmp/extraction_status + rm /tmp/.extraction_output } free_mma() {