Skip to content

Commit c291e0a

Browse files
author
liuchuancong
committed
添加mxis
1 parent 1c7b4b7 commit c291e0a

4 files changed

Lines changed: 55 additions & 9 deletions

File tree

.github/workflows/release.yml

Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,18 @@ jobs:
9999
100100
- name: Install fastforge
101101
run: dart pub global activate fastforge
102-
102+
103+
- name: Decode MSIX Certificate
104+
shell: pwsh
105+
run: |
106+
$certBase64 = "${{ secrets.CERTIFICATE }}"
107+
if ([string]::IsNullOrEmpty($certBase64)) { Write-Error "Secret CERTIFICATE is empty!"; exit 1 }
108+
$certBytes = [System.Convert]::FromBase64String($certBase64)
109+
110+
$certPath = Join-Path -Path (Get-Location) -ChildPath "CERTIFICATE.pfx"
111+
[IO.File]::WriteAllBytes($certPath, $certBytes)
112+
113+
echo "MSIX_CERT_PATH=$certPath" >> $env:GITHUB_ENV
103114
- name: Get version from pubspec.yaml
104115
id: get_version
105116
shell: pwsh
@@ -114,20 +125,38 @@ jobs:
114125
}
115126
Write-Error "Version not found"; exit 1
116127
117-
- name: Package Windows exe
118-
run: fastforge package --platform windows --targets exe
128+
# 👇 关键修改:同时打包 exe 和 msix
129+
- name: Package Windows (exe + msix)
130+
run: fastforge package --platform windows --targets exe,msix
119131

120-
- name: Rename installer
132+
- name: Rename installers
133+
shell: pwsh
134+
env:
135+
MSIX_CERT_PATH: ${{ env.MSIX_CERT_PATH }}
136+
MSIX_CERT_PASSWORD: xxxx
121137
run: |
122138
$VERSION = "${{ steps.get_version.outputs.version }}"
123-
$SRC = Get-ChildItem "dist\$VERSION" -Filter "*.exe" | Select-Object -First 1
124-
Copy-Item $SRC.FullName "PureLive-$VERSION-windows-x64-setup.exe"
139+
$DIST_DIR = "dist"
125140
126-
- name: 上传Windows安装包
141+
# Find and rename .exe
142+
$EXE_FILE = Get-ChildItem $DIST_DIR -Recurse -Filter "*.exe" | Select-Object -First 1
143+
if ($EXE_FILE) {
144+
Copy-Item $EXE_FILE.FullName "PureLive-$VERSION-windows-x64-setup.exe"
145+
}
146+
147+
# Find and rename .msix
148+
$MSIX_FILE = Get-ChildItem $DIST_DIR -Recurse -Filter "*.msix" | Select-Object -First 1
149+
if ($MSIX_FILE) {
150+
Copy-Item $MSIX_FILE.FullName "PureLive-$VERSION-windows-x64.msix"
151+
}
152+
153+
- name: 上传Windows安装包(exe + msix)
127154
uses: actions/upload-artifact@v4
128155
with:
129156
name: windows-installer
130-
path: PureLive-${{ steps.get_version.outputs.version }}-windows-x64-setup.exe
157+
path: |
158+
PureLive-${{ steps.get_version.outputs.version }}-windows-x64-setup.exe
159+
PureLive-${{ steps.get_version.outputs.version }}-windows-x64.msix
131160
retention-days: 1
132161

133162
build-macos:
@@ -214,6 +243,8 @@ jobs:
214243
|Windows/macOS/Android版|[pure_live](https://github.com/liuchuancong/pure_live/releases/latest)|
215244
216245
### 🖥️ Windows 版
246+
- **EXE 安装包**:适合所有用户,自动创建快捷方式
247+
- **MSIX 包**:现代应用格式,支持干净卸载(需 Windows 10/11)
217248
- 适配:Win10/11 (x64),自动创建桌面快捷方式
218249
- 功能:多直播源、WebDAV、弹幕显示
219250
- 快捷键:空格(播放/暂停) \| ESC(全屏切换) \| 上下键(音量) \| R(刷新)
@@ -244,6 +275,7 @@ jobs:
244275
artifacts/android-apks/app-arm64-v8a-release.apk
245276
artifacts/android-apks/app-x86_64-release.apk
246277
artifacts/windows-installer/*.exe
278+
artifacts/windows-installer/*.msix
247279
artifacts/macos-dmg/*.dmg
248280
249281
- name: 输出状态

distribute_options.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
variables:
2+
CERTIFICATE: ${CERTIFICATE}
3+
output: dist/

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ flutter_intl:
236236
# windows msix package
237237
msix_config:
238238
display_name: 纯粹直播
239-
msix_version: 1.0.0.98
239+
msix_version: 1.2.0.10
240240
logo_path: assets/icons/icon.png
241241
certificate_path: assets/keystore/CERTIFICATE.pfx
242242
certificate_password: xxxx
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
display_name: 纯粹直播
2+
msix_version: 1.2.0.10
3+
publisher: "O=puretech.com, S=Some-State, C=CN"
4+
identity_name: com.mystyle.purelive
5+
logo_path: assets/icons/icon.png
6+
capabilities: internetClient
7+
languages: zh-cn
8+
install_certificate: "false"
9+
certificate_path: ${MSIX_CERT_PATH}
10+
certificate_password: xxxx
11+
signtool_options: /td SHA256

0 commit comments

Comments
 (0)