Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Windows 安装包生成器

基于 Python + Tkinter 的图形化工具,用于将指定文件夹打包为独立的 Windows 安装程序。

功能特点

  • 图形化界面,操作简单
  • 支持自定义软件名称、版本号、发布者信息
  • 支持自定义安装包图标(ico 格式)
  • 支持添加用户协议和隐私政策
  • 自动创建桌面快捷方式和开始菜单快捷方式
  • 自动生成卸载程序,支持在 Windows 控制面板中卸载
  • 生成的安装程序自动请求管理员权限
  • 输出为独立的 exe 文件,无需依赖 Python 环境

环境要求

  • Python 3.8+
  • PyInstaller

安装依赖

pip install pyinstaller

使用方法

方式一:直接运行 exe

双击运行 dist/Windows-Installer-Creator.exe

方式二:运行 Python 脚本

python installer_builder.py

操作步骤

  1. 选择要打包的软件文件夹
  2. 设置输出安装程序路径(默认输出到桌面)
  3. 填写软件名称、版本号、发布者信息
  4. 设置默认安装位置
  5. (可选)选择主程序文件,用于创建快捷方式
  6. (可选)选择安装包图标(ico 格式,默认使用 default_icon.ico)
  7. (可选)添加用户协议和隐私政策文件
  8. 勾选安装选项(创建卸载程序、桌面快捷方式、开始菜单快捷方式)
  9. 点击"生成安装包"按钮

生成的安装程序特性

  • 单文件 exe,无需额外依赖
  • 自动请求管理员权限
  • 图形化安装向导
  • 支持自定义安装路径
  • 自动创建快捷方式
  • 自动注册卸载信息到 Windows 控制面板

项目结构

Windows-Installer-Creator-1/
├── installer_builder.py    # 主程序源码
├── .gitignore              # Git 忽略配置
├── README.md               # 项目说明
├── build/                  # PyInstaller 构建临时目录
├── dist/                   # 生成的 exe 文件
└── *.spec                  # PyInstaller 配置文件

打包为 exe

pyinstaller --onefile --noconsole --name "Windows安装包生成器" installer_builder.py

许可证

MIT License

About

A GUI-based Windows installer creator built with Python and Tkinter. It packages any folder into a standalone Windows installer executable with features including custom installation paths, desktop/start menu shortcuts, automatic uninstaller generation, and UAC elevation support. The generated installer is a self-contained exe file.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages