|
| 1 | +# Pyinstaller GUI by Pop Mario Denis |
| 2 | +# Pyinstaller by pyinstaller.org |
| 3 | + |
| 4 | +logo1="""@@@@@@@@@@@@@@@@&#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@( |
| 5 | + *###############*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@,..... //.@@@@@@@@@ |
| 6 | +@@@@@@#########%%%%%%%%%%###@@@@@@@%...... ////.@@@@@@@ |
| 7 | +@@@@@@*######%%%%%%%%%%%%%%#* ////.@@@@@@@ |
| 8 | +@@,****######%%%%%%%%%%%%%%%* /////@@@@@@@ |
| 9 | +@@.****#####%%%%%%%%%%%%%%%%* ////@@@@@@@ |
| 10 | +@@.****#####%%%%%%%%%%%%%************* ////.@@@@@@ |
| 11 | +@@*****#####%%%%%%%*%%%%%%%%%%%%%%%%%%%####. ////.@@@@@@ |
| 12 | +@@@****#####%%%%%*%%%%%%%%%%%%%%%%%%%%%%%%### /////@@@@@@ |
| 13 | +@@@.***#####%%%%%*%%%%%%%%%%%%%%%%%% %%##. ////@@@@@@ |
| 14 | +@@@.***#####%%%%%*%%%%%%%%%%%%%%%%%% %%##. ////.@@@@@ |
| 15 | +@@@****#####%%%%%*%%%%%%%%%%%%%%%%%%%%%%%####. ////.@@@@@ |
| 16 | +@@@@***#####%%%%%*%%%%%%%%%%%%%%%%///////////. @@@@@ /////@@@@@ |
| 17 | +@@@@,**#####%%%%%*%%%%%%%%%%%%%%%%* @@@@@ ////@@@@@ |
| 18 | +@@@@.**#####%%%%%%%%%%%%%%%%%%%%%%* @@@@@ ////.@@@@ |
| 19 | +@@@@,**######%%%%%%%%%%%%%%%%%%%%#* @@@@ ////.@@@@ |
| 20 | +@@@@@**(#####%%%%%%%%%%%%%%%%%%%##* @@@@ ////*@@@@ |
| 21 | +@@@@@,**#######%%%%%%%%%%%%%%%%##* @@@@ ////@@@@ |
| 22 | +@@@@@.***/########%%%%%%%%%%###* //////.@@@ |
| 23 | +@@@@@.**** *##############/* ,//////////////////////////////.@@@ |
| 24 | +@@@@@@***** ***************************/////////////////////////////*@@@ |
| 25 | +@@@@@@,******************************,,,,,,#%%%%%%%%%%%%%%%//////////////////@@@ |
| 26 | +@@@@@@.***************#############%%%%%%%%%%%%%%%%%%%%%%%%%/////////////////.@@ |
| 27 | +@@@@@@.**************,###########%%%%%%%%%%%%%%%%%%%%%%%%%%%,////////////////.@@ |
| 28 | +@@@@@@@***************########%%%%%%%%%%%%%%%%%%%%%%%%%%%&&&,////////////////*@@ |
| 29 | +@@@@@@@,**************######%%%%%%%%%%%%%%%%%%%%%%%%%%%&&&&&//////////////////@@ |
| 30 | +@@@@@@@.**************,##%%%%%%%%%%%%%%%%%%%%%%%%%%%&&&&&&&&&*////////////////.@ |
| 31 | +@@@@@@@.**************,%%%%%%%%%%%%%%%%%%%%%%%%%%%&&&&&&&&&&&,**//////////////.@ |
| 32 | +@@@@@@@@***************%%%%%%%%%%%%%%%%%%%%%%%%&&&&&&&&&&&&&&,*****///////////.@ |
| 33 | +@@@@@@@@***************%%%%%%%%%%%%%%%%%%%%%%&&&&&&&&&&&&&&&&/********...../@@@@ |
| 34 | +@@@@@@@@@.*************,%%%%%%%%%%%%%%%%%%&&&&&&&&/,,,,,%@@@@@@@@@@@@@@@@@@@@@@@ |
| 35 | +@@@@@@@@@%(*.******,...,%*,,,,,,,*******///////((((((#####%%%%%%&&&&&@@@@@@@@@@@ """ |
| 36 | +print("Anti-Bug info Terminal console if error ") |
| 37 | +#import librery |
| 38 | + |
| 39 | + |
| 40 | +import tkinter as tk |
| 41 | +from tkinter import ttk |
| 42 | +import os,time |
| 43 | +import platform as pf |
| 44 | +from tkinter import filedialog as fl |
| 45 | +from tkinter import * |
| 46 | +try: |
| 47 | + import webbrowser |
| 48 | +except: |
| 49 | + os.system('pip3 install webbrowser,') |
| 50 | +try: |
| 51 | + import PyInstaller as pyIn # import pyinstaller (by timgates42) |
| 52 | +except pyIn: |
| 53 | + |
| 54 | + print('not found pyinstaller ') |
| 55 | + |
| 56 | +import sys |
| 57 | +version_python=pf.python_version() |
| 58 | +pyinstaller_version=pyIn.__version__ |
| 59 | +system_version=pf.system() |
| 60 | +__versionGUI__="v0.1_Pre-Alpha" |
| 61 | +__buildGUI__="0.1" |
| 62 | +def message_windows(): |
| 63 | + def __init__(self): |
| 64 | + root =tk.Tk() |
| 65 | + root.geometry('500x100+350+120') |
| 66 | + root.title('message ') |
| 67 | + root.resizable(False,False) |
| 68 | + root.configure(bg='white') |
| 69 | + def ok_c(): |
| 70 | + sys.exit() |
| 71 | + self.lb_txt_done=tk.Label(root,text='Done ,you find src folder of pyinstaller GUI',bg='white') |
| 72 | + self.lb_txt_done.pack() |
| 73 | + bt_ok=tk.Button(root,text='OK',command=ok_c) |
| 74 | + bt_ok.pack() |
| 75 | +class error_webbrowser(): |
| 76 | + def __init__(self): |
| 77 | + root =tk.Tk() |
| 78 | + root.geometry('500x100+350+120') |
| 79 | + root.title('Error WebBrowser') |
| 80 | + root.resizable(False,False) |
| 81 | + root.configure(bg='white') |
| 82 | + def ok_c(): |
| 83 | + os.system('pip3 install webbrowser') |
| 84 | + self.lb_txt_done=tk.Label(root,text='Webbrowser not found ,click ok button for install ',bg='white') |
| 85 | + self.lb_txt_done.pack() |
| 86 | + bt_ok=tk.Button(root,text='OK',command=ok_c) |
| 87 | + bt_ok.pack() |
| 88 | +class windows (): |
| 89 | + |
| 90 | + def __init__(self) -> None: |
| 91 | + |
| 92 | + |
| 93 | + |
| 94 | +# info windows |
| 95 | + def info(): |
| 96 | + |
| 97 | + text_info=""" |
| 98 | +------------------------------Credits-------------------------------- |
| 99 | +Pyinstaller GUI Interface by Pop Mario Denis |
| 100 | +Pyinstaller by pyinstaller.org |
| 101 | +-----------------Info Version and system---------------------------- |
| 102 | +pyinstaller GUI version is :%s |
| 103 | +pyinstaller GUI build is :%s |
| 104 | +pyinstaller version is :%s |
| 105 | +python version is :%s |
| 106 | +system use is:%s |
| 107 | +------------------------LICENSE----------------------------------------- |
| 108 | +pyinstaller GUI license : MIT |
| 109 | +
|
| 110 | +
|
| 111 | + """ %(__versionGUI__,__buildGUI__,pyinstaller_version,version_python,system_version) #def info interface |
| 112 | + root =tk.Tk() |
| 113 | + root.geometry('850x450') |
| 114 | + root.title('pyinstaller GUI(Info page)') |
| 115 | + root.resizable(False,False) |
| 116 | + root.configure(bg='white') |
| 117 | + self.info_label=tk.Label(root,text=text_info,font=('italy',20),bg='white') |
| 118 | + self.info_label.place(x=10,y=10) |
| 119 | + |
| 120 | + # windows home page |
| 121 | + root =tk.Tk() |
| 122 | + root.geometry('500x280+350+120') |
| 123 | + root.title('pyinstaller GUI(Home Page)') |
| 124 | + root.resizable(False,False) |
| 125 | + root.configure(bg='white') |
| 126 | + self.frame_info=tk.Frame(root,bg='white') |
| 127 | + self.frame_info.place(x=30,y=40,width=440,height=370) |
| 128 | + |
| 129 | + |
| 130 | + def error_sel(): |
| 131 | + self.error_label2=tk.Label(self.frame_info,text='close page',font=('c059',20),bg='white') |
| 132 | + self.error_label2.place(x=199,y=10) |
| 133 | + self.linux_bt.configure(state=DISABLED) |
| 134 | + self.bt_res_info.configure(state=ACTIVE) |
| 135 | + self.bt_start.configure(state=DISABLED) |
| 136 | + |
| 137 | + |
| 138 | + |
| 139 | + |
| 140 | + |
| 141 | + |
| 142 | + |
| 143 | + |
| 144 | + def reset_info(): |
| 145 | + self.error_label2.destroy() |
| 146 | + self.linux_bt.configure(state=ACTIVE) |
| 147 | + self.bt_start.configure(state=ACTIVE) |
| 148 | + self.bt_res_info.configure(state=DISABLED) |
| 149 | + |
| 150 | + |
| 151 | + self.bt_res_info=tk.Button(self.frame_info,text='reset info ',state=DISABLED,borderwidth=0,bg='white',fg='black',activebackground='white',activeforeground='black',command=reset_info) |
| 152 | + self.bt_res_info.place(x=190,y=200) |
| 153 | + self.error_label=tk.Label(self.frame_info,text='error and info :',font=('c059',20),bg='white') |
| 154 | + self.error_label.place(x=10,y=10) |
| 155 | + |
| 156 | + info_label=tk.Label(self.frame_info,text='progress state :',font=('c059',20),bg='white') |
| 157 | + info_label.place(x=10,y=48) |
| 158 | + |
| 159 | + # new windows for file |
| 160 | + def new_windows(): |
| 161 | + |
| 162 | + root =tk.Tk() |
| 163 | + root.geometry('360x400') |
| 164 | + root.title('pyinstaller GUI') |
| 165 | + root.resizable(False,False) |
| 166 | + root.configure(bg='white') |
| 167 | + |
| 168 | + |
| 169 | + # sel button and other button comfigure\ |
| 170 | + |
| 171 | + |
| 172 | + |
| 173 | + def st_sel(): |
| 174 | + try: |
| 175 | + |
| 176 | + |
| 177 | + |
| 178 | + lb_wait_for=tk.Label(self.frame_info,text='Wait for ..',font=('c059',20),bg='white') |
| 179 | + lb_wait_for.place(x=250,y=48) |
| 180 | + file_sel=fl.askopenfilename(initialdir = '/home',title = 'file python',filetypes=(("python files","*.py"),("all files","*.*"))) |
| 181 | + |
| 182 | + |
| 183 | + os.system('pyinstaller --onefile %s'%(file_sel)) |
| 184 | + lb_wait_for.destroy() |
| 185 | + message_windows() |
| 186 | + |
| 187 | + |
| 188 | + |
| 189 | + except: |
| 190 | + lb_wait_for.destroy() |
| 191 | + error_sel() |
| 192 | + |
| 193 | + |
| 194 | + |
| 195 | + |
| 196 | + |
| 197 | + |
| 198 | + |
| 199 | + self.label_i=tk.Label(root,text='Pyinstaller Mode',bg='white',font=('ani',20),fg='black') |
| 200 | + self.label_i.place(x=100,y=10) |
| 201 | + |
| 202 | + self.bt_start=tk.Button(root,text='Start',command=st_sel,borderwidth=0,bg='white',fg='black',activebackground='white',activeforeground='black') |
| 203 | + self.bt_start.place(x=130,y=70) |
| 204 | + |
| 205 | + self.lb_txt_easy=tk.Label(root,text='Easy mode:',font=('ani',17),bg='white',fg='black') |
| 206 | + self.lb_txt_easy.place(x=10,y=58) |
| 207 | + |
| 208 | + |
| 209 | + #advance mode for setup conver |
| 210 | + self.lb_txt_AD=tk.Label(root,text='Advance mode(Aplha version):', |
| 211 | + font=('ani',17), |
| 212 | + bg='white', |
| 213 | + fg='black') |
| 214 | + self.lb_txt_AD.place(x=10,y=100) |
| 215 | + |
| 216 | + # command andvace mode |
| 217 | + def exe_c(): |
| 218 | + |
| 219 | + ad_con=ad.get() |
| 220 | + if ad_con == '--onefile -w --noconsole': |
| 221 | + fwn() |
| 222 | + if ad_con =='-- onedir -w --noconsole': |
| 223 | + dwn() |
| 224 | + if ad_con == '--onefile -w': |
| 225 | + fw() |
| 226 | + if ad_con == '--onedir -w': |
| 227 | + dw() |
| 228 | + print(ad_con) |
| 229 | + |
| 230 | + |
| 231 | + def fwn(): |
| 232 | + try: |
| 233 | + lb_wait_for=tk.Label(self.frame_info,text='Wait for ..',font=('c059',20),bg='white') |
| 234 | + lb_wait_for.place(x=250,y=48) |
| 235 | + file_sel=fl.askopenfilename(initialdir = '/home',title = 'file python',filetypes=(("python files","*.py"),("all files","*.*"))) |
| 236 | + |
| 237 | + os.system('pyinstaller --onefile -w --noconsole %s'%(file_sel)) |
| 238 | + lb_wait_for.destroy() |
| 239 | + message_windows() |
| 240 | + except: |
| 241 | + lb_wait_for.destroy() |
| 242 | + def dwn(): |
| 243 | + try: |
| 244 | + lb_wait_for=tk.Label(self.frame_info,text='Wait for ..',font=('c059',20),bg='white') |
| 245 | + lb_wait_for.place(x=250,y=48) |
| 246 | + file_sel=fl.askopenfilename(initialdir = '/home',title = 'file python',filetypes=(("python files","*.py"),("all files","*.*"))) |
| 247 | + |
| 248 | + os.system('pyinstaller --onedire -w --noconsole %s'%(file_sel)) |
| 249 | + lb_wait_for.destroy() |
| 250 | + message_windows() |
| 251 | + except: |
| 252 | + lb_wait_for.destroy() |
| 253 | + def fw(): |
| 254 | + try: |
| 255 | + lb_wait_for=tk.Label(self.frame_info,text='Wait for ..',font=('c059',20),bg='white') |
| 256 | + lb_wait_for.place(x=250,y=48) |
| 257 | + file_sel=fl.askopenfilename(initialdir = '/home',title = 'file python',filetypes=(("python files","*.py"),("all files","*.*"))) |
| 258 | + |
| 259 | + os.system('pyinstaller --onefile -w %s'%(file_sel)) |
| 260 | + lb_wait_for.destroy() |
| 261 | + message_windows() |
| 262 | + except: |
| 263 | + lb_wait_for.destroy() |
| 264 | + |
| 265 | + def dw(): |
| 266 | + try: |
| 267 | + lb_wait_for=tk.Label(self.frame_info,text='Wait for ..',font=('c059',20),bg='white') |
| 268 | + lb_wait_for.place(x=250,y=48) |
| 269 | + file_sel=fl.askopenfilename(initialdir = '/home',title = 'file python',filetypes=(("python files","*.py"),("all files","*.*"))) |
| 270 | + |
| 271 | + os.system('pyinstaller --onedir -windowed %s'%(file_sel)) |
| 272 | + lb_wait_for.destroy() |
| 273 | + |
| 274 | + message_windows() |
| 275 | + except: |
| 276 | + lb_wait_for.destroy() |
| 277 | + |
| 278 | + |
| 279 | + # advance mode GUI setting |
| 280 | + |
| 281 | + self.lb_txt_com=tk.Label(root,text='select command :',font=('ani',17),bg='white',fg='black') |
| 282 | + self.lb_txt_com.place(x=100,y=140,height=33) |
| 283 | + bt_st_ad=tk.Button(root,text='start',command=exe_c,borderwidth=0,bg='white') |
| 284 | + bt_st_ad.place(x=100,y=222,width=200) |
| 285 | + #ad () |
| 286 | + ad=ttk.Combobox(root, |
| 287 | + values=('--onefile -w --noconsole', |
| 288 | + '-- onedir -w --noconsole', |
| 289 | + '--onefile -w', |
| 290 | + '--onedir -w')) |
| 291 | + ad.place(x=100,y=170,width=200) |
| 292 | + |
| 293 | + |
| 294 | + |
| 295 | + def Quit(): |
| 296 | + sys.exit() |
| 297 | + # button and place |
| 298 | + self.linux_bt=tk.Button(root,text='Start pyinstaller ',command=new_windows,bg='white',fg='black',activebackground='white',activeforeground='black',borderwidth=0) |
| 299 | + self.linux_bt.place(x=190,y=200) |
| 300 | + def other_com(): |
| 301 | + root =tk.Tk() |
| 302 | + root.geometry('360x400') |
| 303 | + root.title('pyinstaller GUI(Setting)') |
| 304 | + root.resizable(False,False) |
| 305 | + root.configure(bg='white') |
| 306 | + |
| 307 | + def upgrade(): |
| 308 | + os.system('pip3 install --upgrade pyinstaller') |
| 309 | + def install_pyinstaller(): |
| 310 | + os.system('pip install pyinstaller') |
| 311 | + lb_txt_upgrade=tk.Label(root,text='upgrade pyinstaller',font=('c059',13),bg='white') |
| 312 | + lb_txt_upgrade.pack() |
| 313 | + bt_upgrade=tk.Button(root,text='upgrade',bg='white',fg='black',activebackground='white',activeforeground='black',borderwidth=0,command=upgrade) |
| 314 | + bt_upgrade.pack(pady=10) |
| 315 | + txt_l=tk.Label(root,text='install pyinstaller librery for python3(pip3)',font=('c059',13),bg='white') |
| 316 | + txt_l.pack() |
| 317 | + bt_install=tk.Button(root,text='Install pyinstaller',bg='white',fg='black',activebackground='white',activeforeground='black',borderwidth=0,command=install_pyinstaller) |
| 318 | + bt_install.pack(pady=10) |
| 319 | + |
| 320 | + |
| 321 | + def rda_github(): |
| 322 | + try: |
| 323 | + url='https://github.com/RedAnonymusITA' |
| 324 | + webbrowser.open(url) |
| 325 | + except: |
| 326 | + error_webbrowser() |
| 327 | + |
| 328 | + def pyinstaller_github(): |
| 329 | + try: |
| 330 | + url='https://github.com/pyinstaller/pyinstaller' |
| 331 | + webbrowser.open(url) |
| 332 | + except: |
| 333 | + error_webbrowser() |
| 334 | + |
| 335 | + menu1=tk.Menu(root,bg="white",fg='black',borderwidth=0) |
| 336 | + root.configure(menu=menu1) |
| 337 | + file_menu=Menu(menu1,bg="white") |
| 338 | + menu1.add_cascade(label="Menu",menu=file_menu) |
| 339 | + |
| 340 | + file_menu.add_command(label="RDA Github",activebackground='white',command=rda_github) |
| 341 | + file_menu.add_command(label="pyinstaller Github",activebackground='white',command=pyinstaller_github) |
| 342 | + file_menu.add_command(label="setting",activebackground='white',command=other_com) |
| 343 | + |
| 344 | + file_menu.add_separator() |
| 345 | + file_menu.add_command(label="INFO",activebackground='white',command=info) |
| 346 | + file_menu.add_command(label="EXIT",activebackground='white',command=Quit) |
| 347 | + root.mainloop() |
| 348 | + |
| 349 | +windows() |
| 350 | + |
0 commit comments