mirror of
https://github.com/MustardChef/WSABuilds.git
synced 2024-11-27 13:44:16 +01:00
Merge branch 'main' of https://github.com/LSPosed/MagiskOnWSALocal
This commit is contained in:
commit
a9f058469e
@ -294,8 +294,8 @@ RELEASE_NAME=${RELEASE_NAME_MAP[$RELEASE_TYPE]} || abort
|
|||||||
echo -e "Build: RELEASE_TYPE=$RELEASE_NAME"
|
echo -e "Build: RELEASE_TYPE=$RELEASE_NAME"
|
||||||
|
|
||||||
WSA_ZIP_PATH=$DOWNLOAD_DIR/wsa-$ARCH-$RELEASE_TYPE.zip
|
WSA_ZIP_PATH=$DOWNLOAD_DIR/wsa-$ARCH-$RELEASE_TYPE.zip
|
||||||
vclibs_PATH=$DOWNLOAD_DIR/vclibs-"$ARCH".appx
|
vclibs_PATH=$DOWNLOAD_DIR/Microsoft.VCLibs."$ARCH".14.00.Desktop.appx
|
||||||
xaml_PATH=$DOWNLOAD_DIR/xaml-"$ARCH".appx
|
xaml_PATH=$DOWNLOAD_DIR/Microsoft.UI.Xaml_"$ARCH".appx
|
||||||
MAGISK_PATH=$DOWNLOAD_DIR/magisk-$MAGISK_VER.zip
|
MAGISK_PATH=$DOWNLOAD_DIR/magisk-$MAGISK_VER.zip
|
||||||
if [ "$CUSTOM_MAGISK" ]; then
|
if [ "$CUSTOM_MAGISK" ]; then
|
||||||
if [ ! -f "$MAGISK_PATH" ]; then
|
if [ ! -f "$MAGISK_PATH" ]; then
|
||||||
@ -685,6 +685,16 @@ function Test-Administrator {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function Get-InstalledDependencyVersion {
|
||||||
|
param (
|
||||||
|
[string]\$Name,
|
||||||
|
[string]\$ProcessorArchitecture
|
||||||
|
)
|
||||||
|
process {
|
||||||
|
return Get-AppxPackage -Name \$Name | ForEach-Object { if (\$_.Architecture -eq \$ProcessorArchitecture) { \$_ } } | Sort-Object -Property Version | Select-Object -ExpandProperty Version -Last 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function Finish {
|
function Finish {
|
||||||
Clear-Host
|
Clear-Host
|
||||||
Start-Process "wsa://com.topjohnwu.magisk"
|
Start-Process "wsa://com.topjohnwu.magisk"
|
||||||
@ -703,7 +713,7 @@ If (-Not (Test-Administrator)) {
|
|||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
ElseIf ((\$args.Count -Eq 1) -And (\$args[0] -Eq "EVAL")) {
|
ElseIf ((\$args.Count -Eq 1) -And (\$args[0] -Eq "EVAL")) {
|
||||||
Start-Process powershell.exe -Args "-ExecutionPolicy Bypass -Command Set-Location '\$PSScriptRoot'; &'\$PSCommandPath'"
|
Start-Process ConHost.exe -Args "powershell -ExecutionPolicy Bypass -Command Set-Location '\$PSScriptRoot'; &'\$PSCommandPath'"
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -728,11 +738,27 @@ If (\$(Get-WindowsOptionalFeature -Online -FeatureName 'VirtualMachinePlatform')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Add-AppxPackage -ForceApplicationShutdown -ForceUpdateFromAnyVersion -Path vclibs-$ARCH.appx
|
[xml]\$Xml = Get-Content ".\AppxManifest.xml";
|
||||||
Add-AppxPackage -ForceApplicationShutdown -ForceUpdateFromAnyVersion -Path xaml-$ARCH.appx
|
\$Name = \$Xml.Package.Identity.Name;
|
||||||
|
\$ProcessorArchitecture = \$Xml.Package.Identity.ProcessorArchitecture;
|
||||||
|
\$Dependencies = \$Xml.Package.Dependencies.PackageDependency;
|
||||||
|
\$Dependencies | ForEach-Object {
|
||||||
|
If (\$_.Name -Eq "Microsoft.VCLibs.140.00.UWPDesktop") {
|
||||||
|
\$HighestInstalledVCLibsVersion = Get-InstalledDependencyVersion -Name \$_.Name -ProcessorArchitecture \$ProcessorArchitecture;
|
||||||
|
If ( \$HighestInstalledVCLibsVersion -Lt \$_.MinVersion ) {
|
||||||
|
Add-AppxPackage -ForceApplicationShutdown -ForceUpdateFromAnyVersion -Path "Microsoft.VCLibs.\$ProcessorArchitecture.14.00.Desktop.appx"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ElseIf (\$_.Name -Match "Microsoft.UI.Xaml") {
|
||||||
|
\$HighestInstalledXamlVersion = Get-InstalledDependencyVersion -Name \$_.Name -ProcessorArchitecture \$ProcessorArchitecture;
|
||||||
|
If ( \$HighestInstalledXamlVersion -Lt \$_.MinVersion ) {
|
||||||
|
Add-AppxPackage -ForceApplicationShutdown -ForceUpdateFromAnyVersion -Path "Microsoft.UI.Xaml_\$ProcessorArchitecture.appx"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
\$Installed = \$null
|
\$Installed = \$null
|
||||||
\$Installed = Get-AppxPackage -Name 'MicrosoftCorporationII.WindowsSubsystemForAndroid'
|
\$Installed = Get-AppxPackage -Name \$Name
|
||||||
|
|
||||||
If ((\$null -Ne \$Installed) -And (-Not (\$Installed.IsDevelopmentMode))) {
|
If ((\$null -Ne \$Installed) -And (-Not (\$Installed.IsDevelopmentMode))) {
|
||||||
Clear-Host
|
Clear-Host
|
||||||
|
@ -85,11 +85,11 @@ if not download_dir.is_dir():
|
|||||||
tmpdownlist = open(download_dir/tempScript, 'a')
|
tmpdownlist = open(download_dir/tempScript, 'a')
|
||||||
for i, v, f in identities:
|
for i, v, f in identities:
|
||||||
if re.match(f"Microsoft\.UI\.Xaml\..*_{arch}_.*\.appx", f):
|
if re.match(f"Microsoft\.UI\.Xaml\..*_{arch}_.*\.appx", f):
|
||||||
out_file_name = f"xaml-{arch}.appx"
|
out_file_name = f"Microsoft.UI.Xaml_{arch}.appx"
|
||||||
out_file = download_dir / out_file_name
|
out_file = download_dir / out_file_name
|
||||||
# elif re.match(f"Microsoft\.VCLibs\..+\.UWPDesktop_.*_{arch}_.*\.appx", f):
|
# elif re.match(f"Microsoft\.VCLibs\..+\.UWPDesktop_.*_{arch}_.*\.appx", f):
|
||||||
# out_file = download_dir / "vclibs.appx"
|
# out_file_name = f"Microsoft.VCLibs.140.00.UWPDesktop_{arch}.appx"
|
||||||
# out_file_name = "vclibs.appx"
|
# out_file = download_dir / out_file_name
|
||||||
elif re.match(f"MicrosoftCorporationII\.WindowsSubsystemForAndroid_.*\.msixbundle", f):
|
elif re.match(f"MicrosoftCorporationII\.WindowsSubsystemForAndroid_.*\.msixbundle", f):
|
||||||
out_file_name = f"wsa-{arch}-{release_type}.zip"
|
out_file_name = f"wsa-{arch}-{release_type}.zip"
|
||||||
out_file = download_dir / out_file_name
|
out_file = download_dir / out_file_name
|
||||||
@ -111,5 +111,4 @@ for i, v, f in identities:
|
|||||||
tmpdownlist.writelines(f' out={out_file_name}\n')
|
tmpdownlist.writelines(f' out={out_file_name}\n')
|
||||||
tmpdownlist.writelines(f'https://aka.ms/Microsoft.VCLibs.{arch}.14.00.Desktop.appx\n')
|
tmpdownlist.writelines(f'https://aka.ms/Microsoft.VCLibs.{arch}.14.00.Desktop.appx\n')
|
||||||
tmpdownlist.writelines(f' dir={download_dir}\n')
|
tmpdownlist.writelines(f' dir={download_dir}\n')
|
||||||
tmpdownlist.writelines(f' out=vclibs-{arch}.appx\n')
|
|
||||||
tmpdownlist.close()
|
tmpdownlist.close()
|
||||||
|
Loading…
Reference in New Issue
Block a user