Skip to content

Commit cb729f9

Browse files
authored
Make pre-release PE Start app
0 parents  commit cb729f9

34 files changed

Lines changed: 309 additions & 0 deletions

PEStart.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import os
2+
import sys
3+
from tkinter import *
4+
from tkinter.ttk import *
5+
import tkinter.messagebox
6+
from ctypes import windll
7+
8+
w = Tk()
9+
w.title("That's Rea Sanka!")
10+
w.attributes("-alpha",0.0)
11+
w.maxsize(0,0)
12+
w.lift()
13+
w.iconbitmap(sys.executable)
14+
15+
# First, check accessbility
16+
if tkinter.messagebox.askokcancel(
17+
"Enterprise (Azur Lane) ask",
18+
"Use mouse, touchpad, and/or touchscreen?\nHint: Check first. If broken or no have it, press ESC or Alt+F4 to use keyboard"):
19+
tkinter.messagebox.showinfo(
20+
"Alright, Furuya",
21+
"Use On Screen Keyboard if keybord broken or no have")
22+
w.destroy()
23+
import PETaskbar
24+
else:
25+
tkinter.messagebox.showinfo(
26+
"That's okay, Furuya",
27+
"It will use basic windowed than overrided window")
28+
w.destroy()
29+
import PEWindow

PEStart.spec

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# -*- mode: python ; coding: utf-8 -*-
2+
3+
4+
a = Analysis(
5+
['PEStart.py'],
6+
pathex=[],
7+
binaries=[],
8+
datas=[],
9+
hiddenimports=[],
10+
hookspath=[],
11+
hooksconfig={},
12+
runtime_hooks=[],
13+
excludes=[],
14+
noarchive=False,
15+
optimize=0,
16+
)
17+
pyz = PYZ(a.pure)
18+
19+
exe = EXE(
20+
pyz,
21+
a.scripts,
22+
a.binaries,
23+
a.datas,
24+
[('v', None, 'OPTION')],
25+
name='PEStart',
26+
debug=False,
27+
bootloader_ignore_signals=False,
28+
strip=False,
29+
upx=True,
30+
upx_exclude=[],
31+
runtime_tmpdir=None,
32+
console=False,
33+
disable_windowed_traceback=False,
34+
argv_emulation=False,
35+
target_arch=None,
36+
codesign_identity=None,
37+
entitlements_file=None,
38+
version='version.txt',
39+
icon=['img\\folder.ico'],
40+
)

PETaskbar.py

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
import os
2+
import sys
3+
from tkinter import *
4+
from tkinter.ttk import *
5+
import tkinter.messagebox
6+
from ctypes import windll
7+
import aboutPEStart as PEA
8+
9+
# Begin Taskbar PE for start
10+
taskbar = Tk()
11+
taskbar.overrideredirect(1)
12+
taskbar.iconbitmap(sys.executable)
13+
taskbar.title("PE Startup Taskbar")
14+
taskbar.minsize(taskbar.winfo_screenwidth(), 0)
15+
taskbar.maxsize(taskbar.winfo_screenwidth(), 42)
16+
taskbar.resizable(False, False)
17+
taskbar.geometry("+0+0")
18+
19+
# Power function
20+
def wpeutilShutdown():
21+
os.system("wpeutil Shutdown")
22+
# Definitive function
23+
def executeStart(str_EXECMD):
24+
os.system(f"start {str_EXECMD}")
25+
def powerShStart():
26+
os.system("powershell")
27+
28+
# Button
29+
img_button1 = PhotoImage(file="icon\\exit_24.png")
30+
button1 = Button(image=img_button1, command=taskbar.destroy)
31+
button1.grid(column=0, row=0, padx=3)
32+
33+
img_button2 = PhotoImage(file="icon\\shutdown_24.png")
34+
button2 = Button(image=img_button2, command=lambda: wpeutilShutdown())
35+
button2.grid(column=1, row=0, padx=3)
36+
37+
img_button3 = PhotoImage(file="icon\\archive_24.png")
38+
button3 = Button(image=img_button3, command=lambda: executeStart("%WINDIR%\\APP\\7-Zip\\7zFM.exe"))
39+
button3.grid(column=2, row=0, padx=3)
40+
41+
img_button4 = PhotoImage(file="icon\\conhost_24.png")
42+
button4 = Button(image=img_button4, command=lambda: executeStart("\"Windows Preinstalled Environment\""))
43+
button4.grid(column=3, row=0, padx=3)
44+
45+
img_button5 = PhotoImage(file="icon\\pwshell_24.png")
46+
button5 = Button(image=img_button5, command=lambda: powerShStart())
47+
button5.grid(column=4, row=0, padx=3)
48+
49+
img_button6 = PhotoImage(file="icon\\setup_24.png")
50+
button6 = Button(image=img_button6, command=lambda: executeStart("%WINDIR%\\APP\\WinNTSetup\\WinNTSetup_x64.exe"))
51+
button6.grid(column=5, row=0, padx=3)
52+
53+
img_button10 = PhotoImage(file="icon\\info_24.png")
54+
button10 = Button(image=img_button10, command=PEA.aboutPEStart)
55+
button10.grid(column=9, row=0, padx=3)
56+
57+
# img_button10 = PhotoImage(file="icon\\info_24.png")
58+
# button10 = Button(text="About", image=img_button10, compound=LEFT, command=PEA.aboutPEStart, width=5)
59+
# button10.grid(column=9, row=0)
60+
61+
62+
taskbar.mainloop()

