RedRaven
RedRaven

Reputation: 735

Embedding python in an installer

The accepted answer to this question deploying python applications discusses "embedding Python" in your installer to deploy it as an Exe.

I would like to take this approach to deploying a python app instead of using something like Py2exe. When I try to Google for "embedding python" the answer all seem to be about embedding python into C code. Can someone point me to a tutorial on embedding into your installation package?

Upvotes: 0

Views: 301

Answers (1)

Joran Beasley
Joran Beasley

Reputation: 113978

with inno-setup I know you can do it like this in your *.iss file

[Files]
Source: "python_installer.exe"; DestDir: "{tmp}"; Flags: deleteafterinstall

[Run]
Filename: "{tmp}\python_installer.exe"; Check: pythonCheck


function pythonCheck(): Boolean;
begin
  Result := SOME_CONDITION_DO_WE_NEED_TO_INSTALL;
end;

(note that inno-setup iss files are pascal ...)

Upvotes: 1

Related Questions