[Thuban-commits] r2711 - trunk/thuban
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Oct 10 12:30:55 CEST 2006
Author: dpinte
Date: 2006-10-10 12:30:54 +0200 (Tue, 10 Oct 2006)
New Revision: 2711
Modified:
trunk/thuban/ChangeLog
trunk/thuban/setup.py
trunk/thuban/thuban.py
Log:
2006-10-10 Didrik Pinte <dpinte at itae.be>
Win32 build updates
* setup.py :
- update to the latest libs for win32 setup tasks
- added gdal and Lib content to the inno setup build task
- added stable and experimental extensions to setup packages
* thuban.py :
- gdal support for win32 inno installation
Modified: trunk/thuban/ChangeLog
===================================================================
--- trunk/thuban/ChangeLog 2006-10-10 08:31:44 UTC (rev 2710)
+++ trunk/thuban/ChangeLog 2006-10-10 10:30:54 UTC (rev 2711)
@@ -1,4 +1,17 @@
2006-10-10 Didrik Pinte <dpinte at itae.be>
+
+ Win32 build updates
+
+ * setup.py :
+ - update to the latest libs for win32 setup tasks
+ - added gdal and Lib content to the inno setup build task
+ - added stable and experimental extensions to setup packages
+
+ * thuban.py :
+ - gdal support for win32 inno installation
+
+2006-10-10 Didrik Pinte <dpinte at itae.be>
+
* Thuban/Model/layer.py (Layer.GetLabelPosFromShape): new method
extracted from Thuban/UI/viewport.py
* Thuban/UI/viewport.py (Viewport.LabelShapeAt): uses new method
Modified: trunk/thuban/setup.py
===================================================================
--- trunk/thuban/setup.py 2006-10-10 08:31:44 UTC (rev 2710)
+++ trunk/thuban/setup.py 2006-10-10 10:30:54 UTC (rev 2711)
@@ -86,22 +86,23 @@
basedir = os.path.dirname(sys.argv[0])
# Directories where Proj4 is installed
- proj4_prefix = os.path.join(basedir, "..", "proj-4.4.7", "src")
+ proj4_prefix = os.path.join(basedir, "..", "proj-4.4.9", "src")
proj4_incdir = proj4_prefix
proj4_libdir = proj4_prefix
proj4_lib = "proj_i"
# Define include and lib directories for wxWindows and
- wx_prefix = os.path.join(basedir, "..", "wxPython-2.4.2.4")
- wx_inc = [os.path.join(wx_prefix, 'lib', 'mswdllh'),
+ wx_prefix = os.path.join(basedir, "..", "wxPython-2.6.3.3")
+ wx_inc = [os.path.join(wx_prefix, 'lib', 'vc_dll', 'mswuh'),
os.path.join(wx_prefix, "include")]
- wx_lib = [os.path.join(wx_prefix, "lib")]
+ wx_lib = [os.path.join(wx_prefix, "lib", "vc_dll")]
# Define include and lib directories for GDAL
- gdal_prefix = os.path.join(basedir, "..", "gdal-1.1.8")
+ gdal_prefix = os.path.join(basedir, "..", "gdal-1.3.2")
gdal_inc = [os.path.join(gdal_prefix, 'alg'),
os.path.join(gdal_prefix, 'ogr'),
os.path.join(gdal_prefix, 'port'),
+ os.path.join(gdal_prefix, 'gcore'),
os.path.join(gdal_prefix, 'core')]
gdal_lib = [gdal_prefix]
@@ -153,10 +154,10 @@
wx_cs_params[CS_INCDIRS] = wx_inc
wx_cs_params[CS_LIBDIRS] = wx_lib
- wx_cs_params[CS_LIBS] = ["wxmsw24h"] \
+ wx_cs_params[CS_LIBS] = ["wxmsw26uh"] \
+ ['kernel32', 'user32', 'gdi32', 'comdlg32',
'winspool', 'winmm', 'shell32', 'oldnames',
- 'comctl32', 'ctl3d32', 'odbc32', 'ole32', 'oleaut32',
+ 'comctl32', 'odbc32', 'ole32', 'oleaut32',
'uuid', 'rpcrt4', 'advapi32', 'wsock32']
gdal_config_script = ""
@@ -319,6 +320,12 @@
data_files.append(("Resources/Locale/" + d +"/LC_MESSAGES",
["Resources/Locale/"+ d +"/LC_MESSAGES/thuban.mo"]))
+#add the Lib content to the output
+if os.path.isdir("Lib"):
+ for d in os.listdir("Lib"):
+ data_files.append(("Lib", ["Lib/"+d]))
+
+
#
# Command definitions
#
@@ -925,13 +932,25 @@
if self.output_basename is None:
self.output_basename = "%s-%s-%d" \
% (name, self.distribution.get_version(),
- self.iss_revision)
+ int(self.iss_revision))
def run(self, install_options = None):
"""Execute the command. install_options if given, should be a
directory of additional options to set in the install step"""
# Obviously have to build before we can install
+ # add gdal to the build
+ for (dirpath, dnames, fnames) in os.walk('gdal'):
+ files_in_dir = []
+ dp = '/'.join(dirpath.split('\\'))
+ for f in fnames:
+ if os.path.isfile(os.path.join(dirpath,f)):
+ files_in_dir.append( dp + '/' + f)
+ if len(files_in_dir) > 0:
+ data_files.append(( dp , files_in_dir))
+ # add thubaninit to the build
+
+
if not self.skip_build:
self.run_command('build')
@@ -1050,12 +1069,25 @@
"warn_dir": 0,
"extra_files": ["COPYING", "Lib/proj.dll"],
}
+ install_options["extra_files"].extend(self.get_gdal_content())
+
# don't make a symlink because we're simulating windows, so
# that we can generate the iss-file even on Linux
install_options["do_symlink"] = 0
bdist_inno.run(self, install_options)
+ def get_gdal_content(self):
+ '''
+ Return the list of files in the gdal directory of the Thuban installation
+ '''
+ gdal_files = []
+ for (dirpath, dnames, fnames) in os.walk('gdal'):
+ if len(fnames) > 0:
+ for file in fnames :
+ gdal_files.append(dirpath + os.sep + file)
+ return gdal_files
+
class thuban_build_docs(Command):
"""Command to generate documentation from source code."""
@@ -1145,7 +1177,10 @@
scripts = ["thuban.py"],
packages = ["Thuban", "Thuban.Lib", "Thuban.Model", "Thuban.UI",
"Extensions", "Extensions.gns2shp", "Extensions.wms",
- "Extensions.importAPR", "Extensions.profiling"],
+ "Extensions.importAPR", "Extensions.profiling",
+ "Extensions.svgexport", "Extensions.mouseposition",
+ "Extensions.bboxdump", "Extensions.ogr",
+ "Extensions.umn_mapserver"],
ext_modules = extensions,
py_modules = py_modules,
data_files = data_files,
@@ -1159,7 +1194,6 @@
"install_lib": "$base/lib/thuban",
"install_scripts": "$base/lib/thuban",
"install_data": "$base/lib/thuban",
-
# Don't print warning messages about the lib dir not
# being on Python's path. The libraries are Thuban
# specific and are installed just for Thuban. They'll
Modified: trunk/thuban/thuban.py
===================================================================
--- trunk/thuban/thuban.py 2006-10-10 08:31:44 UTC (rev 2710)
+++ trunk/thuban/thuban.py 2006-10-10 10:30:54 UTC (rev 2711)
@@ -17,6 +17,18 @@
if os.path.isdir(dir):
sys.path.insert(0, dir)
+# win32 gdal support
+if sys.platform == 'win32':
+ # PYTHONPATH update
+ dir = os.path.join(thubandir, "gdal", "pymod")
+ if os.path.isdir(dir):
+ sys.path.append(dir)
+
+ try:
+ import gdal
+ except ImportError:
+ print "Please update your PATH environment variable to include %s\\gdal\\bin" % thubandir
+
import Thuban.UI.main
# Start Thuban
More information about the Thuban-commits
mailing list