2024-03-02 21:05:13 -05:00
|
|
|
import os
|
|
|
|
import PyInstaller.__main__
|
|
|
|
from distutils.sysconfig import get_python_lib
|
|
|
|
|
|
|
|
site_packages_path = get_python_lib()
|
|
|
|
|
|
|
|
NAME = "IW4MAdmin_DB_Parser"
|
2024-03-02 22:48:29 -05:00
|
|
|
SCRIPT = "parse_db.py"
|
|
|
|
ICON = "assets/icon.png"
|
2024-03-02 21:05:13 -05:00
|
|
|
|
|
|
|
PyInstaller.__main__.run([
|
|
|
|
"{}".format(SCRIPT),
|
|
|
|
'--name', f"{NAME}",
|
|
|
|
"--noconfirm",
|
|
|
|
"--onefile",
|
|
|
|
"--windowed",
|
2024-03-02 22:48:29 -05:00
|
|
|
"--icon", f"{ICON}"
|
2024-03-02 21:05:13 -05:00
|
|
|
])
|
|
|
|
|
|
|
|
# create symbolic hardlink to main directory
|
|
|
|
if os.path.exists("combine_db.exe"):
|
|
|
|
os.remove("combine_db.exe")
|
|
|
|
os.link('dist/IW4MAdmin_DB_Parser.exe', 'IW4MAdmin_DB_Parser.exe')
|