forked from organicmaps/organicmaps
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: renderexpert <[email protected]>
- Loading branch information
1 parent
72eb143
commit 7339f25
Showing
7 changed files
with
73 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,3 +21,4 @@ local.properties | |
.project | ||
lint.xml | ||
.gradletasknamecache | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import requests | ||
import zipfile | ||
import os | ||
import shutil | ||
|
||
def download_vulkan_validation_layers(): | ||
# Step 1: Download zip archive | ||
url = "https://github.com/KhronosGroup/Vulkan-ValidationLayers/releases/download/vulkan-sdk-1.3.275.0/android-binaries-1.3.275.0.zip" | ||
download_path = "vulkan_sdk.zip" | ||
|
||
print("Downloading zip archive...") | ||
response = requests.get(url) | ||
with open(download_path, "wb") as f: | ||
f.write(response.content) | ||
print("Download complete.") | ||
|
||
# Step 2: Unzip archive | ||
unzip_dir = "vulkan_sdk" | ||
print("Unzipping archive...") | ||
with zipfile.ZipFile(download_path, "r") as zip_ref: | ||
zip_ref.extractall(unzip_dir) | ||
print("Unzip complete.") | ||
|
||
# Step 3: Rename unpacked folder to "jniLibs" and move it to "android/app/src/main" | ||
unpacked_folder = os.listdir(unzip_dir)[0] | ||
jniLibs_path = os.path.join(unzip_dir, "jniLibs") | ||
os.rename(os.path.join(unzip_dir, unpacked_folder), jniLibs_path) | ||
destination_path = "android/app/src/main" | ||
shutil.move(jniLibs_path, destination_path) | ||
print("Deploy complete.") | ||
|
||
# Clean up downloaded zip file and empty directories | ||
os.remove(download_path) | ||
os.rmdir(unzip_dir) | ||
print("Clean up complete.") | ||
|
||
|
||
if __name__ == '__main__': | ||
download_vulkan_validation_layers() |