Skip to content

Self Compile Guide

Berlin Chen edited this page Sep 7, 2026 · 9 revisions

Requirements

  • Windows 10+
  • MSVC 14.5+ (VS 2022+)
  • x64 or ARM64
  • Python 3.10+
  • Inno Setup 7
  • Files in repository:
    • impy.py
    • impy.iss (or pure.iss)
    • impy.ico
    • cpt.bat
    • locmap.json

Prepare

  • make sure your current work directory which you put all the required files in repository.
    cd %impyfolder%
    (change %impyfolder% to your actual directory)
  • make sure you add these to %PATH%:
    • %LocalAppData%\Programs\Python31X\Scripts (change Python31X to your actual Python folder)
    • C:\PROGRA~1\Inno Setup 7 (make sure you are using Inno Setup 7)
  • install Nuitka
    pip install nuitka

Compile

Important

Must declare %version% first:

set version=26.1.2

Copy these down and paste to Command Prompt to run it:

nuitka --standalone ^
    --file-version=%version% ^
    --company-name=MBLC7 ^
    --product-name=ImPy ^
    --file-description="Make Python easy to manage"^
    --include-package=niquests ^
    --include-package=urllib3 ^
    --include-package=urllib3.contrib ^
    --include-package=urllib3.contrib.resolver ^
    --no-deployment-flag=self-execution ^
    --jobs=8 ^
    --msvc=14.5 ^
    --windows-icon-from-ico=impy.ico ^
    --include-data-files=cpt.bat=cpt.bat ^
    --include-data-files=locmap.json=locmap.json ^
    impy.py

Make up a setup

Copy these down and paste to Command Prompt to run it:

ISCC impy.iss

You can also use pure.iss (exclude build sources).

Note

if you want to test the setup, copy these down and paste to Command Prompt to run it:

start .\Output\ImPy-%version%-x64.exe

or you are using pure.iss:

start .\Output\ImPy-%version%-pure-x64.exe

Clone this wiki locally