how to make a Python installer?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
Andredron
Miko-Class Veteran
Posts: 718
Joined: Thu Dec 28, 2017 2:37 pm
Location: Russia
Contact:

how to make a Python installer?

#1 Post by Andredron »

Hello everyone, I wanted to add a button to the launcher renpy which would create an exe file unpacker, not zip folder. Clicking on which the program was unpacked to the desired folder C: \ game \ project name, my project.
I found on the Internet such a module pip https://www.pyinstaller.org/

I installed this module on the computer (my computer - the right mouse button - properties - additional system parameters - the environment variable point - chose the puff option - change and add 2 folders 1 folder where the python is located, 2 folder directory scripts)

Through the python, I got a regular .py file in a simple exe
through the console registered

Code: Select all

pip install pyinstaller
call the folder where the python file is stored via the console

Code: Select all

cd C:\new 

Code: Select all

cls
Then you need the path to the icon and the .py file itself which will be compiled into exe

Code: Select all

pyinstaller -F -i "C:\new\icon.ico" proect.py
We compile, and you create 3 folders, you only need the dist directory, it will create an exe project
but I can not recompile so that clicking on the exe python starts the process of decompressing the files into the specified coordinates ...

but I do not have the mind how to turn it into a launcher as a button. Help Board

Post Reply

Who is online

Users browsing this forum: Google [Bot]