代码拉取完成,页面将自动刷新
#!/usr/bin/env perl
use strict;
use warnings;
use FindBin qw($Bin);
use lib $Bin;
use Xposed;
use Archive::Zip qw(:ERROR_CODES :CONSTANTS);
use Data::Dumper;
use File::Basename;
use File::Copy;
use File::Path qw(make_path remove_tree);
use Getopt::Std;
use POSIX qw(strftime);
use Tie::IxHash;
use Term::ANSIColor;
our $VERSION = '1.0';
my %opts;
$| = 1;
# Main routine
sub main() {
$Getopt::Std::STANDARD_HELP_VERSION = 1;
getopts('') || exit 2;
# Load the config file
print_status("Loading config file $Bin/build.conf...", 0);
$Xposed::cfg = Xposed::load_config("$Bin/build.conf") || exit 1;
# Check some build requirements
print_status('Checking requirements...', 0);
Xposed::check_requirements() || exit 1;
print_status('Creating ZIP archives...', 0);
foreach my $platform ('arm', 'x86', 'arm64', 'armv5') {
create_zip($platform) if -d "$Bin/zipstatic/$platform" || exit 1;
}
print_status('Done!', 0);
}
sub create_zip() {
my $platform = shift;
# Create a new ZIP file
my $zip = Archive::Zip->new();
$zip->addTree($Bin . '/zipstatic/_uninstaller/', '') == AZ_OK || return 0;
$zip->addTree($Bin . '/zipstatic/' . $platform . '/', '') == AZ_OK || return 0;
# Set last modification time to "now"
my $now = time();
foreach my $member($zip->members()) {
$member->setLastModFileDateTimeFromUnix($now);
}
# Write the ZIP file to disk
my $outdir = $Xposed::cfg->val('General', 'outdir');
my $zipname = sprintf('%s/uninstaller/xposed-uninstaller-%s-%s.zip', $outdir, strftime('%Y%m%d', localtime()), $platform);
make_path(dirname($zipname));
print "$zipname\n";
$zip->writeToFileNamed($zipname) == AZ_OK || return 0;
Xposed::sign_zip($zipname);
Xposed::gpg_sign($zipname) if Xposed::should_gpg_sign();
return 1;
}
sub HELP_MESSAGE() {
}
sub VERSION_MESSAGE() {
print "Xposed uninstaller creation script, version $VERSION\n";
}
main();
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。