1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
from cx_Freeze import setup, Executable
import os, shutil, glob, zipfile
NomFichierPy = 'Main_Window'
NomExecutable = 'Tracking'
repdst = './build/exe.win-amd64-3.8/'
Base = "Win32GUI"
Icon = './UIQT/Logos/selha.ico'
if not os.path.exists(repdst):
dst = os.mkdir(repdst)
if not os.path.exists(repdst + "UIQT/"):
dst = os.mkdir(repdst + "UIQT/")
if not os.path.exists(repdst + "UIQT/Logos/"):
dst = os.mkdir(repdst + "UIQT/Logos/")
if not os.path.exists(repdst + "UIQT/Images/"):
dst = os.mkdir(repdst + "UIQT/Images/")
files = glob.glob('./UIQT/*.*')
for f in files:
print(f)
shutil.copy(f,repdst + "/UIQT/")
files = glob.glob('./UIQT/logos/*.*')
for f in files:
print(f)
shutil.copy(f,repdst + "UIQT/Logos/")
files = glob.glob('./UIQT/Images/*.*')
for f in files:
print(f)
shutil.copy(f,repdst + "UIQT/Images/")
shutil.copy('version.txt',repdst)
#Remplacer "mon programme.py" par le nom du script qui lance votre programme
executables = [Executable(NomFichierPy + ".py", base=Base, icon = Icon)]
#Renseignez ici la liste complète des packages utilisés par votre application
packages = ["idna"]
options = {
'build_exe': {
'packages':packages,
},
}
#Adaptez les valeurs des variables "name", "version", "description" à votre programme.
setup(
name = NomExecutable,
options = options,
version = "1.0",
description = 'gmotdroit',
executables = executables
) |
Partager