pmt: apply version 1.7.0 changes

This commit is contained in:
2024-04-09 23:24:53 +03:00
committed by GitHub
parent 8034ed897c
commit 848412e1cd

View File

@@ -1,8 +1,6 @@
include mka/config.mk
# By YZBruh # By YZBruh
# Copyright 2024 YZBruh - Partition Manager # Copyright 2024 YZBruh - Partition Backupper
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
@@ -16,29 +14,34 @@ include mka/config.mk
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# speficy include config/env.mk
VERSION := 1.5.0
VERSION_CODE := 150 # speficy {version}
VERSION := 1.7.0
VERSION_CODE := 170
SOURCE_DIR := binary SOURCE_DIR := binary
TARGET := pmt TARGET := pmt
LANG := en LANG := en
ARCH := $(shell uname -m) ARCH := $(shell uname -m)
CUR_DIR := $(shell pwd) CUR_DIR := $(shell pwd)
# code list # sources
SRCS := $(SOURCE_DIR)/$(TARGET).c SRCS := $(SOURCE_DIR)/$(TARGET).c
SRCS += $(SOURCE_DIR)/error.c SRCS += $(SOURCE_DIR)/error.c
SRCS += $(SOURCE_DIR)/checkers.c SRCS += $(SOURCE_DIR)/checkers.c
SRCS += $(SOURCE_DIR)/lister.c SRCS += $(SOURCE_DIR)/listpart.c
SRCS += $(SOURCE_DIR)/flash.c SRCS += $(SOURCE_DIR)/flash.c
SRCS += $(SOURCE_DIR)/backup.c SRCS += $(SOURCE_DIR)/backup.c
SRCS += $(SOURCE_DIR)/docs.c
# objects
OBJS := $(SOURCE_DIR)/$(TARGET).o OBJS := $(SOURCE_DIR)/$(TARGET).o
OBJS += $(SOURCE_DIR)/error.o OBJS += $(SOURCE_DIR)/error.o
OBJS += $(SOURCE_DIR)/checkers.o OBJS += $(SOURCE_DIR)/checkers.o
OBJS += $(SOURCE_DIR)/lister.o OBJS += $(SOURCE_DIR)/listpart.o
OBJS += $(SOURCE_DIR)/flash.o OBJS += $(SOURCE_DIR)/flash.o
OBJS += $(SOURCE_DIR)/backup.o OBJS += $(SOURCE_DIR)/backup.o
OBJS += $(SOURCE_DIR)/docs.o
OUT_DIR := $(CUR_DIR)/out OUT_DIR := $(CUR_DIR)/out
BINARY_DIR := $(OUT_DIR)/binary BINARY_DIR := $(OUT_DIR)/binary
@@ -48,10 +51,8 @@ PACKAGE_DIR := $(OUT_DIR)/package
all: all:
@printf " --- Building Partition Manager --- \n"; \ @printf " --- Building Partition Manager --- \n"; \
printf "Version: $(VERSION)\n"; \ printf "Version: $(VERSION)\n"; \
printf "Version code: $(VERSION_CODE)\n"; \ printf "Version code: $(VERSION_CODE)\n\n"; \
printf " \n"; \ printf " ------------------------------------- \n\n"; \
printf " ------------------------------------- \n"; \
printf " \n"; \
printf "Starting build... Please waith.\n"; \ printf "Starting build... Please waith.\n"; \
sleep 2; \ sleep 2; \
printf "Make running with silent mode...\n"; \ printf "Make running with silent mode...\n"; \
@@ -97,9 +98,11 @@ help:
printf " make clean ==> Clear files (Builded binaries are not deleted)\n"; \ printf " make clean ==> Clear files (Builded binaries are not deleted)\n"; \
printf " make clean-all ==> Clear files (Builded binaries are deleted)\n"; \ printf " make clean-all ==> Clear files (Builded binaries are deleted)\n"; \
printf " make install-termux ==> If you are using termux, it installs the compiled pmt into termux. So it allows you to use it like a normal command.\n"; \ printf " make install-termux ==> If you are using termux, it installs the compiled pmt into termux. So it allows you to use it like a normal command.\n"; \
printf " make uninstall-termux ==> If you are using termux, it uninstalls the compiled pmt into termux. So it allows you to use it like a normal command.\n"; \
printf " make help ==> Display help message\n"; \ printf " make help ==> Display help message\n"; \
printf " \n"; printf " \n";
# installer
.PHONY: install-termux .PHONY: install-termux
install-termux: install-termux:
@if [ -f /data/data/com.termux/files/usr/bin/termux-open ]; then \ @if [ -f /data/data/com.termux/files/usr/bin/termux-open ]; then \
@@ -109,8 +112,21 @@ install-termux:
cp $(BINARY_DIR)/pmt /data/data/com.termux/files/usr/bin/pmt || exit 1; \ cp $(BINARY_DIR)/pmt /data/data/com.termux/files/usr/bin/pmt || exit 1; \
chmod 777 /data/data/com.termux/files/usr/bin/pmt || exit 1; \ chmod 777 /data/data/com.termux/files/usr/bin/pmt || exit 1; \
printf " \n"; \ printf " \n"; \
printf "Success.\n"; \ printf "Success.\n\n"; \
printf " \n"; \ else \
printf "This function is only available on Termux Android devices using aarch64 (64-bit) and armv7l (32-bit)\n"; \
fi
# uninstaller
.PHONY: uninstall-termux
uninstall-termux:
@if [ -f /data/data/com.termux/files/usr/bin/termux-open ]; then \
printf " ------------------------------------- \n"; \
printf " pmt uninstaller \n"; \
printf " ------------------------------------- \n"; \
rm /data/data/com.termux/files/usr/bin/pmt || exit 1; \
printf " \n"; \
printf "Success.\n\n"; \
else \ else \
printf "This function is only available on Termux Android devices using aarch64 (64-bit) and armv7l (32-bit)\n"; \ printf "This function is only available on Termux Android devices using aarch64 (64-bit) and armv7l (32-bit)\n"; \
fi fi