takluyver / pynsist

Build Windows installers for Python applications
https://pynsist.readthedocs.io/
Other
896 stars 119 forks source link

Pynsist Config File - entry_point??? #140

Closed SimLoads closed 5 years ago

SimLoads commented 6 years ago

Hello all, So I'm trying to compile my python script into an exe with pynsist. I followed all the guides to the letter, however I cannot figure out how to use the entry_point in the installer.cfg file. When trying to run it, the program either spits out "ImportError" or the .exe refuses to start. What do I do to make it work?

[Application] name=PyTunes version=0.3 entry_point=myapp:main icon=ocrtunes.ico

[Python] version=3.6.3

[Include] Packages from PyPI that your application requires, one per line These must have wheels on PyPI: pypi_wheels = requests==2.18.4 beautifulsoup4==4.6.0 html5lib==0.999999999

To bundle packages which don't publish wheels, see the docs on the config file.

Other files and folders that should be installed files = err.ogg StartSnd.ogg

Modules imported by program: import os import time import progressbar import getpass import random import shutil import re import glob import sys import select import pygame

takluyver commented 6 years ago

The entry point needs to refer to a function that launches your application. This is often called main(). If you haven't already, you'll need to arrange your code so that there is a function that runs your application.

On 6 Jan 2018 10:27 p.m., "SimLoads" notifications@github.com wrote:

Hello all, So I'm trying to compile my python script into an exe with pynsist. I followed all the guides to the letter, however I cannot figure out how to use the entry_point in the installer.cfg file. When trying to run it, the program either spits out "ImportError" or the .exe refuses to start. What do I do to make it work?

[Application] name=PyTunes version=0.3 entry_point=myapp:main icon=ocrtunes.ico

[Python] version=3.6.3

[Include] Packages from PyPI that your application requires, one per line These must have wheels on PyPI:

pypi_wheels = requests==2.18.4 beautifulsoup4==4.6.0 html5lib==0.999999999 To bundle packages which don't publish wheels, see the docs on the config file. Other files and folders that should be installed

files = err.ogg StartSnd.ogg

Modules imported by program: import os import time import progressbar import getpass import random import shutil import re import glob import sys import select import pygame

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/takluyver/pynsist/issues/140, or mute the thread https://github.com/notifications/unsubscribe-auth/AAUA9Z5xeNnNrbO2mm0dYpK3i7jrb_wKks5tH_NEgaJpZM4RVdh7 .

SimLoads commented 6 years ago

Okay, So I have a def preboot() at the bottom of my code which directs the script to the start, but compiling it with myapp:preboot still doesn't work.

takluyver commented 6 years ago

What does it do? If you don't see any info, there should be a log file you can look at: http://pynsist.readthedocs.io/en/latest/installers.html#uncaught-exceptions

SimLoads commented 6 years ago

Literally nothing, It will go through making the .exe fine, then when I run it, it does nothing. No screen, apparently absolutely nothing happens.

takluyver commented 6 years ago

Try running the exe, and then look for that log file - it should contain the error if it fails to start.

On 15 Jan 2018 10:16 p.m., "SimLoads" notifications@github.com wrote:

Literally nothing, It will go through making the .exe fine, then when I run it, it does nothing. No screen, apparently absolutely nothing happens.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/takluyver/pynsist/issues/140#issuecomment-357801303, or mute the thread https://github.com/notifications/unsubscribe-auth/AAUA9aJiRSTYrME5H2iYzzTg8TXcXEQIks5tK84ngaJpZM4RVdh7 .