安装与部署

Jaon 支持多种使用方式:从源码安装、通过 pip 安装、使用独立可执行文件, 以及通过 Windows 安装程序关联 .jaon 文件。

从源码安装

git clone https://github.com/ExploreMaths/Jaon.git
cd jaon
pip install -e .

安装完成后即可使用 python -m jaonjaon 命令。

安装开发依赖

pip install -e .[dev,docs]

这会自动安装 Nuitka(构建独立 exe)和 Sphinx/Furo(构建文档)。

Windows 独立可执行文件

如果你不想安装 Python,可以直接使用 compiler.exe

python scripts/build_exe.py

生成的 dist/compiler.exe 不依赖 Python 环境。

Windows 安装程序(双击运行 .jaon)

方法一:PowerShell 安装

以管理员身份运行 PowerShell:

cd installer
powershell -ExecutionPolicy Bypass -File install.ps1

安装后:

  • 双击任意 .jaon 文件即可执行

  • 右键菜单出现 “Run with Jaon”

  • compiler.exe 添加到用户 PATH

方法二:Inno Setup 安装包

  1. 安装 Inno Setup

  2. 编译安装包:

    iscc installer/setup.iss
    
  3. 运行生成的 dist/Jaon-Setup.exe

卸载

PowerShell 安装版:

cd installer
powershell -ExecutionPolicy Bypass -File uninstall.ps1

Inno Setup 安装版:通过控制面板的 “程序和功能” 卸载。