Skip to content

Commit 37a8145

Browse files
committed
去除安装包功能,改为官网链接
1 parent cc707b9 commit 37a8145

File tree

5 files changed

+12
-354
lines changed

5 files changed

+12
-354
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -263,67 +263,8 @@ jobs:
263263
name: windows-2022-${{ matrix.arch }}-${{ matrix.pack_mode }}
264264
path: ./zip
265265

266-
# 新增:Inno Setup 安装包构建任务
267-
installer:
268-
name: 构建安装包
269-
runs-on: windows-2022
270-
needs: [builder_matrix]
271-
if: ${{ github.event_name != 'pull_request' }}
272-
steps:
273-
- name: 检出仓库
274-
uses: actions/checkout@v4.2.2
275-
276-
- name: 下载 x64 目录模式构建结果
277-
uses: actions/download-artifact@v4
278-
with:
279-
name: windows-2022-x64-dir
280-
path: ./dist_download
281-
282-
- name: 设置 Inno Setup
283-
run: |
284-
# 下载并安装 Inno Setup
285-
curl -L -o is.exe "https://jrsoftware.org/download.php/is.exe"
286-
cmd /c "is.exe /VERYSILENT /NORESTART"
287-
echo "C:\Program Files (x86)\Inno Setup 6" >> $GITHUB_PATH
288-
289-
- name: 准备安装文件
290-
run: |
291-
# 解压构建结果
292-
Expand-Archive -Path "./dist_download/SecRandom-Windows-${{ github.ref_name }}-x64-dir.zip" -DestinationPath "./dist" -Force
293-
294-
# 确保目录结构正确
295-
if (Test-Path "./dist/SecRandom") {
296-
Move-Item "./dist/SecRandom/*" "./dist/" -Force
297-
Remove-Item "./dist/SecRandom" -Force
298-
}
299-
300-
- name: 更新版本信息
301-
if: startsWith(github.ref_name, 'v')
302-
run: |
303-
python update_version.py
304-
env:
305-
VERSION: ${{ github.ref_name }}
306-
307-
- name: 更新 Inno Setup 脚本版本
308-
if: startsWith(github.ref_name, 'v')
309-
run: |
310-
$issContent = Get-Content "installer.iss" -Raw
311-
$issContent = $issContent -replace '#define MyAppVersion "[\d\.]+"', "#define MyAppVersion \"${{ github.ref_name }}\""
312-
Set-Content "installer.iss" -Value $issContent -NoNewline
313-
314-
- name: 构建安装包
315-
run: |
316-
& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" installer.iss
317-
318-
- name: 上传安装包
319-
if: ${{ github.event_name != 'pull_request' }}
320-
uses: actions/upload-artifact@v4.4.2
321-
with:
322-
name: windows-installer
323-
path: release/SecRandom-Setup-*.exe
324-
325266
release:
326-
needs: [builder_matrix, installer]
267+
needs: [builder_matrix]
327268
if: ${{ startsWith(github.ref, 'refs/tags/') }}
328269
uses: ./.github/workflows/release.yml
329270
with:

