Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

增加nuitka打包方式,InnoSetup安装包制作脚本 #171

Merged
merged 1 commit into from
Jul 10, 2023

Conversation

KmBase
Copy link
Contributor

@KmBase KmBase commented Jul 9, 2023

好的,以下是我草拟的readme,敬请参考。
##nuitka_build.py一键打包脚本

本脚本的主要功能有:

nuitka 生成可执行文件、zipfile制作portable文件、 InnoSetup制作安装文件。如不需要生成zip压缩包,或制作安装包。可以自行注释掉create_portable()、create_portable()对应语句

if __name__ == '__main__':
    build()
    create_portable()
    if SYSTEM == 'Windows':
       create_portable()

说明

nuitka是一个可以将Python代码转换为C++代码并编译为可执行文件或扩展模块的工具。可以明显提高python项目的加载运行速度。Inno Setup 是一个免费的 Windows 安装程序制作软件,十分简单实用的打包小工具。

使用步骤

1、安装项目依赖

pip install -r requirements.txt

2、安装nuitka

pip install -U nuitka

3、安装Inno Setup
官网下载地址:https://jrsoftware.org/download.php/is.exe
中文语言包:https://raw.githubusercontent.com/jrsoftware/issrc/main/Files/Languages/Unofficial/ChineseSimplified.isl
请保存语言包到Inno Setup安装目录
image
4、执行脚本

python nuitka_build.py

5、安装

  • 生成build目录,包括nuitka编译过程文件目录(main.build)、可执行文件目录(main.release)、Inno Setup安装脚本(.iss)
    image
  • 用Inno Setup打开生成的.iss文件,或双击.iss打开。点击Run,生成安装文件
    image
  • release目录包含portable压缩文件以及安装文件
    image
  • 双击安装文件,可以采用安装Umi-OCR到指定位置
    image
    6、卸载
    控制面板找到Umi-OCR,卸载即可
    image

@hiroi-sora hiroi-sora merged commit 4a92a8e into hiroi-sora:main Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants