1 Commits

Author SHA1 Message Date
2aa6170830 Update: microg downloading; workflow; readme.md
Signed-off-by: Lev Rusanov <30170278+JDM170@users.noreply.github.com>
2024-05-01 12:23:22 +07:00
4 changed files with 29 additions and 18 deletions

View File

@@ -56,7 +56,7 @@ jobs:
run: |
Get-ChildItem Temp\Temp -Recurse -Force
$Parameters = @{
Path = "Temp\revanced.apk", "Temp\microg.apk"
Path = "Temp\revanced.apk", "Temp\microg.apk", "Temp\microg-hw.apk"
DestinationPath = "ReVanced.zip"
CompressionLevel = "Fastest"
Force = $true

View File

@@ -112,14 +112,21 @@ $Parameters = @{
UseBasicParsing = $true
Verbose = $true
}
$URL = (Invoke-RestMethod @Parameters).assets.browser_download_url
$Parameters = @{
Uri = $URL
Outfile = "$WorkingFolder\ReVanced\microg.apk"
UseBasicParsing = $true
Verbose = $true
$URL = (Invoke-RestMethod @Parameters).assets
foreach($url in $URL) {
if ($url.name.Contains("-hw-")) {
$url.name = "microg-hw.apk"
} else {
$url.name = "microg.apk"
}
$Parameters = @{
Uri = $url.browser_download_url
Outfile = "$WorkingFolder\ReVanced\$($url.name)"
UseBasicParsing = $true
Verbose = $true
}
Invoke-RestMethod @Parameters
}
Invoke-RestMethod @Parameters
# Sometimes older version of zulu-jdk causes conflict, so remove older version before proceeding.
if (Test-Path -Path "$WorkingFolder\ReVanced\jdk")

View File

@@ -30,9 +30,7 @@ Trigger the [`Build`](https://github.com/JDM170/ReVanced_Builder/actions/workflo
## Requirements if you compile locally
* Windows 10 x64 or Windows 11
* Windows PowerShell 5.1
* PowerShell 7 won't work due to it doesn't contain Trident HTML parser, so I have to use a 3rd party parser [AngleSharp](https://github.com/AngleSharp/AngleSharp);
* If you still want it, [get](https://github.com/JDM170/ReVanced_Builder/blob/main/.github/workflows/Build.yml) code from Actions (it's run in PowerShell 7).
* Windows PowerShell 5.1/7
## Links

View File

@@ -5,14 +5,20 @@ $Parameters = @{
Verbose = $true
}
$apiResult = Invoke-RestMethod @Parameters
$URL = $apiResult.assets.browser_download_url
$TAG = $apiResult.tag_name
$Parameters = @{
Uri = $URL
Outfile = "Temp\microg.apk"
UseBasicParsing = $true
Verbose = $true
foreach($url in $apiResult.assets) {
if ($url.name.Contains("-hw-")) {
$url.name = "microg-hw.apk"
} else {
$url.name = "microg.apk"
}
$Parameters = @{
Uri = $url.browser_download_url
Outfile = "Temp\$($url.name)"
UseBasicParsing = $true
Verbose = $true
}
Invoke-RestMethod @Parameters
}
Invoke-RestMethod @Parameters
echo "MicroGTag=$TAG" >> $env:GITHUB_ENV