Index: wflow-py/make_wflow_exe.py =================================================================== diff -u -r11b21eb75041e382f55243d65b2bc55a16fed27e -r368a19849555f5d349fdb349010530b3e7207d95 --- wflow-py/make_wflow_exe.py (.../make_wflow_exe.py) (revision 11b21eb75041e382f55243d65b2bc55a16fed27e) +++ wflow-py/make_wflow_exe.py (.../make_wflow_exe.py) (revision 368a19849555f5d349fdb349010530b3e7207d95) @@ -1,17 +1,19 @@ from distutils.core import setup from bbfreeze import Freezer from _version import * -import ctypes +import ctypes,glob,os,shutil +import matplotlib def dependencies_for_freeezing(): import netCDF4_utils nrbits = str(ctypes.sizeof(ctypes.c_voidp) * 8) +data_files=matplotlib.get_py2exe_datafiles() - - +thename = "Wflow"+MVERSION+'-'+nrbits f = Freezer("Wflow"+MVERSION+'-'+nrbits) f.addScript("wflow/__init__.py") +f.addScript("wflow/wflow_topoflex.py") f.addScript("wflow/wflow_sbm.py") f.addScript("wflow/wflow_hbv.py") f.addScript("wflow/wflow_adapt.py") @@ -29,3 +31,21 @@ f.addScript("Scripts/pcr2netcdf.py") #f.addScript("wflow/wflow_fit.py") # Does not work becuse of QT f() # starts the freezing process + + +ddir = "c:/pcraster4-64/lib/" +data_files.append((".", glob.glob(ddir + "/*.dll"))) +print data_files +gdaldata = os.getenv("GDAL_DATA") +data_files.append(("./gdal-data", glob.glob(gdaldata + "/*.*"))) + +print data_files +print "Copying extra data files..." +for dirr in data_files: + timake = os.path.join(thename ,dirr[0]) + print timake + if not os.path.exists(timake): + os.makedirs(timake) + for tocp in dirr[1]: + print tocp + shutil.copy(tocp,timake)