Skip to content

Commit

Permalink
Update softmanager
Browse files Browse the repository at this point in the history
  • Loading branch information
DustinWin committed Dec 27, 2024
0 parents commit 56488dc
Show file tree
Hide file tree
Showing 3 changed files with 262 additions and 0 deletions.
215 changes: 215 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,215 @@
name: Update QQPCSoftMgr
on:
workflow_dispatch:
schedule:
- cron: "0 10 * * 5"
push:
branches:
- main
paths-ignore:
- "**/README.md"

jobs:
environment:
runs-on: ubuntu-latest
outputs:
update_time: ${{ steps.environment.outputs.update_time }}
qqpcmgr_version: ${{ steps.environment.outputs.qqpcmgr_version }}
executable_file: ${{ steps.environment.outputs.executable_file }}
steps:
- name: Checkout codebase
uses: actions/checkout@main

- name: Set variables
id: environment
run: |
echo "update_time=$(date -d '+8 hours' +%Y-%m-%d)" >> $GITHUB_OUTPUT
echo "qqpcmgr_version=$(ls *.exe | sed 's/^[^0-9]*//' | sed 's/\..*//' | sed 's/_/\./g')" >> $GITHUB_OUTPUT
echo "executable_file=$(ls *.exe)" >> $GITHUB_OUTPUT
extract:
runs-on: windows-latest
needs: environment
env:
version: ${{ needs.environment.outputs.qqpcmgr_version }}
executable: ${{ needs.environment.outputs.executable_file }}
steps:
- name: Checkout codebase
uses: actions/checkout@main

- name: Set locale and language in China
id: extract
run: |
Set-WinSystemLocale zh-CN
Set-Culture zh-CN
Set-WinUILanguageOverride zh-CN
$env:LANG = 'zh-CN'
- name: Install `QQPCMgr` and running 60s
run: |
Start-Process -FilePath ".\${{ env.executable }}" -ArgumentList "/S"
Start-Sleep -Seconds 60
shell: pwsh

- name: Update libraries and wating 10s
run: |
Start-Process -FilePath "C:\Program Files (x86)\Tencent\QQPCMgr\${{ env.version }}\QMUpdate\QQPCMgrUpdate.exe" -ArgumentList "/datafile /elevated" -Verb RunAs
Start-Sleep -Seconds 10
shell: pwsh

- name: Open `QQPCSoftMgr` and running 120s
run: |
Start-Process -FilePath "C:\Program Files (x86)\Tencent\QQPCMgr\${{ env.version }}\QQPCSoftMgr.exe"
Start-Sleep -Seconds 120
shell: pwsh

