Skip to content

Commit e54c773

Browse files
authored
little improvement
1 parent cfc815e commit e54c773

File tree

1 file changed

+23
-30
lines changed

1 file changed

+23
-30
lines changed

README.md

Lines changed: 23 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,61 @@
11
# Python Script to Application
22

33
**To create an (.exe) executable application file from a python script**.
4+
<!-- Badge section -->
5+
![Languages](https://img.shields.io/badge/Python-FFD43B?plastic&logo=python&logoColor=blue)
6+
![OS](https://img.shields.io/badge/Windows-0078D6?style=plastic&logo=windows&logoColor=white)
7+
8+
49

510
## Steps :
611

712
1. Install **[Inno Setup Compiler](tools/innosetup-6.1.2.exe)** free application and Pyinstaller. </br>
8-
9-
Open **windows shell** and run :
13+
- Your computer must be running Python3 or newer.
14+
15+
Open **windows shell** and run :
1016

1117
```
12-
13-
pip install pyinstaller
14-
18+
pip install pyinstaller
1519
```
1620
2. Save Python script with all the resources in one folder.
1721

18-
3. Open folder and press 'Shift + right click' select **Open PowerShell window**.
19-
20-
21-
Run below commands:
22+
3. Open folder and press 'Shift + right click' select **Open PowerShell window**.</br>
23+
24+
Run below commands:
2225

2326
* If no custom icon file were used.
24-
```
2527

28+
```
2629
pyinstaller myprogram.py
27-
2830
```
2931

3032
* With custom icon file **(-F -i " " command)**.
3133

3234
```
33-
3435
pyinstaller -F -i "mylogo.ico" myprogram.py
35-
3636
```
37-
* ( mylogo.ico = icon file name, myprogram.py = Python file name )
37+
- ( mylogo.ico = icon file name, myprogram.py = Python file name )
3838

3939

40-
* If you want your executable application in one file **(--onefile command)** and no console running **(--noconsole command)** behind your application then go with the below line. If your app requires Windows Administrator permission **(--uac-admin command)**
40+
41+
* If you want your executable application in one file `--onefile` and no console running `--noconsole` behind your application then go with the below line. If your app requires Windows Administrator permission then use `--uac-admin` command
4142

4243
```
43-
4444
pyinstaller -F -i "mylogo.ico" myprogram.py --onefile --noconsole
45-
4645
```
4746
48-
* If you want your executable application with additional file **(--add-data command)** then go with the below line.
47+
* If you want your executable application with additional file `--add-data` command, then go with the below line.
4948

5049
```
51-
5250
pyinstaller -F -i "mylogo.ico"--add-data "Additionalimage.png;." myprogram.py --onefile --noconsole
53-
5451
```
55-
4. Go to **dist** folder and get application file, delete remain file except for resources.</br>
56-
57-
58-
**Congratulations ! 🤩
59-
You successfully created your standalone application.**</br>
6052

61-
* However if you want your application as setup.exe, windows installer will extract the installation resources from itself and manage their installation directly then, go with the below steps.
62-
63-
53+
4. Go to **dist** folder and get application file, delete remain file except for resources. </br>You successfully created your standalone application.</br>
6454

6555

6656

57+
* However if you want your application (.exe) as setup file, windows installer will extract the installation resources from itself and manage their installation directly then, go with the below steps.</br>
58+
6759

6860
5. Open Inno setup to make (.exe) file which is Installable/Executable in PC, select create a new script file using **Script Wizard** and browse to select your application.</br>
6961

@@ -72,10 +64,11 @@ You successfully created your standalone application.**</br>
7264

7365

7466
7. Click **Yes** to all, in the end go to Output Folder get **setup file** of application and click on open to install.</br>
67+
68+
69+
**You're done !**
7570

7671

77-
**You're done !**
78-
7972
## Precautions :
8073
1. Save the resources in one folder, Do not save the folder inside another folder
8174

0 commit comments

Comments
 (0)