summaryrefslogtreecommitdiff
path: root/src/setup.py
blob: 6a55325c2e0b8b956eb2c4e36780ad5435d6e785 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

############################################################################
#                                                                          #
# Description: Fichier setup pour empaqueter l'app                         #
#                                                                          #
############################################################################

# https://github.com/jrsoftware/issrc

from os import system, mkdir
from os.path import join, isdir
from shutil import copy

icon:    str = join("app", "ressources", "icon.ico")
exePath: str = join("dist", "main", "main.exe")
dirRess: str = join("dist", "main", "ressources")
res:     int = system(f"pyinstaller -w -i {icon} main.py")

if res == 0:
    if not isdir(dirRess):
        mkdir(dirRess)
    copy(icon, dirRess)
    system(exePath)