- name: Copy files
run: |
md "${{ env.version }}" libraries upload_files
taskkill /f /t /im QQPC*
taskkill /f /t /im QMDL*
robocopy /e "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\Image" "${{ env.version }}\Image" /im /is /it /mt:32
robocopy /e "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\Images" "${{ env.version }}\Images" /im /is /it /mt:32
robocopy /e "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\plugins\SoftUninstall" "${{ env.version }}\plugins\SoftUninstall" /im /is /it /mt:32
robocopy /e "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\qbclient" "${{ env.version }}\qbclient" /im /is /it /mt:32
robocopy /e "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\qmsoftmgrupdate" "${{ env.version }}\qmsoftmgrupdate" /im /is /it /mt:32
del /f /s /q "${{ env.version }}\qmsoftmgrupdate\updatedate.txt"
robocopy /e "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\SoftMgr" "${{ env.version }}\SoftMgr" /im /is /it /mt:32
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\Soft*" "${{ env.version }}"
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\QQPCSoft*" "${{ env.version }}"
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\beacon_sdk.dll" "${{ env.version }}"
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\Common.dll" "${{ env.version }}"
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\dr.dll" "${{ env.version }}"
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\FastUninstScpt.etf" "${{ env.version }}"
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\GF.dll" "${{ env.version }}"
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\GlobalConfig.etf" "${{ env.version }}"
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\LoadError.html" "${{ env.version }}"
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\msvcp*.dll" "${{ env.version }}"
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\p2papp.dll" "${{ env.version }}"
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\PackageMgr.dll" "${{ env.version }}"
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\ptrate.dll" "${{ env.version }}"
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\QMCommon.dll" "${{ env.version }}"
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\QMDL.exe" "${{ env.version }}"
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\QMDlder.dll" "${{ env.version }}"
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\QMDns.dll" "${{ env.version }}"
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\QMExt.dll" "${{ env.version }}"
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\QMGuid*.dll" "${{ env.version }}"
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\QMIpc*.dll" "${{ env.version }}"
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\QMNetworkMgr*" "${{ env.version }}"
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\QMPrivilege*" "${{ env.version }}"
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\QMScriptHost.dll" "${{ env.version }}"
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\QMStuck*.dll" "${{ env.version }}"
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\QMSysRepProv*" "${{ env.version }}"
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\QQFileFlt.dll" "${{ env.version }}"
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\QQPCExternal.exe" "${{ env.version }}"
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\QQPCMgr.exe" "${{ env.version }}"
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\SmartInstall.dll" "${{ env.version }}"
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\TAVEng.dll" "${{ env.version }}"
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\TenioDL*.dll" "${{ env.version }}"
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\TSSysKitProxy.dll" "${{ env.version }}"
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\vccorlib*.dll" "${{ env.version }}"
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\vcomp*.dll" "${{ env.version }}"
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\vccorlib*.dll" "${{ env.version }}"
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\vcruntime*.dll" "${{ env.version }}"
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\xGraphic*.dll" "${{ env.version }}"
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\zlib.dll" "${{ env.version }}"
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\GlobalConfig.etf" "libraries"
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\SoftPolicy.etf" "libraries"
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\SoftVerInfo.etf" "libraries"
shell: cmd

- name: Install `WinRAR`
run: choco install winrar -y

- name: Zip `QQPCSoftMgr` files
run: |
"%PROGRAMFILES%\WinRAR\WinRAR.exe" a -afzip QQPCSoftMgr.zip "${{ env.version }}\*" -r
shell: cmd

- name: Zip `libraries` files
run: |
"%PROGRAMFILES%\WinRAR\WinRAR.exe" a -afzip libraries.zip libraries\* -r
shell: cmd

- name: Create `WinRAR` sfx config
run: |
$content = @"
Path="%PROGRAMFILES(X86)%\Tencent\QQPCMgr"
Setup="${{ env.version }}\QQPCSoftMgr.exe"
Title=软件管理
Text
{
提取自腾讯电脑管家 ${{ env.version }} 版本
}
Silent=0
Overwrite=1
Shortcut=D, "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\QQPCSoftMgr.exe", , 安装、升级和卸载应用程序, 软件管理, "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\Images\softmgr.ico"
"@
$bytes = [System.Text.Encoding]::GetEncoding("GB2312").GetBytes($content)
[System.IO.File]::WriteAllBytes("config.txt", $bytes)
- name: Create self-extracting exe and copy files
run: |
"%PROGRAMFILES%\WinRAR\WinRAR.exe" a -sfx -z"config.txt" -r QQPCSoftMgr.exe "${{ env.version }}\*"
copy /y QQPCSoftMgr.zip upload_files
copy /y QQPCSoftMgr.exe upload_files
copy /y libraries.zip upload_files
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\GlobalConfig.etf" "upload_files"
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\SoftPolicy.etf" "upload_files"
copy /y "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\${{ env.version }}\SoftVerInfo.etf" "upload_files"
shell: cmd

