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
| # -*- coding: utf-8 -*-
"""
Module to freeze CP-Solver program with cx-Freeze V 4.3.1
Date: 10-04-2013
"""
#-----------------------------------------------------------------------
# MODULE IMPORTATION
#-----------------------------------------------------------------------
try:
import sys, os
import matplotlib
from cx_Freeze import setup, Executable
except ImportError as exc:
sys.stderr.write("Error: failed to import settings module ({})\n".format(exc))
raw_input('Press any key to quit')
sys.exit()
#-----------------------------------------------------------------------
# PREPARATION OF THE OPTIONS
#-----------------------------------------------------------------------
path = sys.path
includes = ['CPSolver','PolarPlot','EnvLoad']
excludes = []
packages = []
includefiles = [(matplotlib.get_data_path(),'mpl-data'), # Matplotlib data
(os.getcwd()+'/Vessels','Vessels'), # Vessel library
'Logo.gif'] # Logo
options = {"path": path,
"includes": includes,
"excludes": excludes,
"packages": packages,
"include_files": includefiles
}
#-----------------------------------------------------------------------
# TARGET
#-----------------------------------------------------------------------
base = None
if sys.platform == "win32":
base = "Win32GUI"
cible = Executable(
script = "CPSolverGUI.py",
base = base,
compress = True,
icon = None,
)
#-----------------------------------------------------------------------
# SETUP
#-----------------------------------------------------------------------
setup(
name = "CP-Solver",
version = "0.1",
description = "First test",
author = "*****",
options = {"build_exe": options},
executables = [cible]
) |
Partager