3 Commits

Author SHA1 Message Date
Serendipity f21d302565 refactor: 移除未使用的Windows平台头文件包含
清理main.c中已不再需要的条件编译头文件引入,简化代码结构。
2026-03-16 18:49:47 +08:00
Serendipity adbbe099b9 docs: 添加 MIT 许可证文件
为项目添加标准的 MIT 许可证,明确软件的使用、复制、修改和分发权限。
2026-03-16 18:48:19 +08:00
Serendipity 05d4536c42 build: 添加应用程序图标资源并更新构建配置
- 新增 PathEditor.ico 图标文件及对应的资源脚本 resources.rc
- 更新 Makefile,将图标资源编译链接到最终的可执行文件中
- 更新 Inno Setup 安装脚本,为安装程序设置图标
2026-03-16 18:41:36 +08:00
7 changed files with 28 additions and 6 deletions
+21
View File
@@ -0,0 +1,21 @@
# MIT License
Copyright (c) 2026 LHY
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+5 -1
View File
@@ -19,7 +19,8 @@ LDFLAGS = -L$(LIB_DIR) -liup -liupcd -lgdi32 -lcomdlg32 -lcomctl32 -luuid -lole3
# Source
SRC = src/main.c src/utils.c src/registry.c src/callbacks.c
OBJ = $(OBJ_DIR)/main.o $(OBJ_DIR)/utils.o $(OBJ_DIR)/registry.o $(OBJ_DIR)/callbacks.o
RES = ico/resources.rc
OBJ = $(OBJ_DIR)/main.o $(OBJ_DIR)/utils.o $(OBJ_DIR)/registry.o $(OBJ_DIR)/callbacks.o $(OBJ_DIR)/resources.o
EXE = $(BIN_DIR)/PathEditor.exe
all: $(BIN_DIR) $(OBJ_DIR) $(EXE)
@@ -45,6 +46,9 @@ $(OBJ_DIR)/registry.o: src/registry.c
$(OBJ_DIR)/callbacks.o: src/callbacks.c
$(CC) $(CFLAGS) -c -o $@ $<
$(OBJ_DIR)/resources.o: ico/resources.rc
$(WINDRES) -i $< -o $@
clean:
if exist $(OBJ_DIR)\*.o del /Q $(OBJ_DIR)\*.o
if exist $(BIN_DIR)\*.exe del /Q $(BIN_DIR)\*.exe
Binary file not shown.
+1
View File
@@ -27,6 +27,7 @@ OutputBaseFilename=PathEditorSetup
Compression=lzma
SolidCompression=yes
WizardStyle=modern
SetupIconFile=d:\Code\doing_exercises\programs\PathEditor\ico\PathEditor.ico
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

+1
View File
@@ -0,0 +1 @@
IDI_ICON1 ICON "PathEditor.ico"
-5
View File
@@ -8,11 +8,6 @@
#include "registry.h"
#include "callbacks.h"
#ifdef _WIN32
#include <windows.h>
#include <direct.h>
#endif
// 全局控件定义
Ihandle *dlg, *list_path, *lbl_status;
Ihandle *btn_new, *btn_edit, *btn_browse, *btn_del, *btn_up, *btn_down;