.github/workflows/release.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ jobs:
4949
mv artifacts/windows-2022-x86-dir/* release/
5050
mv artifacts/windows-2022-x64-onefile/* release/
5151
mv artifacts/windows-2022-x86-onefile/* release/
52-
mv artifacts/windows-installer/* release/
5352
5453
- name: 计算 SHA256 值
5554
run: |
@@ -81,17 +80,15 @@ jobs:
8180
echo "**国内 下载链接**" >> ../CHANGELOG.md
8281
echo "| 平台/打包方式 | 支持架构 | 完整版 |" >> ../CHANGELOG.md
8382
echo "| --- | --- | --- |" >> ../CHANGELOG.md
84-
echo "| Windows | 安装包 | x64 | [下载](https://www.123684.com/s/9529jv-U4Fxh) |" >> ../CHANGELOG.md
83+
echo "| Windows | x86, x64 | [下载](https://www.123684.com/s/9529jv-U4Fxh) |" >> ../CHANGELOG.md
8584
echo "" >> ../CHANGELOG.md
8685
echo "**Github 镜像 下载链接**" >> ../CHANGELOG.md
8786
echo "| 镜像源 | 平台/打包方式 | 支持架构 | 完整版 |" >> ../CHANGELOG.md
8887
echo "| --- | --- | --- | --- |" >> ../CHANGELOG.md
89-
echo "| ghfast.top | Windows 安装包 | x64 | [下载 ${{ github.ref_name }}](https://ghfast.top/https://github.com/SECTL/SecRandom/releases/download/${{ github.ref_name }}/SecRandom-Setup-${{ github.ref_name }}.exe) |" >> ../CHANGELOG.md
9088
echo "| ghfast.top | Windows 目录模式 | x86 | [下载 ${{ github.ref_name }}](https://ghfast.top/https://github.com/SECTL/SecRandom/releases/download/${{ github.ref_name }}/SecRandom-Windows-${{ github.ref_name }}-x86-dir.zip) |" >> ../CHANGELOG.md
9189
echo "| ghfast.top | Windows 目录模式 | x64 | [下载 ${{ github.ref_name }}](https://ghfast.top/https://github.com/SECTL/SecRandom/releases/download/${{ github.ref_name }}/SecRandom-Windows-${{ github.ref_name }}-x64-dir.zip) |" >> ../CHANGELOG.md
9290
echo "| ghfast.top | Windows 单文件模式 | x86 | [下载 ${{ github.ref_name }}](https://ghfast.top/https://github.com/SECTL/SecRandom/releases/download/${{ github.ref_name }}/SecRandom-Windows-${{ github.ref_name }}-x86-onefile.zip) |" >> ../CHANGELOG.md
9391
echo "| ghfast.top | Windows 单文件模式 | x64 | [下载 ${{ github.ref_name }}](https://ghfast.top/https://github.com/SECTL/SecRandom/releases/download/${{ github.ref_name }}/SecRandom-Windows-${{ github.ref_name }}-x64-onefile.zip) |" >> ../CHANGELOG.md
94-
echo "| gh-proxy.com | Windows 安装包 | x64 | [下载 ${{ github.ref_name }}](https://gh-proxy.com/https://github.com/SECTL/SecRandom/releases/download/${{ github.ref_name }}/SecRandom-Setup-${{ github.ref_name }}.exe) |" >> ../CHANGELOG.md
9592
echo "| gh-proxy.com | Windows 目录模式 | x86 | [下载 ${{ github.ref_name }}](https://gh-proxy.com/https://github.com/SECTL/SecRandom/releases/download/${{ github.ref_name }}/SecRandom-Windows-${{ github.ref_name }}-x86-dir.zip) |" >> ../CHANGELOG.md
9693
echo "| gh-proxy.com | Windows 目录模式 | x64 | [下载 ${{ github.ref_name }}](https://gh-proxy.com/https://github.com/SECTL/SecRandom/releases/download/${{ github.ref_name }}/SecRandom-Windows-${{ github.ref_name }}-x64-dir.zip) |" >> ../CHANGELOG.md
9794
echo "| gh-proxy.com | Windows 单文件模式 | x86 | [下载 ${{ github.ref_name }}](https://gh-proxy.com/https://github.com/SECTL/SecRandom/releases/download/${{ github.ref_name }}/SecRandom-Windows-${{ github.ref_name }}-x86-onefile.zip) |" >> ../CHANGELOG.md

INSTALLER_GUIDE.md

Lines changed: 0 additions & 150 deletions
This file was deleted.

app/common/update_notification.py

Lines changed: 10 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -106,31 +106,19 @@ def init_ui(self):
106106
btn_layout = QHBoxLayout()
107107
btn_layout.setSpacing(10)
108108

109-
# GitHub下载按钮
110-
github_btn = PushButton(" GitHub 更新")
111-
github_btn.setIcon(FluentIcon.GITHUB)
112-
github_btn.setStyleSheet(""
109+
# 官网
110+
manual_update_btn = PushButton(" 官网 下载更新")
111+
manual_update_btn.setIcon(QIcon('./app/resource/icon/SecRandom.png'))
112+
manual_update_btn.setStyleSheet(""
113113
"QPushButton {background-color: #4a6cf7; color: white; border-radius: 8px; padding: 8px 16px; font-weight: 500; border: none;}"
114114
"QPushButton:hover {background-color: #3a5bdb;}"
115115

116116
)
117-
github_btn.setFont(QFont(load_custom_font(), 12))
118-
github_btn.clicked.connect(self.on_github_clicked)
119-
120-
# 云盘下载按钮
121-
cloud_btn = PushButton(" 123云盘 更新")
122-
cloud_btn.setIcon(FluentIcon.CLOUD)
123-
cloud_btn.setStyleSheet(""
124-
"QPushButton {background-color: #36b37e; color: white; border-radius: 8px; padding: 8px 16px; font-weight: 500; border: none;}"
125-
"QPushButton:hover {background-color: #2d8f68;}"
126-
127-
)
128-
cloud_btn.setFont(QFont(load_custom_font(), 12))
129-
cloud_btn.clicked.connect(self.on_cloud_clicked)
117+
manual_update_btn.setFont(QFont(load_custom_font(), 12))
118+
manual_update_btn.clicked.connect(self.on_manual_update_clicked)
130119

131120
# 添加到按钮布局
132-
btn_layout.addWidget(github_btn)
133-
btn_layout.addWidget(cloud_btn)
121+
btn_layout.addWidget(manual_update_btn)
134122

135123
# 添加所有组件到主布局
136124
main_layout.addLayout(title_layout)
@@ -186,24 +174,9 @@ def move_to_bottom_right(self):
186174
y = max(0, screen_geometry.height() - self.height() - 20)
187175
self.move(x, y)
188176

189-
def on_github_clicked(self):
190-
"""GitHub下载按钮点击事件"""
191-
if self.is_installer_package():
192-
# 如果是安装包版本,提供自动更新选项
193-
self.show_auto_update_dialog()
194-
else:
195-
# 压缩包版本,直接打开浏览器下载
196-
webbrowser.open("https://github.com/SECTL/SecRandom/releases/latest")
197-
self.close_with_animation()
198-
199-
def on_cloud_clicked(self):
200-
"""123云盘下载按钮点击事件"""
201-
if self.is_installer_package():
202-
# 如果是安装包版本,提供自动更新选项
203-
self.show_auto_update_dialog()
204-
else:
205-
# 压缩包版本,直接打开浏览器下载
206-
webbrowser.open("https://www.123684.com/s/9529jv-U4Fxh")
177+
def on_manual_update_clicked(self):
178+
"""官网手动更新按钮点击事件"""
179+
webbrowser.open("https://secrandom.netlify.app//download")
207180
self.close_with_animation()
208181

209182
def is_installer_package(self):

0 commit comments

Comments
 (0)