Skip to content

Commit 65eaa73

Browse files
committed
修改 workflow 用于自动构建打包
1 parent 556c8af commit 65eaa73

File tree

5 files changed

+58
-20
lines changed

5 files changed

+58
-20
lines changed

.github/workflows/msbuild.yml renamed to .github/workflows/build_pack.yml

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ name: MSBuild
77

88
on:
99
push:
10-
branches: [ "main", "dev", "fix" ]
10+
branches:
11+
- '*'
1112
pull_request:
12-
branches: [ "main", "dev", "fix" ]
13+
branches:
14+
- '*'
1315

1416
env:
1517
# Path to the solution file relative to the root of the project.
@@ -41,4 +43,28 @@ jobs:
4143
working-directory: ${{env.GITHUB_WORKSPACE}}
4244
# Add additional options to the MSBuild command line here (like platform or verbosity level).
4345
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
44-
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}}
46+
run: |
47+
msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=x86 ${{env.SOLUTION_FILE_PATH}}
48+
msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=x64 ${{env.SOLUTION_FILE_PATH}}
49+
50+
- name: Package
51+
run: |
52+
mkdir dist/
53+
mkdir dist/x86/
54+
mkdir dist/x64/
55+
56+
mv x64/Release/HelpUploadFiles.exe dist/x64/
57+
mv x64/Release/WorkDll.dll dist/x64/
58+
59+
mv Release/HelpUploadFiles.exe dist/x86/
60+
mv Release/WorkDll.dll dist/x86/
61+
mv documents/SkinBackup/*.* dist/x86/
62+
63+
mv Release/Startup.exe dist/
64+
65+
66+
- name: Upload a Build Artifact
67+
uses: actions/upload-artifact@v4.3.1
68+
with:
69+
name: HelpUploadFiles
70+
path: dist/

HelpUploadFiles/CMainDlg.cpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "pch.h"
1+
#include "pch.h"
22
#include "CMainDlg.h"
33

44
CMainDlg* CMainDlg::singleton = new CMainDlg;
@@ -36,7 +36,7 @@ VOID CMainDlg::OnDlgInit()
3636
this->haveInject = false;
3737

3838
this->hInjectWnd = NULL;
39-
SetDlgItemText(this->hDlg, IDC_CAPTUREWND, _T("长按鼠标开启捕获"));
39+
SetDlgItemText(this->hDlg, IDC_CAPTUREWND, _T("长按鼠标开启捕获"));
4040

4141
this->hListBox = GetDlgItem(this->hDlg, IDC_LIST1);
4242
this->hIcon = LoadIcon(this->hInst, MAKEINTRESOURCE(IDI_HELPUPLOADFILES));
@@ -51,7 +51,7 @@ VOID CMainDlg::OnDlgInit()
5151

5252
void CMainDlg::OnCommand()
5353
{
54-
// TODO: 在此处添加实现代码.
54+
// TODO: 在此处添加实现代码.
5555
switch (LOWORD(this->wParam))
5656
{
5757
case IDCANCEL:
@@ -111,7 +111,7 @@ void CMainDlg::OnRemove()
111111
CIgnoreFileManager::getSingleton()->removeIgnoreFile(this->szInput);
112112
ListBox_DeleteString(this->hListBox, curSel);
113113

114-
// 设置下一个选中的位置
114+
// 设置下一个选中的位置
115115
if (curSel > 0) {
116116
curSel--;
117117
}
@@ -147,30 +147,30 @@ void CMainDlg::OnDropFile()
147147
{
148148
HDROP hDrop = (HDROP)this->wParam;
149149
if (!isHaveInject()) {
150-
DragFinish(hDrop); // 结束此次拖拽
150+
DragFinish(hDrop); // 结束此次拖拽
151151
return;
152152
}
153153

154-
if (IDCANCEL == MessageBox(this->hDlg, _T("检测到拖拽文件,是否添加到忽略列表?"), _T("提示"), MB_ICONQUESTION | MB_OKCANCEL | MB_DEFBUTTON1)) {
155-
DragFinish(hDrop); // 结束此次拖拽
154+
if (IDCANCEL == MessageBox(this->hDlg, _T("检测到拖拽文件,是否添加到忽略列表?"), _T("提示"), MB_ICONQUESTION | MB_OKCANCEL | MB_DEFBUTTON1)) {
155+
DragFinish(hDrop); // 结束此次拖拽
156156
return;
157157
}
158158

159159
UINT numFiles = DragQueryFile(hDrop, 0xFFFFFFFF, NULL, 0);
160160

161-
// 此功能从 C++ 17 开始支持
161+
// 此功能从 C++ 17 开始支持
162162
namespace fs = std::filesystem;
163163

164164
for (UINT i = 0; i < numFiles; i++)
165165
{
166166
//TCHAR szFileName[MAX_PATH];
167167
DragQueryFile(hDrop, i, this->szInput, MAX_PATH);
168168

169-
// 在这里处理拖放的文件,比如显示文件名
169+
// 在这里处理拖放的文件,比如显示文件名
170170
fs::path path = this->szInput;
171171
_tcscpy_s(this->szInput, _countof(this->szInput), path.filename().c_str());
172172

173-
// 拖拽将逃逸正则规则
173+
// 拖拽将逃逸正则规则
174174
std::swprintf(this->szInput, _countof(this->szInput), _T("%s"), CEscapeRegex::escapeRegex(this->szInput).c_str());
175175

176176
DoAdd();
@@ -190,7 +190,7 @@ void CMainDlg::OnMouseMove()
190190
GetCursorPos(&pt);
191191
HWND hWnd = WindowFromPoint(pt);
192192
if (hWnd == this->hInjectWnd) {
193-
// 窗口未发送变化,不处理
193+
// 窗口未发送变化,不处理
194194
return;
195195
}
196196
this->hInjectWnd = hWnd;
@@ -223,9 +223,9 @@ void CMainDlg::OnLButtonUp()
223223
SetCursor(this->hOldCur);
224224

225225
TCHAR sz[MAX_PATH];
226-
std::swprintf(sz, _countof(sz), _T("是否为窗口 %s 加载赋能模块"), this->szTitle);
226+
std::swprintf(sz, _countof(sz), _T("是否为窗口 %s 加载赋能模块"), this->szTitle);
227227

228-
if (IDOK == MessageBox(this->hDlg, sz, _T("加载赋能模块"), MB_ICONQUESTION | MB_OKCANCEL)) {
228+
if (IDOK == MessageBox(this->hDlg, sz, _T("加载赋能模块"), MB_ICONQUESTION | MB_OKCANCEL)) {
229229
OnInject();
230230
}
231231
}
@@ -236,16 +236,16 @@ bool CMainDlg::isHaveInject()
236236
bool b = this->haveInject;
237237
if (!b) {
238238
TCHAR sz[MAX_PATH];
239-
std::swprintf(sz, _countof(sz), _T("尚未注入赋能模块,请先完成注入操作"));
240-
MessageBox(this->hDlg, sz, _T("提示"), MB_ICONWARNING);
239+
std::swprintf(sz, _countof(sz), _T("尚未注入赋能模块,请先完成注入操作"));
240+
MessageBox(this->hDlg, sz, _T("提示"), MB_ICONWARNING);
241241
}
242242
return b;
243243
}
244244

245245

246246
void CMainDlg::OnSetProcessId()
247247
{
248-
// TODO: 在此处添加实现代码.
248+
// TODO: 在此处添加实现代码.
249249
INT_PTR res = DialogBox(hInst, MAKEINTRESOURCE(IDD_SETPROCESSDLG), this->hDlg, CSetProcessDlg::SetProcess);
250250
if (res == IDCANCEL) {
251251
return;

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# 🍕HelpUploadFiles
22

3+
![GitHub license](https://img.shields.io/github/license/KrxkGit/HelpUploadFiles) ![GitHub last commit](https://img.shields.io/github/last-commit/KrxkGit/HelpUploadFiles/dev) [![GitHub stars](https://img.shields.io/github/stars/KrxkGit/HelpUploadFiles.svg?style=social)](https://github.com/KrxkGit/HelpUploadFiles)
4+
35
## 🍺简介 - Introduction
46

57
***HelpUploadFiles (星空上传助手)*** 是一款 **辅助上传** 工具。我们知道,*git* 提供了 **.gitignore** 文件用于根据规则忽略某些文件的上传,但是这个功能仅限于 *git*,还有很多场景涉及**文件的上传**,比如我们可能需要将某些文件上传到网盘,但是大部分网盘并不具备 ***根据规则忽略指定文件*** 的功能,这十分不方便。另外,还存在着许许多多的上传文件的场景,此时,***HelpUploadFiles*** 油然而生!
@@ -10,6 +12,16 @@
1012

1113
Since there are no special rules required to ignore uploading for individual files, HelpUploadFiles is primarily aimed at scenarios involving folder uploads.
1214

15+
## 🔥软件包的获取
16+
17+
1. 可前往 *Actions* 区下载最新特性 **HelpUploadFiles** 包。
18+
2. 可前往 *Releases* 区下载稳定版本的 **HelpUploadFiles** 包。
19+
20+
## 🔥Package Acquisition
21+
22+
1. You can go to the *Actions* section to download the latest feature package **HelpUploadFiles**.
23+
2. You can go to the *Releases* section to download the stable version of the **HelpUploadFiles** package.
24+
1325
## 🍺文件上传概念的推广 - Expansion of File Upload Concepts
1426

1527
***HelpUploadFiles*** 涉及的文件上传并不仅仅局限于将本机文件上传到网盘这种场景,在 ***HelpUploadFiles*** 中,凡是需要 **将某个文件夹发送到某一个接口** 的操作均可推广为文件上传。
@@ -81,7 +93,7 @@ The following scenarios have been verified and are operational:
8193
## 📍使用注意事项
8294

8395
1. ***HelpUploadFiles*** 分为 ***32位******64位*** 两个版本,需要根据不同的上传接口选择不同的版本,如目前百度网盘客户端是32位的,则需要使用32位版本的 ***HelpUploadFiles***;而64位系统的Edge浏览器是64位程序,则需要使用64位版本的 ***HelpUploadFiles***
84-
2. 目前版本(v1.0.2)仅支持同时拦截一个进程的文件上传行为,值得注意的是 ***32位 与 64位版本 加起来一共能同时拦截一个进程***。且 ***添加/移除*** 忽略列表的操作 **仅对当前拦截的进程有效,若切换进程,即使重新注入,也需要重新添加忽略列表(移除后重新添加),否则将无效。** 这是由于目前采用的进程通信方案导致的。
96+
2. 目前版本(v1.0.3)仅支持同时拦截一个进程的文件上传行为,值得注意的是 ***32位 与 64位版本 加起来一共能同时拦截一个进程***。且 ***添加/移除*** 忽略列表的操作 **仅对当前拦截的进程有效,若切换进程,即使重新注入,也需要重新添加忽略列表(移除后重新添加),否则将无效。** 这是由于目前采用的进程通信方案导致的。
8597
3. 对于下方输入框手动输入的忽略规则,将采用 **C++ 正则表达式规则**
8698
4. 对于拖拽上传的文件,将自动进行转义使其符合 **C++正则表达式规则**
8799

documents/SkinBackup/Gloss.ssk

119 KB
Binary file not shown.

documents/SkinBackup/SkinPPWTL.dll

536 KB
Binary file not shown.

0 commit comments

Comments
 (0)