PEWindow.py

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
import os
2+
import sys
3+
from tkinter import *
4+
from tkinter.ttk import *
5+
import tkinter.messagebox
6+
from ctypes import windll
7+
import aboutPEStart as PE
8+
import infoPEStart as PE2
9+
10+
# Begin PE Start Menu for start
11+
smWindow = Tk()
12+
smWindow.iconbitmap(sys.executable)
13+
smWindow.title("PE Start Menu")
14+
smWindow_w, smWindow_h = 400, 300
15+
smWindow_wscr, smWindow_hscr = smWindow.winfo_screenwidth(), smWindow.winfo_screenheight()
16+
x_smW = (smWindow_wscr/2) - (smWindow_w/2)
17+
y_smW = (smWindow_hscr/2) - (smWindow_h/2)
18+
smWindow.geometry(
19+
"%dx%d+%d+%d" %(smWindow_w, smWindow_h, x_smW, y_smW)
20+
)
21+
smWindow.maxsize(400, 300)
22+
smWindow.resizable(False, False)
23+
24+
# Power function
25+
def wpeutilPower(chosePower):
26+
os.system(f"wpeutil {chosePower}")
27+
# Definitive function
28+
def executeStart(str_EXECMD):
29+
os.system(f"start {str_EXECMD}")
30+
31+
# Button Image
32+
img_button1 = PhotoImage(file="icon\\exit_24.png")
33+
img_button2 = PhotoImage(file="icon\\shutdown_24.png")
34+
img_button3 = PhotoImage(file="icon\\archive_24.png")
35+
img_button4 = PhotoImage(file="icon\\conhost_24.png")
36+
img_button5 = PhotoImage(file="icon\\pwshell_24.png")
37+
img_button6 = PhotoImage(file="icon\\setup_24.png")
38+
img_button7 = PhotoImage(file="icon\\diskset_24.png")
39+
img_button10 = PhotoImage(file="icon\\info_24.png")
40+
41+
# Button and label
42+
labelHead1 = Label(smWindow, anchor="w", width=400, justify=LEFT, text="Power")
43+
labelHead1.grid(column=0, row=0, padx=2, columnspan=400)
44+
button1 = Button(
45+
text="Exit & Restart",
46+
image=img_button1,
47+
compound=LEFT,
48+
command=smWindow.destroy)
49+
button1.grid(column=0, row=1, padx=2)
50+
button1 = Button(
51+
text="Shutdown",
52+
image=img_button2,
53+
compound=LEFT,
54+
command=lambda: wpeutilPower("shutdown"))
55+
button1.grid(column=1, row=1, padx=2)
56+
57+
labelHead1 = Label(smWindow, anchor="w", width=400, justify=LEFT, text="Terminal")
58+
labelHead1.grid(column=0, row=2, padx=2, columnspan=400)
59+
button1 = Button(
60+
text="CMD",
61+
image=img_button4,
62+
compound=LEFT,
63+
command=lambda: executeStart("cmd.exe"))
64+
button1.grid(column=0, row=3, padx=2)
65+
button1 = Button(
66+
text="Powershell",
67+
image=img_button5,
68+
compound=LEFT,
69+
command=lambda: executeStart("powershell.exe"))
70+
button1.grid(column=1, row=3, padx=2)
71+
72+
labelHead1 = Label(smWindow, anchor="w", width=400, justify=LEFT, text="Utilities")
73+
labelHead1.grid(column=0, row=4, padx=2, columnspan=400)
74+
button1 = Button(
75+
text="File Manager",
76+
image=img_button3,
77+
compound=LEFT,
78+
command=lambda: executeStart("%WINDIR%\\APP\\7-Zip\\7zFM.exe"))
79+
button1.grid(column=0, row=5, padx=2)
80+
button1 = Button(
81+
text="DISKPART",
82+
image=img_button7,
83+
compound=LEFT,
84+
command=lambda: executeStart("DISKPART.exe"))
85+
button1.grid(column=1, row=5, padx=2)
86+
button1 = Button(
87+
text="NTSetup", # WinNTSetup by JFX ~ ENDGAME
88+
image=img_button6,
89+
compound=LEFT,
90+
command=lambda: executeStart("%WINDIR%\\APP\\WinNTSetup\\WinNTSetup_x64.exe"))
91+
button1.grid(column=2, row=5, padx=2)
92+
93+
labelHead1 = Label(smWindow, anchor="w", width=400, justify=LEFT, text="Other")
94+
labelHead1.grid(column=0, row=6, padx=2, columnspan=400)
95+
button1 = Button(
96+
text="What's PE?",
97+
image=img_button10,
98+
compound=LEFT,
99+
command=PE2.messageInfoBoxPE)
100+
button1.grid(column=0, row=7, padx=2)
101+
button1 = Button(
102+
text="About",
103+
image=img_button10,
104+
compound=LEFT,
105+
command=PE.aboutPEStart)
106+
button1.grid(column=1, row=7, padx=2)
107+
108+
smWindow.mainloop()
828 Bytes
Binary file not shown.
3.41 KB
Binary file not shown.
948 Bytes
Binary file not shown.
4.55 KB
Binary file not shown.
697 Bytes
Binary file not shown.
1.03 KB
Binary file not shown.

0 commit comments

Comments
 (0)