On 2016-10-24 18:39, Thomas Kluyver wrote:
I've mentioned this on the list before, but some changes since then have made it easier to use with Pygame.
Pynsist ( https://pynsist.readthedocs.io/ ) is an open source tool to build Windows installers for Python applications. It's based on the popular NSIS installer system, which makes it possible to build installers even on Linux or Mac systems.
Pynsist can now download wheels from PyPI to include in an installer. Since pygame has (beta) Windows wheels, it's much easier to include Pygame in an installer than last time I posted here. Here's an example of building an installer for the 'aliens' example game: https://github.com/takluyver/pynsist/tree/master/examples/pygame
I'm happy to answer questions about it here, on Github, and on Stackoverflow (tag: pynsist).
Thanks,
Thomas
Hello, Thomas
I tried to make an executable for my game Bullet dodger following the example you linked to.
Here is what I got, but I want to distribute just one executable file; can I do that with your program?
~/Code/Repos/bullet_dodger_stable/build/nsis $ ls -l total 49272 drwxr-xr-x 2 jorge jorge 4096 Oct 24 18:57 assets -rw-r--r-- 1 jorge jorge 21111344 Oct 24 19:05 Bullet_dodger_1.6.10.exe -rw-r--r-- 1 jorge jorge 1293 Oct 24 19:05 Bullet_dodger.launch.pyw -rw-r--r-- 1 jorge jorge 790 Oct 24 18:56 bullet.ico -rw-r--r-- 1 jorge jorge 6344 Oct 24 19:05 installer.nsi -rw-r--r-- 1 jorge jorge 34570 Oct 24 18:52 LICENSE drwxr-xr-x 4 jorge jorge 4096 Oct 24 19:05 pkgs drwxr-xr-x 2 jorge jorge 4096 Oct 24 19:05 Python -rw-r--r-- 1 jorge jorge 29269656 Oct 24 19:00 python-3.5.2.exe -rw-r--r-- 1 jorge jorge 2360 Oct 24 18:48 windowsversion.nsh
I thought that bundled option meant one .exe file, but maybe I made the installer.cfg wrong, any help is really appreciated:
[Application] name=Bullet dodger version=1.6.10 # How to launch the app - this calls the 'main' function from the 'myapp' package: entry_point=bullet_dodger.main:start_screen icon=bullet_dodger/assets/bullet.ico
[Python] version=3.5.2 bitness=32 format=bundled
[Include] # Importable packages that your application requires, one per line pypi_wheels= pygame==1.9.2b1
# Other files and folders that should be installed files = LICENSE bullet_dodger/assets
|