- name: Upload files to workspace
uses: actions/upload-artifact@v4
with:
name: QQPCSoftMgr
path: upload_files/*
compression-level: 9

push:
runs-on: ubuntu-latest
needs:
- environment
- extract
env:
update_TIME: ${{ needs.environment.outputs.update_time }}
qqpcmgr_VERSION: ${{ needs.environment.outputs.qqpcmgr_version }}
steps:
- name: Checkout codebase
uses: actions/checkout@main

- name: Download files from workspace
uses: actions/download-artifact@v4
with:
path: .

- name: Release and upload `QQPCSoftMgr` assets
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
release_name: QQPCSoftMgr
tag: QQPCSoftMgr
overwrite: true
body: |
[腾讯软件管理](https://pc.qq.com)免安装绿色版提取自[腾讯电脑管家](https://guanjia.qq.com) v${{ env.qqpcmgr_VERSION }} 版本
软件库文件更新于 ${{ env.update_TIME }}
file_glob: true
file: ./QQPCSoftMgr/*

- name: Purge jsDelivr CDN
id: push
run: |
cd ./QQPCSoftMgr/ || exit 1
for file in $(ls); do
curl -i "https://purge.jsdelivr.net/gh/${{ github.repository }}@QQPCSoftMgr/${file}"
done
- name: Delete old workflow runs
uses: Mattraks/delete-workflow-runs@v2
with:
token: ${{ github.token }}
repository: ${{ github.repository }}
retain_days: 3
keep_minimum_runs: 1
Binary file added PCMgr_Setup_15_6_23123_201.exe
Binary file not shown.
47 changes: 47 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# 一、 说明
1. 每周五下午 6 点(北京时间 UTC+8)自动构建
2. [软件管理](https://pc.qq.com)提取自[腾讯电脑管家](https://guanjia.qq.com) 15.6.23123.201 版本(v15 系列版本已停更)
3. 软件库文件包含 SoftPolicy.etf 和 SoftVerInfo.etf(控制“软件库”版本),以及 GlobalConfig.etf(控制“首页”和“游戏”栏目中的推荐列表)

# 二、 软件特色
1. 免安装绿色版
2. 可下载、安装、升级、卸载软件
3. 可一键卸载 Windows 10 或 Windows 11 UWP 应用
4. 收录国内外主流软件,安装升级更方便
5. 可自动适配屏幕 DPI,显示更清晰

# 三、 使用方法
## 1. 首次使用
- ① 首次使用请下载完整绿色包 QQPCSoftMgr.zip,解压后得到“*版本号*”文件夹。然后下载软件库更新文件 libraries.zip
,解压里面的 .etf 文件到“*版本号*”文件夹
-**将“*版本号*”文件夹移动到 *C:\Program Files (x86)\Tencent\QQPCMgr* 路径下(没有则新建)**,双击“*版本号*”文件夹内的“QQPCSoftMgr.exe”文件即可运行
- 注:提取自腾讯电脑管家 v15+ 版本的软件管理不可跳过第 ② 步,省略该步骤将无法运行;已上传自解压文件 QQPCSoftMgr.exe
,使用 WinRAR 制作,自解压后可直接运行软件管理

## 2. 更新软件库
- ① 编辑文本文档,粘贴如下内容:
- 注:将 `{版本号}` 替换为当前提取自腾讯电脑管家的版本号

```
@echo off
rem 结束软件管理相关进程
taskkill /f /t /im QQPCSoftMgr*
taskkill /f /t /im QMDL*
rem 更新软件库文件
curl -o "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\{版本号}\GlobalConfig.etf" -L https://cdn.jsdelivr.net/gh/DustinWin/softmanager@QQPCSoftMgr/GlobalConfig.etf
curl -o "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\{版本号}\SoftPolicy.etf" -L https://cdn.jsdelivr.net/gh/DustinWin/softmanager@QQPCSoftMgr/SoftPolicy.etf
curl -o "%PROGRAMFILES(X86)%\Tencent\QQPCMgr\{版本号}\SoftVerInfo.etf" -L https://cdn.jsdelivr.net/gh/DustinWin/softmanager@QQPCSoftMgr/SoftVerInfo.etf
echo 更新软件库文件成功
pause
```
- ② 另存为 .bat 文件,右击并选择“以管理员身份运行”

# 四、 软件截图
## 1. 首页
<img src="https://github.com/user-attachments/assets/8f045103-27ac-4b70-85f6-d062a32e56fa" width="60%" />

## 2. 升级
<img src="https://github.com/user-attachments/assets/71639317-a797-4c3b-85f1-576193563852" width="60%" />

## 3. 卸载
<img src="https://github.com/user-attachments/assets/3002ae95-70cc-4c9d-b7e8-e6b05d21d431" width="60%" />

0 comments on commit 56488dc

Please sign in to comment.