mirror of
https://github.com/k4yt3x/video2x.git
synced 2025-01-30 15:48:13 +00:00
changed setup script pyunpack to patoolib
This commit is contained in:
parent
e07848f4bf
commit
0cc67857f7
1
.github/workflows/nightly.yml
vendored
1
.github/workflows/nightly.yml
vendored
@ -44,7 +44,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
pyinstaller --noconfirm --log-level=WARN `
|
pyinstaller --noconfirm --log-level=WARN `
|
||||||
--onefile `
|
--onefile `
|
||||||
--hidden-import=patool `
|
|
||||||
--icon="images\video2x.ico" `
|
--icon="images\video2x.ico" `
|
||||||
video2x_setup.py
|
video2x_setup.py
|
||||||
- name: Collect artifacts into folder
|
- name: Collect artifacts into folder
|
||||||
|
@ -48,7 +48,6 @@ pyinstaller --noconfirm --log-level=WARN `
|
|||||||
Write-Host -ForegroundColor White "`nBuilding Video2X setup script"
|
Write-Host -ForegroundColor White "`nBuilding Video2X setup script"
|
||||||
pyinstaller --noconfirm --log-level=WARN `
|
pyinstaller --noconfirm --log-level=WARN `
|
||||||
--onefile `
|
--onefile `
|
||||||
--hidden-import=patool `
|
|
||||||
--icon="images\video2x.ico" `
|
--icon="images\video2x.ico" `
|
||||||
video2x_setup.py
|
video2x_setup.py
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
Name: Video2X Setup Script
|
Name: Video2X Setup Script
|
||||||
Creator: K4YT3X
|
Creator: K4YT3X
|
||||||
Date Created: November 28, 2018
|
Date Created: November 28, 2018
|
||||||
Last Modified: May 8, 2020
|
Last Modified: May 12, 2020
|
||||||
|
|
||||||
Editor: BrianPetkovsek
|
Editor: BrianPetkovsek
|
||||||
Editor: SAT3LL
|
Editor: SAT3LL
|
||||||
@ -217,7 +217,7 @@ class Video2xSetup:
|
|||||||
"""
|
"""
|
||||||
print('\nInstalling Anime4KCPP')
|
print('\nInstalling Anime4KCPP')
|
||||||
|
|
||||||
import pyunpack
|
import patoolib
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
# get latest release of Anime4KCPP via Github API
|
# get latest release of Anime4KCPP via Github API
|
||||||
@ -227,13 +227,14 @@ class Video2xSetup:
|
|||||||
|
|
||||||
for a in latest_release['assets']:
|
for a in latest_release['assets']:
|
||||||
if re.search(r'Anime4KCPP_CLI-.*-Win64-msvc\.7z', a['browser_download_url']):
|
if re.search(r'Anime4KCPP_CLI-.*-Win64-msvc\.7z', a['browser_download_url']):
|
||||||
anime4kcpp_zip = download(a['browser_download_url'], tempfile.gettempdir())
|
anime4kcpp_7z = download(a['browser_download_url'], tempfile.gettempdir())
|
||||||
self.trash.append(anime4kcpp_zip)
|
self.trash.append(anime4kcpp_7z)
|
||||||
|
|
||||||
# extract and rename
|
# (LOCALAPPDATA / 'video2x' / 'anime4kcpp').mkdir(parents=True, exist_ok=True)
|
||||||
# with py7zr.SevenZipFile(anime4kcpp_zip, mode='r') as archive:
|
# pyunpack.Archive(anime4kcpp_7z).extractall(LOCALAPPDATA / 'video2x' / 'anime4kcpp')
|
||||||
(LOCALAPPDATA / 'video2x' / 'anime4kcpp').mkdir(parents=True, exist_ok=True)
|
if (LOCALAPPDATA / 'video2x' / 'anime4kcpp').exists():
|
||||||
pyunpack.Archive(anime4kcpp_zip).extractall(LOCALAPPDATA / 'video2x' / 'anime4kcpp')
|
shutil.rmtree(LOCALAPPDATA / 'video2x' / 'anime4kcpp')
|
||||||
|
patoolib.extract_archive(str(anime4kcpp_7z), outdir=str(LOCALAPPDATA / 'video2x' / 'anime4kcpp'))
|
||||||
|
|
||||||
def _install_srmd_ncnn_vulkan(self):
|
def _install_srmd_ncnn_vulkan(self):
|
||||||
""" Install srmd-ncnn-vulkan
|
""" Install srmd-ncnn-vulkan
|
||||||
|
Loading…
Reference in New Issue
Block a user