diff --git a/.github/workflows/build_seraphine.yaml b/.github/workflows/build_seraphine.yaml index bf7681e0..1490c3d7 100644 --- a/.github/workflows/build_seraphine.yaml +++ b/.github/workflows/build_seraphine.yaml @@ -29,7 +29,7 @@ jobs: if: ${{ env.SUCCESS }} == 'true' with: name: Seraphine - path: .\Seraphine.zip + path: .\Seraphine.7z release: needs: build-seraphine @@ -61,7 +61,7 @@ jobs: tag: ${{ env.VERSION }} token: ${{ secrets.GITHUB_TOKEN }} replacesArtifacts: false - artifacts: Seraphine.zip + artifacts: Seraphine.7z - name: Sync to Gitee if: env.UPDATED == 'true' env: diff --git a/app/components/message_box.py b/app/components/message_box.py index 544604ca..64ed913a 100644 --- a/app/components/message_box.py +++ b/app/components/message_box.py @@ -1,10 +1,10 @@ from qasync import asyncSlot import aiohttp import os -import zipfile import shutil import sys import webbrowser +import py7zr from PyQt5.QtCore import Qt, pyqtSignal from PyQt5.QtWidgets import QPushButton, QVBoxLayout, QWidget @@ -116,7 +116,7 @@ async def __onYesButtonClicked(self): self.infoLabel.setVisible(True) self.bar.setVisible(True) - zipPath = f'{LOCAL_PATH}/Seraphine.zip' + zipPath = f'{LOCAL_PATH}/Seraphine.7z' if os.path.exists(zipPath): os.remove(zipPath) @@ -142,7 +142,7 @@ async def __onYesButtonClicked(self): self.infoLabel.setText( self.tr("Downloading finished, decompressing...")) - with zipfile.ZipFile(zipPath, 'r') as z: + with py7zr.SevenZipFile(zipPath, mode='r') as z: z.extractall(dirPath) os.remove(zipPath) diff --git a/make.ps1 b/make.ps1 index 580c08aa..0f208bd1 100644 --- a/make.ps1 +++ b/make.ps1 @@ -33,6 +33,8 @@ rm -r .\dist\Seraphine\app\components rm -r .\dist\Seraphine\app\lol rm -Path .\dist\Seraphine\app\resource\game* -r rm -r .\dist\Seraphine\app\resource\i18n\Seraphine.zh_CN.ts +rm -r .\dist\Seraphine\app\resource\bin\fix_lcu_window.c +rm -r .\dist\Seraphine\app\resource\bin\readme.md rm -r .\dist\Seraphine\app\view $files = Get-ChildItem -Path ".\dist\Seraphine\*" -Recurse | @@ -42,6 +44,6 @@ $files = Get-ChildItem -Path ".\dist\Seraphine\*" -Recurse | $files | Out-File -FilePath ".\dist\Seraphine\filelist.txt" -Encoding UTF8 if (! $dbg) { - 7z a $dest\Seraphine.zip .\dist\Seraphine\* -r + 7z a $dest\Seraphine.7z .\dist\Seraphine\* -r rm -r .\dist } diff --git a/readme.md b/readme.md index cf3afdd9..7f533616 100644 --- a/readme.md +++ b/readme.md @@ -23,15 +23,15 @@ ## 快速上手 🤗 ### 直接使用打包好的程序 -点击[这里](https://github.com/Zzaphkiel/Seraphine/releases/latest)进入发布页面,在下方找到资源中的 `Seraphine.zip`,点击下载并解压至文件夹中,双击运行其中的 `Seraphine.exe` 即可。 +点击[这里](https://github.com/Zzaphkiel/Seraphine/releases/latest)进入发布页面,在下方找到资源中的 `Seraphine.7z`,点击下载并解压至文件夹中,双击运行其中的 `Seraphine.exe` 即可。 ### 或通过本地构建 -下载项目 `zip` 压缩包解压至文件夹或通过 `git` +下载项目源码 `zip` 压缩包解压至文件夹或通过 `git` ```shell cd Seraphine git clone https://github.com/Zzaphkiel/Seraphine.git ``` -创建并激活新的 Anaconda 环境 +创建并激活新的 conda 环境 ```shell conda create -n seraphine python=3.8 conda activate seraphine @@ -112,7 +112,7 @@ pip install pyinstaller==5.13 ``` shell .\make ``` -命令结束后在目标文件夹获得 `Seraphine.zip`。 +命令结束后在目标文件夹获得 `Seraphine.7z`。 ## Riot 声明 📢 Seraphine is not endorsed by Riot Games and does not reflect the views or opinions of Riot Games or anyone officially involved in producing or managing Riot Games properties. Riot Games and all associated properties are trademarks or registered trademarks of Riot Games, Inc diff --git a/requirements.txt b/requirements.txt index d17f61e0..16a0b561 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,4 +5,5 @@ PyQt-Fluent-Widgets==1.5.7 Requests==2.32.3 aiohttp==3.9.5 psutil==5.9.8 -qasync==0.27.1 \ No newline at end of file +qasync==0.27.1 +py7zr==0.21.0 \ No newline at end of file diff --git a/sync.py b/sync.py index f58bd11e..08c13ed5 100644 --- a/sync.py +++ b/sync.py @@ -37,7 +37,7 @@ NAME = TAG_NAME BODY = f"Seraphine {TAG_NAME}" TARGET_COMMITISH = "master" -FILE_PATH = "Seraphine.zip" +FILE_PATH = "Seraphine.7z" HEADERS = {"Authorization": f"Bearer {ACCESS_TOKEN}"}