Skip to content

Commit

Permalink
将压缩文件格式改为 7z
Browse files Browse the repository at this point in the history
  • Loading branch information
Zzaphkiel committed Jun 28, 2024
1 parent 1edc0f7 commit 96dda2f
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_seraphine.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
if: ${{ env.SUCCESS }} == 'true'
with:
name: Seraphine
path: .\Seraphine.zip
path: .\Seraphine.7z

release:
needs: build-seraphine
Expand Down Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions app/components/message_box.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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)

Expand All @@ -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)
Expand Down
4 changes: 3 additions & 1 deletion make.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand All @@ -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
}
8 changes: 4 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
qasync==0.27.1
py7zr==0.21.0
2 changes: 1 addition & 1 deletion sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}"}

Expand Down

0 comments on commit 96dda2f

Please sign in to comment.