Skip to content

Commit 9e72b4a

Browse files
authored
Update README.md
Documentation update
1 parent 125c754 commit 9e72b4a

File tree

1 file changed

+55
-36
lines changed

1 file changed

+55
-36
lines changed

README.md

Lines changed: 55 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,79 @@
11
# Python-Script-to-Application
22

3-
To create an .exe [application] file from a python script
4-
5-
6-
# Precautions :
3+
**To create an (.exe) executable application file from a python script**
74

5+
## Precautions :
86
9-
* Save the resources in one folder, Do not save the folder inside another folder [ It will not give full
10-
11-
permission to execute the commands. # ParentContainsErrorRecordException]
7+
:heavy_check_mark: Save the resources in one folder, Do not save the folder inside another folder.
8+
> *It will not give full permission to execute the commands. # ParentContainsErrorRecordException*
129
13-
* Check Spellings Before Running the commands, Do not put any Space in your main python programme Name. [# File not found show]
14-
15-
* Do not use the " icon " word as a name of yours. ICO [icon] file; always use a different name. [ # It will show no icon file found]
10+
:heavy_check_mark: Check Spellings before running the commands, Do not put any _space_ in your main python (.py) programme file name.
11+
> *File not found show*
12+
13+
:heavy_check_mark: Do not use the _icon_ word as a name of your icon (.ico) file, always use a different name.
14+
> *It will show no icon file found.*
1615
17-
* Do not Close Powershell window until "Building EXE from EXE-00.toc completed successfully" Message not shows.
16+
:heavy_check_mark: Do not Close Powershell window until **Building EXE from EXE-00.toc completed successfully** Message not shows.
1817

18+
## Steps :
1919

20-
# Steps :
20+
1.Install **[Inno Setup Compiler](main/tools/innosetup-6.1.2.exe)** free application and Pyinstaller. </br>
2121

22+
Open **windows shell** and run :
23+
24+
```
25+
pip install pyinstaller
26+
27+
```
28+
2. Save Python script with all the resources in one folder.
2229

23-
1. Install [Inno Setup Compiler](https://github.com/Abhijeetbyte/Python-Script-to-Application/raw/main/tools/innosetup-6.1.2.exe) free application and Pyinstaller.
30+
3. Open folder and press 'Shift + right click' select **Open PowerShell window**
2431

25-
Open Cmd and run this line->
26-
27-
* pip install pyinstaller
2832

29-
2. Create an .ICO [icon ] file, Save Python script with all the resources in the same folder.
33+
Run below commnads:
3034

31-
3. Open folder and press 'Shift + right click' select and run 'Open PowerShell window'
35+
* If no custom icon file were used.
36+
```
37+
pyinstaller myprogram.py
38+
```
3239

33-
Run this line->
40+
* With custom icon file **(-F -i "mylogo.ico" command)**
3441

35-
* pyinstaller -F -i "myicon.ico" myscriptname.py
36-
42+
```
43+
pyinstaller -F -i "mylogo.ico" myprogram.py
3744
38-
* [ myicon.ico = icon file name myscriptname.py = Python file name ]
45+
```
46+
* ( mylogo.ico = icon file name, myprogram.py = Python file name )
3947

4048

41-
3. 1 if you want your executable application with no console running behind your
42-
application then go with the below line
49+
* If you want your executable application with no console running **(--noconsole command)** behind your application then go with the below line
4350

44-
* pyinstaller -F -i "myicon.ico" myscriptname.py --onefile --noconsole
45-
*
46-
47-
3. 2 if you want your executable application with additional file (--add-data command) and no console running behind your
48-
application then go with the below line
51+
```
52+
pyinstaller -F -i "mylogo.ico" myprogram.py --onefile --noconsole
53+
54+
```
55+
56+
* If you want your executable application with additional file **(--add-data command)** then go with the below line.
4957

50-
* pyinstaller -F -i "myicon.ico"--add-data "AdditionalImage.png;." myscriptname.py --noconsole
58+
```
59+
pyinstaller -F -i "mylogo.ico"--add-data "Additionalimage.png;." myprogram.py --noconsole
60+
```
61+
4. Go to **dist** folder and get application file, delete remain file except for resources.</br>
5162

52-
4. Go to " dist " folder and get application file, delete remain file except for resources.
63+
**Congratulations ! 🤩 you successfully created your standalone application.**</br>
5364

54-
5. Open Inno setup to make .exe file which is Installable /Executable in Windows PC, select ‘ Create a new script file using script
55-
Wizard ' and browse to select your application.
65+
*However if you want your application as Setup.exe then windows installer will extract the installation resources from itself and manage their installation directly*.</br>
5666

57-
6. Select all required things for your application # Icon of setup file # Before installation document # Licence .etc
58-
59-
7. Click ' Yes ' to all, in the End, go to Output Folder get 'setup file' of application and click on open to install.
67+
5. Open Inno setup to make (.exe) file which is Installable/Executable in Windows PC, select **Create a new script file using script
68+
Wizard** and browse to select your application.
6069

70+
6. Select all required things for your application such as Icon of setup file, Before installation document, Licence .etc
71+
72+
7. Click **Yes** to all, in the end, go to Output Folder get **setup file** of application and click on open to install.</br>
73+
74+
**Yor're done !**</br>
75+
### Refrences
76+
* [Pyinstaller](https://pyinstaller.readthedocs.io/en/stable/operating-mode.html)
77+
* [Inno Setup Compiler](https://jrsoftware.org/isdl.php)</br>
78+
* Feel free to report <b>[issues](https://github.com/Abhijeetbyte/Volume-Calculator/issues/new)</b>
79+

0 commit comments

Comments
 (0)