mirror of
https://github.com/MustardChef/WSABuilds.git
synced 2024-11-27 13:44:16 +01:00
Build x86_64 with MindTheGappsBuilder (#94)
Co-authored-by: Howard Wu <40033067+Howard20181@users.noreply.github.com>
This commit is contained in:
parent
29c373b9fd
commit
37b59237d7
@ -306,8 +306,8 @@ if [ -z "${OFFLINE+x}" ]; then
|
|||||||
if [ -z "${CUSTOM_MAGISK+x}" ]; then
|
if [ -z "${CUSTOM_MAGISK+x}" ]; then
|
||||||
python3 generateMagiskLink.py "$MAGISK_VER" "$DOWNLOAD_DIR" "$DOWNLOAD_CONF_NAME" || abort
|
python3 generateMagiskLink.py "$MAGISK_VER" "$DOWNLOAD_DIR" "$DOWNLOAD_CONF_NAME" || abort
|
||||||
fi
|
fi
|
||||||
if [ "$GAPPS_BRAND" = "OpenGApps" ]; then
|
if [ "$GAPPS_BRAND" != "none" ]; then
|
||||||
python3 generateGappsLink.py "$ARCH" "$GAPPS_VARIANT" "$DOWNLOAD_DIR" "$DOWNLOAD_CONF_NAME" || abort
|
python3 generateGappsLink.py "$ARCH" "$GAPPS_BRAND" "$GAPPS_VARIANT" "$DOWNLOAD_DIR" "$DOWNLOAD_CONF_NAME" || abort
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Download Artifacts"
|
echo "Download Artifacts"
|
||||||
|
@ -27,15 +27,19 @@ import re
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
arch = sys.argv[1]
|
arch = sys.argv[1]
|
||||||
variant = sys.argv[2]
|
brand = sys.argv[2]
|
||||||
download_dir = Path.cwd().parent / "download" if sys.argv[3] == "" else Path(sys.argv[3]).resolve()
|
variant = sys.argv[3]
|
||||||
tempScript = sys.argv[4]
|
download_dir = Path.cwd().parent / \
|
||||||
print(f"Generating OpenGApps download link: arch={arch} variant={variant}", flush=True)
|
"download" if sys.argv[4] == "" else Path(sys.argv[4]).resolve()
|
||||||
|
tempScript = sys.argv[5]
|
||||||
|
print(
|
||||||
|
f"Generating {brand} download link: arch={arch} variant={variant}", flush=True)
|
||||||
abi_map = {"x64": "x86_64", "arm64": "arm64"}
|
abi_map = {"x64": "x86_64", "arm64": "arm64"}
|
||||||
# TODO: keep it 11.0 since opengapps does not support 12+ yet
|
# TODO: keep it 11.0 since opengapps does not support 12+ yet
|
||||||
# As soon as opengapps is available for 12+, we need to get the sdk/release from build.prop and
|
# As soon as opengapps is available for 12+, we need to get the sdk/release from build.prop and
|
||||||
# download the corresponding version
|
# download the corresponding version
|
||||||
release = "11.0"
|
release = "11.0"
|
||||||
|
if brand == "OpenGApps":
|
||||||
try:
|
try:
|
||||||
res = requests.get(f"https://api.opengapps.org/list")
|
res = requests.get(f"https://api.opengapps.org/list")
|
||||||
j = json.loads(res.content)
|
j = json.loads(res.content)
|
||||||
@ -47,11 +51,19 @@ except Exception:
|
|||||||
f'https://sourceforge.net/projects/opengapps/rss?path=/{abi_map[arch]}&limit=100')
|
f'https://sourceforge.net/projects/opengapps/rss?path=/{abi_map[arch]}&limit=100')
|
||||||
link = re.search(f'https://.*{abi_map[arch]}/.*{release}.*{variant}.*\.zip/download', res.text).group().replace(
|
link = re.search(f'https://.*{abi_map[arch]}/.*{release}.*{variant}.*\.zip/download', res.text).group().replace(
|
||||||
'.zip/download', '.zip').replace('sourceforge.net/projects/opengapps/files', 'downloads.sourceforge.net/project/opengapps')
|
'.zip/download', '.zip').replace('sourceforge.net/projects/opengapps/files', 'downloads.sourceforge.net/project/opengapps')
|
||||||
|
elif brand == "MindTheGapps":
|
||||||
|
res = requests.get(
|
||||||
|
f'https://sourceforge.net/projects/wsa-mtg/rss?path=/{abi_map[arch]}&limit=100')
|
||||||
|
link = re.search(f'https://.*{abi_map[arch]}/.*\.zip/download', res.text).group().replace(
|
||||||
|
'.zip/download', '.zip').replace('sourceforge.net/projects/wsa-mtg/files', 'downloads.sourceforge.net/project/wsa-mtg')
|
||||||
|
|
||||||
print(f"download link: {link}", flush=True)
|
print(f"download link: {link}", flush=True)
|
||||||
|
|
||||||
with open(download_dir/tempScript, 'a') as f:
|
with open(download_dir/tempScript, 'a') as f:
|
||||||
f.writelines(f'{link}\n')
|
f.writelines(f'{link}\n')
|
||||||
f.writelines(f' dir={download_dir}\n')
|
f.writelines(f' dir={download_dir}\n')
|
||||||
f.writelines(f' out=OpenGApps-{arch}-{variant}.zip\n')
|
if brand == "OpenGApps":
|
||||||
|
f.writelines(f' out={brand}-{arch}-{variant}.zip\n')
|
||||||
|
elif brand == "MindTheGapps":
|
||||||
|
f.writelines(f' out={brand}-{arch}.zip\n')
|
||||||
f.close
|
f.close
|
||||||
|
@ -145,7 +145,6 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if (YesNoBox '([title]="Install GApps" [text]="Do you want to install GApps?")'); then
|
if (YesNoBox '([title]="Install GApps" [text]="Do you want to install GApps?")'); then
|
||||||
if [ -f "$DOWNLOAD_DIR"/MindTheGapps-"$ARCH".zip ]; then
|
|
||||||
GAPPS_BRAND=$(
|
GAPPS_BRAND=$(
|
||||||
Radiolist '([title]="Which GApps do you want to install?"
|
Radiolist '([title]="Which GApps do you want to install?"
|
||||||
[default]="OpenGApps")' \
|
[default]="OpenGApps")' \
|
||||||
@ -153,9 +152,6 @@ if (YesNoBox '([title]="Install GApps" [text]="Do you want to install GApps?")')
|
|||||||
'OpenGApps' "" 'on' \
|
'OpenGApps' "" 'on' \
|
||||||
'MindTheGapps' "" 'off'
|
'MindTheGapps' "" 'off'
|
||||||
)
|
)
|
||||||
else
|
|
||||||
GAPPS_BRAND="OpenGApps"
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
GAPPS_BRAND="none"
|
GAPPS_BRAND="none"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user