Index: sansview/build_sansview.py
===================================================================
--- sansview/build_sansview.py	(revision 391c480f00e36cb17f0986eee04379506a449808)
+++ 	(revision )
@@ -1,413 +1,0 @@
-# 
-# Script to get source from SVN and build SansView
-#
-# Read the release notes to make ensure that the required software is installed.
-#
-# SVN must be installed:
-# http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91
-#
-#
-# On Windows: 
-#   - make sure svn.exe in on the path. You might need to log out and log back in again after installing SVN.
-#
-#   - Inno Setup must be installed
-#
-#   - py2exe must be installed 
-#
-#   - mingw must be installed
-#
-# On Mac:
-#   - py2app must be installed
-#   - macholib must be installed to use py2app
-#   - modulegraph must be installed to use py2app
-#
-# Usage:
-# python build_sansview [command]
-# [command] can be any of the following:
-#   -h: lists the command line options
-#   -r: Builds a SansView using the released modules.
-#   -t: Builds SansView from the trubuild_sank.
-#   -i: Builds a Windows installer from the release version.
-#   -n: Print out the dependencies for the release notes
-
-import os
-import sys
-import shutil
-import logging
-
-# Installation folder
-import time
-timestamp = int(time.time())
-CWD    = os.getcwd()
-INSTALL_FOLDER = "install_%s" % str(timestamp)
-
-# On Windows, the python executable is not always on the path.
-# Use its most frequent location as the default.
-# Select the appropriate python version to use.
-if sys.version_info >= (3, 0) or sys.version_info < (2, 5):
-    print "*** This script only works with Python 2.5, 2.6, or 2.7."
-    sys.exit()
-elif sys.version_info > (2, 6):
-    P_version = 27
-elif sys.version_info > (2, 5):
-    P_version = 26
-else:
-    P_version = 25
-    
-if sys.platform == 'win32':
-    PYTHON = "c:\python%s\python"% str(P_version)
-    LIB_FOLDER = "%s/%s" % (CWD, INSTALL_FOLDER)
-else:
-    PYTHON = 'python'
-
-logging.basicConfig(level=logging.INFO,
-                    format='%(asctime)s %(levelname)s %(message)s',
-                    filename='build_%s.log' % str(timestamp),
-                    filemode='w')
-
-SVN    = "svn"
-INNO   = "\"c:\Program Files\Inno Setup 5\ISCC\""
-
-# Release version 2.0
-SANSMODELS = "1.0.0"
-DATALOADER = "1.0.0"
-GUIFRAME   = "1.0.1"
-SANSVIEW   = "2.0.1"
-PLOTTOOLS  = "1.0.0"
-UTIL       = "1.0.0"
-PARK       = "1.2.1"
-PARK_INTEG = "1.0.1"
-PRVIEW     = "1.0.0"
-PR_INV     = "1.0.0"
-CALCULATOR = "1.0.0"
-CALC_VIEW  = "1.0.0"
-INVARIANT  = "1.0.0"
-INV_VIEW   = "1.0.0"
-FIT_VIEW   = "1.0.1"
-
-# URLs for SVN repos
-SANSMODELS_URL = "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/releases/sansmodels-%s" % SANSMODELS
-DATALOADER_URL = "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/releases/sansdataloader-%s" % DATALOADER
-GUIFRAME_URL = "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/releases/sansguiframe-%s" % GUIFRAME
-PLOTTOOLS_URL = "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/releases/common-releases/plottools-%s" % PLOTTOOLS
-UTIL_URL = "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/releases/common-releases/util-%s" % UTIL
-SANSVIEW_URL = "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/releases/sansview-%s" % SANSVIEW
-FIT_URL = "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/releases/fittingview-%s" % FIT_VIEW
-PARK_INTEG_URL = "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/releases/park_integration-%s" % PARK_INTEG
-PARK_URL = "svn://danse.us/park/releases/park-%s" % PARK
-PRVIEW_URL = "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/releases/inversionview-%s" % PRVIEW
-PR_INV_URL = "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/releases/pr_inversion-%s" % PR_INV
-CALC_URL = "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/releases/sanscalculator-%s" % CALCULATOR
-CALC_VIEW_URL = "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/releases/calculatorview-%s" % CALC_VIEW
-INV_URL = "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/releases/sansinvariant-%s" % INVARIANT
-INV_VIEW_URL = "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/releases/invariantview-%s" % INV_VIEW
-
-def check_system():
-    """
-        Checks that the system has the necessary modules.
-    """
-    try:
-        import wx
-    except:
-        logging.error("wxpython missing")
-    
-    try:
-        import matplotlib
-    except:
-        logging.error("matplotlib missing")
-        
-    try:
-        import numpy
-    except:
-        logging.error("numpy missing")
-        
-    try:
-        import scipy
-    except:
-        logging.error("scipy missing")
-
-    try:
-        import periodictable
-    except:
-        logging.error("periodictable missing")
-        
-    if os.system("gcc -dumpversion")==1:
-        logging.error("missing mingw")
-
-def install_pkg(install_dir, setup_dir, url):
-    """
-        Check a package out and install it
-        
-        @param install_dir: directory to put the code in
-        @param setup_dir: relative location of the setup.py script
-        @param url: URL of the SVN repo
-    """
-    #print "PYTHON, LIB_FOLDER=====",PYTHON, LIB_FOLDER
-    logging.info("Installing %s" % url)
-    try:
-        if not os.path.isdir(install_dir):
-            os.mkdir(install_dir)
-        os.chdir(install_dir)
-        build_num = os.path.basename(os.getcwd())   
-        os.system("%s checkout -q %s" % (SVN, url))        
-        os.chdir(setup_dir)
-        if setup_dir.count('sansview') > 0:
-            conf_file = open('local_config.py', 'rw')
-            conf = conf_file.read()
-            conf = '__build__ = %s %s \n'% (build_num, time.localtime()) +\
-                     conf
-            conf_file.write(conf)
-            conf_file.close()
-            print "install_dir", build_num,'__build__ = %s %s \n'% (build_num, time.localtime())
-        if sys.platform == 'win32':
-            os.system("%s setup.py -q build -cmingw32" % PYTHON)
-            os.system("%s setup.py -q install --root \"%s\"" % (PYTHON, LIB_FOLDER))
-        else:
-            os.system("%s setup.py build" % PYTHON)
-            os.system("%s setup.py install --prefix ~/.local" % PYTHON)
-    except:
-        logging.error("Install failed for %s" % url)
-        logging.error(sys.exc_value)
-        raw_input("Press enter to continue\n")
-        sys.exit()
-    
-def checkout(release=False):
-    """
-        Check the SansView code out
-    """
-    wd = os.getcwd()
-    
-    os.chdir(wd)
-    if release:
-        install_pkg(".", "sansdataloader-%s" % DATALOADER, DATALOADER_URL)
-    else:
-        install_pkg(".", "sansdataloader", "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/trunk/sansdataloader")
-    
-    os.chdir(wd)
-    if release:
-        install_pkg(".", "sansmodels-%s" % SANSMODELS, SANSMODELS_URL)
-    else:
-        install_pkg(".", "sansmodels", "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/trunk/sansmodels")
-    
-    os.chdir(wd)
-    if release:
-        install_pkg(".", "sansguiframe-%s" % GUIFRAME, GUIFRAME_URL)
-    else:
-        install_pkg(".", "sansguiframe", "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/trunk/sansguiframe")
-    
-    os.chdir(wd)
-    if release:
-        install_pkg(".", "plottools-%s" % PLOTTOOLS, PLOTTOOLS_URL)
-    else:
-        install_pkg(".", "plottools", "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/trunk/plottools")
-    
-    os.chdir(wd)
-    if release:
-        install_pkg(".", "sansutil-%s" % UTIL, UTIL_URL)
-    else:
-        install_pkg(".", "sansutil", "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/trunk/sansutil")
-    
-    os.chdir(wd)
-    if release:
-        install_pkg(".", "park_integration-%s" % PARK_INTEG, PARK_INTEG_URL)
-    else:
-        install_pkg(".", "park_integration", "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/trunk/park_integration")
-    
-    os.chdir(wd)
-    if release:
-        install_pkg(".", "inversionview-%s" % PRVIEW, PRVIEW_URL)
-    else:
-        install_pkg(".", "inversionview", "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/trunk/inversionview")
-    
-    os.chdir(wd)
-    if release:
-        install_pkg(".", "pr_inversion-%s" % PR_INV, PR_INV_URL)
-    else:
-        install_pkg(".", "pr_inversion", "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/trunk/pr_inversion")
-    
-    os.chdir(wd)
-    if release:
-        install_pkg(".", "sansinvariant-%s" % INVARIANT, INV_URL)
-    else:
-        install_pkg(".", "sansinvariant", "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/trunk/sansinvariant")
-    
-    os.chdir(wd)
-    if release:
-        install_pkg(".", "invariantview-%s" % INV_VIEW, INV_VIEW_URL)
-    else:
-        install_pkg(".", "invariantview", "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/trunk/invariantview")
-    
-    os.chdir(wd)
-    if release:
-        install_pkg(".", "calculatorview-%s" % CALC_VIEW, CALC_VIEW_URL)
-    else:
-        install_pkg(".", "calculatorview", "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/trunk/calculatorview")
-    
-    os.chdir(wd)
-    if release:
-        install_pkg(".", "sanscalculator-%s" % CALCULATOR, CALC_URL)
-    else:
-        install_pkg(".", "sanscalculator", "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/trunk/sanscalculator")
-
-
-    os.chdir(wd)
-    if release:
-        install_pkg(".", "park-%s" % PARK, PARK_URL)
-    else:
-        install_pkg(".", "park-1.2.1", "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/trunk/park-1.2.1")
-        
-    os.chdir(wd)
-    if release:
-        install_pkg(".", "fittingview-%s" % FIT_VIEW, FIT_URL)
-    else:
-        install_pkg(".", "fittingview", "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/trunk/fittingview")
-            
-    os.chdir(wd)
-    if release:
-        os.system("%s checkout -q %s" % (SVN, SANSVIEW_URL))
-    else:
-        os.system("%s checkout -q https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/trunk/sansview" % SVN)
-    # put build number to local_config
-    try:
-        build_num = os.path.basename(wd).split('_')[1] 
-        if sys.argv[1]=="-r":
-            sansview_folder = "sansview-%s" % (SANSVIEW) 
-        else:
-            sansview_folder = "sansview"  
-        # try to make the sansview dir writable 
-        try:
-            if sys.platform == 'darwin':
-                os.system("chmod -R g+w %s"% sansview_foler) 
-            else:
-                os.system("chmod 777 -R %s"% sansview_foler)
-        except:
-            pass
-        os.chdir(sansview_folder)
-        if os.getcwd().count('sansview') > 0:
-            conf_file = open('local_config.py', 'r')
-            conf = ''
-            import datetime
-            for line in conf_file.readlines():
-                if line.count('__build__'):
-                    conf += "__build__ = '%s-%s' \n"% (build_num, datetime.date.today())
-                else:
-                    conf += line
-            conf_file.close()
-            conf_file = open('local_config.py', 'w')
-            conf_file.write(conf)
-            conf_file.close()
-    except:
-        pass
-    os.chdir(wd)
-    
-def prepare(wipeout = False):
-    """
-        Prepare the build
-        
-        @param wipeout: If True, the DANSE modules in the standard site-packages will be
-        removed to avoid conflicts.
-    """
-    # Remove existing libraries
-    if wipeout == True:
-        logging.info("Deleting DANSES modules in site-packages")
-        from distutils.sysconfig import get_python_lib
-        libdir = get_python_lib()
-        old_dirs = [os.path.join(libdir, 'danse'),
-                    os.path.join(libdir, 'data_util'),
-                    os.path.join(libdir, 'park'),
-                    os.path.join(libdir, 'sans'),
-                    ]
-        for d in old_dirs:
-            if os.path.isdir(d):
-                shutil.rmtree(d)
-        
-    # Create a fresh installation folder
-    if os.path.isdir(INSTALL_FOLDER):
-        shutil.rmtree(INSTALL_FOLDER)
-
-    os.mkdir(INSTALL_FOLDER)
-    
-    # Check that the dependencies are properly installed
-    check_system()    
-    
-    # Move to the installation folder
-    os.chdir(INSTALL_FOLDER)    
-
-def warning():
-    """
-        The build script will wipe out part of the site-packages.
-        Ask the user whether he wants to proceed.
-    """
-    print "WARNING!\n"
-    print "In order to build a clean version of SansView, this script"
-    print "deletes anything found under site-packages for the following"
-    print "modules:"
-    print "   - danse"
-    print "   - data_util"
-    print "   - DataLoader"
-    print "   - park"
-    print "   - sans"
-    print "   - sans_extension\n"
-    answer = raw_input("Do you want to delete those modules [Y] or continue with a dirty installation [N]? [Y|N]")
-    return answer.upper()=="Y"
-        
-if __name__ == "__main__": 
-    
-    if len(sys.argv)==1:
-        # If there is no argument, build the installer
-        sys.argv.append("-i")
-        
-    if len(sys.argv)>1:
-        # Help
-        if sys.argv[1]=="-h":
-            print "Usage:"
-            print "    python build_sansview [command]\n"
-            print "[command] can be any of the following:"
-            print "    -h: lists the command line options"
-            print "    -r: Builds a SansView using the released modules"
-            print "    -t: Builds SansView from the trunk"
-            print "    -i: Builds an installer from the release version [Windows only]"        
-            print "    -n: Print out the dependencies for the release notes"
-        elif sys.argv[1]=="-n":
-            # Print out release URLs
-            print SANSMODELS_URL 
-            print DATALOADER_URL 
-            print GUIFRAME_URL 
-            print PLOTTOOLS_URL 
-            print UTIL_URL 
-            print SANSVIEW_URL
-            print PARK_INTEG_URL 
-            print PARK_URL 
-            print PRVIEW 
-            print PR_INV 
-            print FIT_URL
-        else:
-            logging.info("Build script for SansView %s" % SANSVIEW)
-                    
-            # Prepare installation folder
-            prepare(warning())
-            
-            # Check the command line argument
-            if sys.argv[1]=="-t":
-                logging.info("Building trunk version")
-                checkout()
-            elif sys.argv[1]=="-r":
-                logging.info("Building release version")
-                checkout(True)
-            elif sys.argv[1]=="-i":
-                logging.info("Building release version")
-                checkout(True)
-                if sys.platform=='win32':
-                    logging.info("Building Windows installer from release version")
-                    os.chdir("sansview-%s" % (SANSVIEW))
-                    os.system("%s setup_exe.py py2exe --extrapath \"%s\python25\lib\site-packages\"" % (PYTHON, LIB_FOLDER))
-                    os.system("%s/Q installer.iss" % INNO)
-                    shutil.copy2(os.path.join("Output","setupSansView.exe"), 
-                                 os.path.join(CWD, "setupSansView_%s.exe" % str(timestamp)))
-                elif sys.platform=='darwin':
-                    logging.info("Building Mac application from release version")
-                    os.chdir("sansview-%s" % (SANSVIEW))
-                    os.system("%s setup_mac.py py2app" % PYTHON)                    
-                    
-    raw_input("Press enter to continue\n")
-    
Index: sansview/build_tar.py
===================================================================
--- sansview/build_tar.py	(revision 1f177cc2e53f5db69cdefe6d990ad42588eeef34)
+++ 	(revision )
@@ -1,468 +1,0 @@
-# 
-# Script to get source from SVN and build SansView
-#
-# Read the release notes to make ensure that the required software is installed.
-#
-# SVN must be installed:
-# http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91
-#
-#
-# On Windows: 
-#   - make sure svn.exe in on the path. You might need to log out and log back in again after installing SVN.
-#
-#   - Inno Setup must be installed
-#
-#   - py2exe must be installed 
-#
-#   - mingw must be installed
-#
-# On Mac:
-#   - py2app must be installed
-#   - macholib must be installed to use py2app
-#   - modulegraph must be installed to use py2app
-#
-# Usage:
-# python build_sansview [command]
-# [command] can be any of the following:
-#   -h: lists the command line options
-#   -r: Builds a SansView using the released modules.
-#   -t: Builds SansView from the trubuild_sank.
-#   -i: Builds a Windows installer from the release version.
-#   -n: Print out the dependencies for the release notes
-
-import os
-import sys
-import shutil
-import logging
-
-# Installation folder
-import time
-timestamp = int(time.time())
-CWD    = os.getcwd()
-INSTALL_FOLDER = "install_%s" % str(timestamp)
-
-# On Windows, the python executable is not always on the path.
-# Use its most frequent location as the default.
-if sys.platform == 'win32':
-    PYTHON = "c:\python25\python"
-    LIB_FOLDER = "%s/%s" % (CWD, INSTALL_FOLDER)
-else:
-    PYTHON = 'python'
-
-logging.basicConfig(level=logging.INFO,
-                    format='%(asctime)s %(levelname)s %(message)s',
-                    filename='build_%s.log' % str(timestamp),
-                    filemode='w')
-
-SVN    = "svn"
-INNO   = "\"c:\Program Files\Inno Setup 5\ISCC\""
-
-# Release version 2.0
-SANSMODELS = "1.0.0"
-DATALOADER = "1.0.0"
-GUIFRAME   = "1.0.1"
-SANSVIEW   = "2.0.1"
-PLOTTOOLS  = "1.0.0"
-UTIL       = "1.0.0"
-PARK       = "1.2.1"
-PARK_INTEG = "1.0.1"
-PRVIEW     = "1.0.0"
-PR_INV     = "1.0.0"
-CALCULATOR = "1.0.0"
-CALC_VIEW  = "1.0.0"
-INVARIANT  = "1.0.0"
-INV_VIEW   = "1.0.0"
-FIT_VIEW   = "1.0.1"
-
-# URLs for SVN repos
-# URLs for SVN repos
-SANSMODELS_URL = "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/releases/sansmodels-%s" % SANSMODELS
-DATALOADER_URL = "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/releases/sansdataloader-%s" % DATALOADER
-GUIFRAME_URL = "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/releases/sansguiframe-%s" % GUIFRAME
-PLOTTOOLS_URL = "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/releases/common-releases/plottools-%s" % PLOTTOOLS
-UTIL_URL = "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/releases/common-releases/util-%s" % UTIL
-SANSVIEW_URL = "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/releases/sansview-%s" % SANSVIEW
-FIT_URL = "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/releases/fittingview-%s" % FIT_VIEW
-PARK_INTEG_URL = "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/releases/park_integration-%s" % PARK_INTEG
-PARK_URL = "svn://danse.us/park/releases/park-%s" % PARK
-PRVIEW_URL = "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/releases/inversionview-%s" % PRVIEW
-PR_INV_URL = "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/releases/pr_inversion-%s" % PR_INV
-CALC_URL = "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/releases/sanscalculator-%s" % CALCULATOR
-CALC_VIEW_URL = "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/releases/calculatorview-%s" % CALC_VIEW
-INV_URL = "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/releases/sansinvariant-%s" % INVARIANT
-INV_VIEW_URL = "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/releases/invariantview-%s" % INV_VIEW
-
-def check_system():
-    """
-        Checks that the system has the necessary modules.
-    """
-    is_ok = True
-    try:
-        import wx
-        if not wx.__version__.count('2.8.11') and \
-             not wx.__version__.count('2.8.12'):
-            print "wx: Recommending version 2.8.11 or 2.8.12"
-    except:
-        is_ok = False
-        print "Error: wxpython 2.8.11 (12) missing"
-        logging.error("wxpython missing")
-    
-    try:
-        import matplotlib
-        if not matplotlib.__version__.count('0.99.0') and \
-             not matplotlib.__version__.count('0.99.1'):
-            print "matplotlib: Recommending version 0.99.0 or 0.99.1"
-    except:
-        is_ok = False
-        print "Error: matplotlib 0.99.0 (1) missing"
-        logging.error("matplotlib missing")
-        
-    try:
-        import numpy 
-        if not numpy.__version__.count('1.4.1'):
-            print "numpy: Recommending version 1.4.1"
-    except:
-        is_ok = False
-        print "Error: numpy 1.4.1 missing"
-        logging.error("numpy missing")
-        
-    try:
-        import scipy 
-        if not scipy.__version__.count('0.7.2'):
-            print "scipy: Recommending version 0.7.2"
-    except:
-        is_ok = False
-        print "Error: scipy 0.7.2 missing"
-        logging.error("scipy missing")
-
-    try:
-        import periodictable
-        if not periodictable.__version__.count('1.3.0'):
-            print "periodictable: Recommending version 1.3.0"
-    except:
-        print "Trying to install perodic table..."
-        try:
-            os.system("easy_install periodictable")
-            print "installed periodictable"
-        except:
-            is_ok = False
-            print "easy_install periodictable failed"
-            logging.error("periodictable missing")
-        
-    try:
-        if sys.platform.count("win32")> 0:
-            from wx.lib.pdfwin import PDFWindow   
-    except:
-        try:
-            os.system("easy_install comtypes")
-            print "installed comtypes"
-        except:
-            is_ok = False
-            print "easy_install comtypes failed"
-            logging.error("comtypes missing")
-        
-    try:
-        if sys.platform.count("win32")> 0:
-            import win32com
-    except:
-        try:
-            os.system("easy_install pywin32")
-            print "installed pywin32"
-        except:
-            is_ok = False
-            print "easy_install pywin32 failed"
-            logging.error("pywin32 missing")
-            
-    try:
-        import pyparsing
-    except:
-        try:
-            os.system("easy_install pyparsing")
-            print "installed pyparsing"
-        except:
-            is_ok = False
-            print "easy_install pyparsing failed"
-            logging.error("pyparsing missing")
-              
-    if os.system("gcc -dumpversion")==1:
-        is_ok = False
-        logging.error("missing mingw")
-    
-    return is_ok
-
-def install_pkg(install_dir, setup_dir, url):
-    """
-        Check a package out and install it
-        
-        @param install_dir: directory to put the code in
-        @param setup_dir: relative location of the setup.py script
-        @param url: URL of the SVN repo
-    """
-    #print "PYTHON, LIB_FOLDER=====",PYTHON, LIB_FOLDER
-    logging.info("Installing %s" % url)
-    try:
-        if not os.path.isdir(install_dir):
-            os.mkdir(install_dir)
-        os.chdir(install_dir)   
-        os.system("%s checkout -q %s" % (SVN, url))        
-    except:
-        logging.error("Install failed for %s" % url)
-        logging.error(sys.exc_value)
-        raw_input("Press enter to continue\n")
-        sys.exit()
-    
-def checkout(release=False):
-    """
-        Check the SansView code out
-    """
-    wd = os.getcwd()
-    
-    os.chdir(wd)
-    if release:
-        install_pkg(".", "sansdataloader-%s" % DATALOADER, DATALOADER_URL)
-    else:
-        install_pkg(".", "sansdataloader", "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/trunk/sansdataloader")
-    
-    os.chdir(wd)
-    if release:
-        install_pkg(".", "sansmodels-%s" % SANSMODELS, SANSMODELS_URL)
-    else:
-        install_pkg(".", "sansmodels", "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/trunk/sansmodels")
-    
-    os.chdir(wd)
-    if release:
-        install_pkg(".", "sansguiframe-%s" % GUIFRAME, GUIFRAME_URL)
-    else:
-        install_pkg(".", "sansguiframe", "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/trunk/sansguiframe")
-    
-    os.chdir(wd)
-    if release:
-        install_pkg(".", "plottools-%s" % PLOTTOOLS, PLOTTOOLS_URL)
-    else:
-        install_pkg(".", "plottools", "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/trunk/plottools")
-    
-    os.chdir(wd)
-    if release:
-        install_pkg(".", "util-%s" % UTIL, UTIL_URL)
-    else:
-        install_pkg(".", "util", "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/trunk/sansutil")
-    
-    os.chdir(wd)
-    if release:
-        install_pkg(".", "park_integration-%s" % PARK_INTEG, PARK_INTEG_URL)
-    else:
-        install_pkg(".", "park_integration", "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/trunk/park_integration")
-    
-    os.chdir(wd)
-    if release:
-        install_pkg(".", "inversionview-%s" % PRVIEW, PRVIEW_URL)
-    else:
-        install_pkg(".", "inversionview", "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/trunk/inversionview")
-    
-    os.chdir(wd)
-    if release:
-        install_pkg(".", "pr_inversion-%s" % PR_INV, PR_INV_URL)
-    else:
-        install_pkg(".", "pr_inversion", "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/trunk/pr_inversion")
-    
-    os.chdir(wd)
-    if release:
-        install_pkg(".", "sansinvariant-%s" % INVARIANT, INV_URL)
-    else:
-        install_pkg(".", "sansinvariant", "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/trunk/sansinvariant")
-    
-    os.chdir(wd)
-    if release:
-        install_pkg(".", "invariantview-%s" % INV_VIEW, INV_VIEW_URL)
-    else:
-        install_pkg(".", "invariantview", "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/trunk/invariantview")
-    
-    os.chdir(wd)
-    if release:
-        install_pkg(".", "calculatorview-%s" % CALC_VIEW, CALC_VIEW_URL)
-    else:
-        install_pkg(".", "calculatorview", "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/trunk/calculatorview")
-    
-    os.chdir(wd)
-    if release:
-        install_pkg(".", "sanscalculator-%s" % CALCULATOR, CALC_URL)
-    else:
-        install_pkg(".", "sanscalculator", "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/trunk/sanscalculator")
-
-
-    os.chdir(wd)
-    if release:
-        install_pkg(".", "park-%s" % PARK, PARK_URL)
-    else:
-        install_pkg(".", "park-1.2", "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/trunk/park-1.2")
-        
-    os.chdir(wd)
-    if release:
-        install_pkg(".", "fittingview-%s" % FIT_VIEW, FIT_URL)
-    else:
-        install_pkg(".", "fittingview", "https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/trunk/fittingview")
-            
-    os.chdir(wd)
-    if release:
-        os.system("%s checkout -q %s" % (SVN, SANSVIEW_URL))
-    else:
-        os.system("%s checkout -q https://sansviewproject.svn.sourceforge.net/svnroot/sansviewproject/trunk/sansview" % SVN)
-    
-    # put build number to local_config
-    try:
-        build_num = os.path.basename(wd).split('_')[1] 
-        if sys.argv[1]=="-r":
-            sansview_folder = "sansview-%s" % (SANSVIEW) 
-        else:
-            sansview_folder = "sansview"  
-        # try to make the sansview dir writable 
-        try:
-            if sys.platform == 'darwin':
-                os.system("chmod -R g+w %s"% sansview_foler) 
-            else:
-                os.system("chmod 777 -R %s"% sansview_foler)
-        except:
-            pass
-        os.chdir(sansview_folder)
-        if os.getcwd().count('sansview') > 0:
-            conf_file = open('local_config.py', 'r')
-            conf = ''
-            import datetime
-            for line in conf_file.readlines():
-                if line.count('__build__'):
-                    conf += "__build__ = '%s-%s' \n"% (build_num, datetime.date.today())
-                else:
-                    conf += line
-            conf_file.close()
-            conf_file = open('local_config.py', 'w')
-            conf_file.write(conf)
-            conf_file.close()
-    except:
-        pass
-    
-    os.chdir(wd)
-    for folder in os.listdir(wd):
-        package_dir = os.path.join(wd, folder)
-        if os.path.isdir(package_dir):
-            try:
-                if sys.platform == 'darwin':
-                    os.system("chmod -R g+w %s"% package_dir) 
-                else:
-                    os.system("chmod 777 -R %s"% package_dir)
-            except:
-                pass
-    os.chdir(wd)
-    
-    
-def prepare(wipeout = False):
-    """
-        Prepare the build
-        
-        @param wipeout: If True, the DANSE modules in the standard site-packages will be
-        removed to avoid conflicts.
-    """
-    # Remove existing libraries
-    if wipeout == True:
-        logging.info("Deleting DANSES modules in site-packages")
-        from distutils.sysconfig import get_python_lib
-        libdir = get_python_lib()
-        old_dirs = [os.path.join(libdir, 'danse'),
-                    os.path.join(libdir, 'data_util'),
-                    os.path.join(libdir, 'park'),
-                    os.path.join(libdir, 'sans'),
-                    ]
-        for d in old_dirs:
-            if os.path.isdir(d):
-                shutil.rmtree(d)
-        
-    # Create a fresh installation folder
-    if os.path.isdir(INSTALL_FOLDER):
-        shutil.rmtree(INSTALL_FOLDER)
-
-    os.mkdir(INSTALL_FOLDER)
-    
-    # Check that the dependencies are properly installed
-    if not check_system():
-        raise "Please install the above missing packages first..."  
-    
-    # Move to the installation folder
-    os.chdir(INSTALL_FOLDER)    
-
-def warning():
-    """
-        The build script will wipe out part of the site-packages.
-        Ask the user whether he wants to proceed.
-    """
-    print "WARNING!\n"
-    print "In order to build a clean version of SansView, this script"
-    print "deletes anything found under site-packages for the following"
-    print "modules:"
-    print "   - danse"
-    print "   - data_util"
-    print "   - DataLoader"
-    print "   - park"
-    print "   - sans"
-    print "   - sans_extension\n"
-    answer = raw_input("Do you want to delete those modules [Y] or continue with a dirty installation [N]? [Y|N]")
-    return answer.upper()=="Y"
-        
-if __name__ == "__main__": 
-    
-    if len(sys.argv)==1:
-        # If there is no argument, build the installer
-        sys.argv.append("-i")
-        
-    if len(sys.argv)>1:
-        # Help
-        if sys.argv[1]=="-h":
-            print "Usage:"
-            print "    python build_sansview [command]\n"
-            print "[command] can be any of the following:"
-            print "    -h: lists the command line options"
-            print "    -r: Builds a SansView using the released modules"
-            print "    -t: Builds SansView from the trunk"
-            print "    -i: Builds an installer from the release version [Windows only]"        
-            print "    -n: Print out the dependencies for the release notes"
-        elif sys.argv[1]=="-n":
-            # Print out release URLs
-            print SANSMODELS_URL 
-            print DATALOADER_URL 
-            print GUIFRAME_URL 
-            print PLOTTOOLS_URL 
-            print UTIL_URL 
-            print SANSVIEW_URL
-            print PARK_INTEG_URL 
-            print PARK_URL 
-            print PRVIEW 
-            print PR_INV 
-            print FIT_URL
-        else:
-            logging.info("Build script for SansView %s" % SANSVIEW)
-                    
-            # Prepare installation folder
-            prepare(warning())
-            
-            # Check the command line argument
-            if sys.argv[1]=="-t":
-                logging.info("Building trunk version")
-                checkout()
-            elif sys.argv[1]=="-r":
-                logging.info("Building release version")
-                checkout(True)
-            elif sys.argv[1]=="-i":
-                logging.info("Building release version")
-                checkout(True)
-                if sys.platform=='win32':
-                    logging.info("Building Windows installer from release version")
-                    os.chdir("sansview-%s" % (SANSVIEW))
-                    os.system("%s setup_exe.py py2exe --extrapath \"%s\python25\lib\site-packages\"" % (PYTHON, LIB_FOLDER))
-                    os.system("%s/Q installer.iss" % INNO)
-                    shutil.copy2(os.path.join("Output","setupSansView.exe"), 
-                                 os.path.join(CWD, "setupSansView_%s.exe" % str(timestamp)))
-                elif sys.platform=='darwin':
-                    logging.info("Building Mac application from release version")
-                    os.chdir("sansview-%s" % (SANSVIEW))
-                    os.system("%s setup_mac.py py2app" % PYTHON)                    
-                    
-    raw_input("Press enter to continue\n")
-    
Index: sansview/clean.py
===================================================================
--- sansview/clean.py	(revision db67f3e779b0a8a89f9ab253f33c4c809f375c80)
+++ 	(revision )
@@ -1,13 +1,0 @@
-"""
-    Remove all compiled code.
-"""
-import os
-
-filedirs = ['.']
-
-for d in filedirs:
-    files = os.listdir(d)
-    for f in files:
-        if f.find('.pyc')>0:
-            print "Removed", f
-            os.remove(os.path.join(d,f))
Index: sansview/installer.iss
===================================================================
--- sansview/installer.iss	(revision fa5979903069ec07217984e991d9c863a7cc3766)
+++ sansview/installer.iss	(revision 5c3aafa3f0d20d6026d43914144d152eb0d07d01)
@@ -1,14 +1,19 @@
-; Script generated by the Inno Setup Script Wizard.
-; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
 
+; Script generated by the Inno Setup Script Wizard
+
+; and local_config.py located in this directory.
+ ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
 [Setup]
-AppName=SansView-Dev12132010
-AppVerName=SansView Dev12132010
-AppPublisher=University of Tennessee
-AppPublisherURL=http://danse.chem.utk.edu/
-AppSupportURL=http://danse.chem.utk.edu/
-AppUpdatesURL=http://danse.chem.utk.edu/
-DefaultDirName={pf}\SansView-Dev12132010
-DefaultGroupName=DANSE\SansView-Dev12132010
+
+ChangesAssociations=yes
+AppName=SansView
+AppVerName=SansView-2.0.1
+AppPublisher=(c) 2009 - 2011, University of Tennessee
+AppPublisherURL=http://danse.chem.utk.edu
+AppSupportURL=http://danse.chem.utk.edu
+AppUpdatesURL=http://danse.chem.utk.edu 
+ChangesEnvironment=true 
+DefaultDirName={pf}/SansView
+DefaultGroupName=DANSE/SansView-2.0.1
 DisableProgramGroupPage=yes
 LicenseFile=license.txt
@@ -20,23 +25,116 @@
 
 
+[Registry]
+Root: HKCR;	Subkey: ".xml/OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
+Root: HKCR;	Subkey: ".txt/OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
+Root: HKCR;	Subkey: ".asc/OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
+Root: HKCR;	Subkey: ".dat/OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
+Root: HKCR;	Subkey: ".tif/OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
+Root: HKCR;	Subkey: ".abs/OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
+Root: HKCR;	Subkey: ".d1d/OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
+Root: HKCR;	Subkey: ".sans/OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
+Root: HKCR; Subkey: "applications\SansView.exe\shell\open\command";	ValueType: string; ValueName: "";	ValueData: """{app}\SansView.exe""  ""%1"""; 	 Flags: uninsdeletevalue noerror
+Root: HKCU;	Subkey: "Software\Classes/.xml/OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
+Root: HKCU;	Subkey: "Software\Classes/.txt/OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
+Root: HKCU;	Subkey: "Software\Classes/.asc/OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
+Root: HKCU;	Subkey: "Software\Classes/.dat/OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
+Root: HKCU;	Subkey: "Software\Classes/.tif/OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
+Root: HKCU;	Subkey: "Software\Classes/.abs/OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
+Root: HKCU;	Subkey: "Software\Classes/.d1d/OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
+Root: HKCU;	Subkey: "Software\Classes/.sans/OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
+Root: HKCU; Subkey: "Software/Classes/applications\SansView.exe\shell\open\command";	ValueType: string; ValueName: "";	ValueData: """{app}\SansView.exe""  ""%1"""; 	 Flags: uninsdeletevalue noerror
+Root: HKCR;	Subkey: ".svs";	ValueType: string;	ValueName: "";	ValueData: "{app}\SansView.exe";	 Flags: uninsdeletevalue  noerror
+Root: HKCR;	Subkey: ".fitv";	ValueType: string;	ValueName: "";	ValueData: "{app}\SansView.exe";	 Flags: uninsdeletevalue  noerror
+Root: HKCR;	Subkey: ".inv";	ValueType: string;	ValueName: "";	ValueData: "{app}\SansView.exe";	 Flags: uninsdeletevalue  noerror
+Root: HKCR;	Subkey: ".prv";	ValueType: string;	ValueName: "";	ValueData: "{app}\SansView.exe";	 Flags: uninsdeletevalue  noerror
+Root: HKCR; Subkey: "{app}\SansView.exe";	ValueType: string; ValueName: "";	ValueData: "{app}\SansView File";	 Flags: uninsdeletekey  noerror 	
+Root: HKCR; Subkey: "{app}\SansView.exe\shell\open\command";	ValueType: string; ValueName: "";	ValueData: """{app}\SansView.exe""  ""%1""";	 Flags: uninsdeletevalue noerror 	
+Root: HKCR; Subkey: "{app}\images\ball.ico";	ValueType: string; ValueName: "";	ValueData: "{app}\SansView.exe,0";	 Flags: uninsdeletevalue noerror 	
+Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment";	ValueType: expandsz; ValueName: "SANSVIEWPATH";	ValueData: "{app}";	 Flags: uninsdeletevalue noerror
+; Write to PATH (below) is disabled; need more tests
+;Root: HKCU; Subkey: "Environment";	ValueType: expandsz; ValueName: "PATH";	ValueData: "%SANSVIEWPATH%;{olddata}";	 Check: NeedsAddPath()
+
+
 [Languages]
-Name: "english"; MessagesFile: "compiler:Default.isl"
+Name: "english";	MessagesFile: "compiler:Default.isl"
+
 
 [Tasks]
-Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
+Name: "desktopicon";	Description: "{cm:CreateDesktopIcon}";	GroupDescription: "{cm:AdditionalIcons}";	Flags: unchecked
+Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}";	GroupDescription: "{cm:AdditionalIcons}";
+
 
 [Files]
-Source: "dist\SansView.exe"; DestDir: "{app}"; Flags: ignoreversion
-Source: "dist\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
-Source: "images\*"; DestDir: "{app}\images"; Flags: ignoreversion recursesubdirs createallsubdirs
-Source: "test\*"; DestDir: "{app}\test"; Flags: ignoreversion recursesubdirs createallsubdirs
-; NOTE: Don't use "Flags: ignoreversion" on any shared system files
+Source: "dist\SansView.exe";	DestDir: "{app}";	Flags: ignoreversion
+Source: "dist\*";	DestDir: "{app}";	Flags: ignoreversion recursesubdirs createallsubdirs
+Source: "dist\plugin_models\*";	DestDir: "{userappdata}\..\.sansview\plugin_models";	Flags: recursesubdirs createallsubdirs
+Source: "dist\config\custom_config.py";	DestDir: "{userappdata}\..\.sansview\config";	Flags: recursesubdirs createallsubdirs
+;	NOTE: Don't use "Flags: ignoreversion" on any shared system files
 
 [Icons]
-Name: "{group}\SansView"; Filename: "{app}\SansView.exe"; WorkingDir: "{app}"
-Name: "{group}\{cm:UninstallProgram,SansView}"; Filename: "{uninstallexe}"
-Name: "{commondesktop}\SansView Dev12082010"; Filename: "{app}\SansView.exe"; Tasks: desktopicon; WorkingDir: "{app}"
+Name: "{group}\SansView";	Filename: "{app}\SansView.exe";	WorkingDir: "{app}"; IconFilename: "{app}\images\ball.ico" 
+Name: "{group}\{cm:UninstallProgram, SansView}";	 Filename: "{uninstallexe}" 
+Name: "{commondesktop}\SansView-2.0.1";	Filename: "{app}\SansView.exe";	Tasks: desktopicon; WorkingDir: "{app}" ; IconFilename: "{app}\images\ball.ico" 
+Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\SansView-2.0.1";	Filename: "{app}\SansView.exe";	Tasks: quicklaunchicon; WorkingDir: "{app}"; IconFilename: "{app}\images\ball.ico" 
+
 
 [Run]
-Filename: "{app}\SansView.exe"; Description: "{cm:LaunchProgram,SansView}"; Flags: nowait postinstall skipifsilent
+Filename: "{app}\SansView.exe";	Description: "{cm:LaunchProgram, SansView}";	Flags: nowait postinstall skipifsilent
+; Install the Microsoft C++ DLL redistributable package if it is provided and the DLLs are not present on the target system.
+; Note that the redistributable package is included if the app was built using Python 2.6 or 2.7, but not with 2.5.
+; Parameter options:
+; - for silent install use: "/q"
+; - for silent install with progress bar use: "/qb"
+; - for silent install with progress bar but disallow cancellation of operation use: "/qb!"
+; Note that we do not use the postinstall flag as this would display a checkbox and thus require the user to decide what to do.
+;Filename: "{app}\vcredist_x86.exe"; Parameters: "/qb!"; WorkingDir: "{tmp}"; StatusMsg: "Installing Microsoft Visual C++ 2008 Redistributable Package ..."; Check: InstallVC90CRT(); Flags: skipifdoesntexist waituntilterminated
 
+
+[Dirs]
+Name: "{app}\";	Permissions: everyone-modify	
+
+
+[Code]
+function InstallVC90CRT(): Boolean;
+begin
+    Result := not DirExists('C:\WINDOWS\WinSxS\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_d08d0375');
+end;
+
+function NeedsAddPath(): boolean;
+var
+  oldpath: string;
+  newpath: string;
+  pathArr:    TArrayOfString;
+  i:        Integer;
+begin
+  RegQueryStringValue(HKEY_CURRENT_USER,'Environment','PATH', oldpath)
+  oldpath := oldpath + ';';
+  newpath := '%SANSVIEWPATH%';
+  i := 0;
+  while (Pos(';', oldpath) > 0) do begin
+    SetArrayLength(pathArr, i+1);
+    pathArr[i] := Copy(oldpath, 0, Pos(';', oldpath)-1);
+    oldpath := Copy(oldpath, Pos(';', oldpath)+1, Length(oldpath));
+    i := i + 1;
+    // Check if current directory matches app dir
+    if newpath = pathArr[i-1] 
+    then begin
+      Result := False;
+      exit;
+    end;
+  end;
+  Result := True;
+end;
+
+
+[UninstallDelete]
+; Delete directories and files that are dynamically created by the application (i.e. at runtime).
+Type: filesandordirs; Name: "{app}\.matplotlib"
+Type: files; Name: "{app}\*.*"
+; The following is a workaround for the case where the application is installed and uninstalled but the
+;{app} directory is not deleted because it has user files.  Then the application is installed into the
+; existing directory, user files are deleted, and the application is un-installed again.  Without the
+; directive below, {app} will not be deleted because Inno Setup did not create it during the previous
+; installation.
+Type: dirifempty; Name: "{app}"
+
Index: sansview/installer_generator.py
===================================================================
--- sansview/installer_generator.py	(revision aade98e45360b39cf3edfa29660d029f66b996bb)
+++ sansview/installer_generator.py	(revision 5c3aafa3f0d20d6026d43914144d152eb0d07d01)
@@ -1,4 +1,4 @@
 """
-This module generates .ss file according to the local config of
+This module generates .iss file according to the local config of
 the current application. Please make sure a file named "local_config.py"
 exists in the current directory. Edit local_config.py according to your needs.
Index: sansview/installer_new.iss
===================================================================
--- sansview/installer_new.iss	(revision aade98e45360b39cf3edfa29660d029f66b996bb)
+++ 	(revision )
@@ -1,140 +1,0 @@
-
-; Script generated by the Inno Setup Script Wizard
-
-; and local_config.py located in this directory.
- ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
-[Setup]
-
-ChangesAssociations=yes
-AppName=SansView
-AppVerName=SansView-2.0.1
-AppPublisher=(c) 2009 - 2011, University of Tennessee
-AppPublisherURL=http://danse.chem.utk.edu
-AppSupportURL=http://danse.chem.utk.edu
-AppUpdatesURL=http://danse.chem.utk.edu 
-ChangesEnvironment=true 
-DefaultDirName={pf}\SansView
-DefaultGroupName=DANSE\SansView-2.0.1
-DisableProgramGroupPage=yes
-LicenseFile=license.txt
-OutputBaseFilename=setupSansView
-SetupIconFile=images\ball.ico
-Compression=lzma
-SolidCompression=yes
-PrivilegesRequired=none
-
-
-[Registry]
-Root: HKCR;	Subkey: ".xml\OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
-Root: HKCR;	Subkey: ".txt\OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
-Root: HKCR;	Subkey: ".asc\OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
-Root: HKCR;	Subkey: ".dat\OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
-Root: HKCR;	Subkey: ".tif\OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
-Root: HKCR;	Subkey: ".abs\OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
-Root: HKCR;	Subkey: ".d1d\OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
-Root: HKCR;	Subkey: ".sans\OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
-Root: HKCR; Subkey: "applications\SansView.exe\shell\open\command";	ValueType: string; ValueName: "";	ValueData: """{app}\SansView.exe""  ""%1"""; 	 Flags: uninsdeletevalue noerror
-Root: HKCU;	Subkey: "Software\Classes\.xml\OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
-Root: HKCU;	Subkey: "Software\Classes\.txt\OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
-Root: HKCU;	Subkey: "Software\Classes\.asc\OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
-Root: HKCU;	Subkey: "Software\Classes\.dat\OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
-Root: HKCU;	Subkey: "Software\Classes\.tif\OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
-Root: HKCU;	Subkey: "Software\Classes\.abs\OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
-Root: HKCU;	Subkey: "Software\Classes\.d1d\OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
-Root: HKCU;	Subkey: "Software\Classes\.sans\OpenWithList\SansView.exe";	 Flags: uninsdeletekey noerror
-Root: HKCU; Subkey: "Software\Classes\applications\SansView.exe\shell\open\command";	ValueType: string; ValueName: "";	ValueData: """{app}\SansView.exe""  ""%1"""; 	 Flags: uninsdeletevalue noerror
-Root: HKCR;	Subkey: ".svs";	ValueType: string;	ValueName: "";	ValueData: "{app}\SansView.exe";	 Flags: uninsdeletevalue  noerror
-Root: HKCR;	Subkey: ".fitv";	ValueType: string;	ValueName: "";	ValueData: "{app}\SansView.exe";	 Flags: uninsdeletevalue  noerror
-Root: HKCR;	Subkey: ".inv";	ValueType: string;	ValueName: "";	ValueData: "{app}\SansView.exe";	 Flags: uninsdeletevalue  noerror
-Root: HKCR;	Subkey: ".prv";	ValueType: string;	ValueName: "";	ValueData: "{app}\SansView.exe";	 Flags: uninsdeletevalue  noerror
-Root: HKCR; Subkey: "{app}\SansView.exe";	ValueType: string; ValueName: "";	ValueData: "{app}\SansView File";	 Flags: uninsdeletekey  noerror 	
-Root: HKCR; Subkey: "{app}\SansView.exe\shell\open\command";	ValueType: string; ValueName: "";	ValueData: """{app}\SansView.exe""  ""%1""";	 Flags: uninsdeletevalue noerror 	
-Root: HKCR; Subkey: "{app}\images\ball.ico";	ValueType: string; ValueName: "";	ValueData: "{app}\SansView.exe,0";	 Flags: uninsdeletevalue noerror 	
-Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment";	ValueType: expandsz; ValueName: "SANSVIEWPATH";	ValueData: "{app}";	 Flags: uninsdeletevalue noerror
-; Write to PATH (below) is disabled; need more tests
-;Root: HKCU; Subkey: "Environment";	ValueType: expandsz; ValueName: "PATH";	ValueData: "%SANSVIEWPATH%;{olddata}";	 Check: NeedsAddPath()
-
-
-[Languages]
-Name: "english";	MessagesFile: "compiler:Default.isl"
-
-
-[Tasks]
-Name: "desktopicon";	Description: "{cm:CreateDesktopIcon}";	GroupDescription: "{cm:AdditionalIcons}";	Flags: unchecked
-Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}";	GroupDescription: "{cm:AdditionalIcons}";
-
-
-[Files]
-Source: "dist\SansView.exe";	DestDir: "{app}";	Flags: ignoreversion
-Source: "dist\*";	DestDir: "{app}";	Flags: ignoreversion recursesubdirs createallsubdirs
-Source: "dist\plugin_models\*";	DestDir: "{userappdata}\..\.sansview\plugin_models";	Flags: recursesubdirs createallsubdirs
-Source: "dist\config\custom_config.py";	DestDir: "{userappdata}\..\.sansview\config";	Flags: recursesubdirs createallsubdirs
-;	NOTE: Don't use "Flags: ignoreversion" on any shared system files
-
-[Icons]
-Name: "{group}\SansView";	Filename: "{app}\SansView.exe";	WorkingDir: "{app}"; IconFilename: "{app}\images\ball.ico" 
-Name: "{group}\{cm:UninstallProgram, SansView}";	 Filename: "{uninstallexe}" 
-Name: "{commondesktop}\SansView-2.0.1";	Filename: "{app}\SansView.exe";	Tasks: desktopicon; WorkingDir: "{app}" ; IconFilename: "{app}\images\ball.ico" 
-Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\SansView-2.0.1";	Filename: "{app}\SansView.exe";	Tasks: quicklaunchicon; WorkingDir: "{app}"; IconFilename: "{app}\images\ball.ico" 
-
-
-[Run]
-Filename: "{app}\SansView.exe";	Description: "{cm:LaunchProgram, SansView}";	Flags: nowait postinstall skipifsilent
-; Install the Microsoft C++ DLL redistributable package if it is provided and the DLLs are not present on the target system.
-; Note that the redistributable package is included if the app was built using Python 2.6 or 2.7, but not with 2.5.
-; Parameter options:
-; - for silent install use: "/q"
-; - for silent install with progress bar use: "/qb"
-; - for silent install with progress bar but disallow cancellation of operation use: "/qb!"
-; Note that we do not use the postinstall flag as this would display a checkbox and thus require the user to decide what to do.
-;Filename: "{app}\vcredist_x86.exe"; Parameters: "/qb!"; WorkingDir: "{tmp}"; StatusMsg: "Installing Microsoft Visual C++ 2008 Redistributable Package ..."; Check: InstallVC90CRT(); Flags: skipifdoesntexist waituntilterminated
-
-
-[Dirs]
-Name: "{app}\";	Permissions: everyone-modify	
-
-
-[Code]
-function InstallVC90CRT(): Boolean;
-begin
-    Result := not DirExists('C:\WINDOWS\WinSxS\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_d08d0375');
-end;
-
-function NeedsAddPath(): boolean;
-var
-  oldpath: string;
-  newpath: string;
-  pathArr:    TArrayOfString;
-  i:        Integer;
-begin
-  RegQueryStringValue(HKEY_CURRENT_USER,'Environment','PATH', oldpath)
-  oldpath := oldpath + ';';
-  newpath := '%SANSVIEWPATH%';
-  i := 0;
-  while (Pos(';', oldpath) > 0) do begin
-    SetArrayLength(pathArr, i+1);
-    pathArr[i] := Copy(oldpath, 0, Pos(';', oldpath)-1);
-    oldpath := Copy(oldpath, Pos(';', oldpath)+1, Length(oldpath));
-    i := i + 1;
-    // Check if current directory matches app dir
-    if newpath = pathArr[i-1] 
-    then begin
-      Result := False;
-      exit;
-    end;
-  end;
-  Result := True;
-end;
-
-
-[UninstallDelete]
-; Delete directories and files that are dynamically created by the application (i.e. at runtime).
-Type: filesandordirs; Name: "{app}\.matplotlib"
-Type: files; Name: "{app}\*.*"
-; The following is a workaround for the case where the application is installed and uninstalled but the
-;{app} directory is not deleted because it has user files.  Then the application is installed into the
-; existing directory, user files are deleted, and the application is un-installed again.  Without the
-; directive below, {app} will not be deleted because Inno Setup did not create it during the previous
-; installation.
-Type: dirifempty; Name: "{app}"
-
Index: sansview/license.txt
===================================================================
--- sansview/license.txt	(revision fa5979903069ec07217984e991d9c863a7cc3766)
+++ sansview/license.txt	(revision 5c3aafa3f0d20d6026d43914144d152eb0d07d01)
@@ -11,3 +11,3 @@
 http://wiki.cacr.caltech.edu/danse/index.php/Main_Page
 
-copyright 2009, University of Tennessee for the DANSE project
+copyright 2009-2011, University of Tennessee
Index: sansview/setup_all.py
===================================================================
--- sansview/setup_all.py	(revision 8fe5a50127986ef322792559f226795677128bbe)
+++ 	(revision )
@@ -1,263 +1,0 @@
-# Note: This script should be moved the upper folder to run properly.
-# Script for linux to setup all SansView internal packages (Not on sansview itself)
-#
-# Usage:
-# python setup_all.py 
-
-import os
-import sys
-import shutil
-import logging
-
-# Installation folder
-import time
-timestamp = int(time.time())
-CWD    = os.getcwd()
-
-# On Windows, the python executable is not always on the path.
-# Use its most frequent location as the default.
-if sys.platform == 'win32':
-    PYTHON = "c:\python25\python"
-    
-else:
-    PYTHON = 'python'
-
-
-def check_system():
-    """
-        Checks that the system has the necessary modules.
-    """
-    is_ok = True
-    msg = ''
-    try:
-        import wx
-        if not wx.__version__.count('2.8.11') and \
-             not wx.__version__.count('2.8.12'):
-            mesg = "wx: Recommending version 2.8.11 or 2.8.12"
-            msg += mesg + "\n"
-            print mesg
-    except:
-        is_ok = False
-        mesg = "Error: wxpython 2.8.11 (12) missing"
-        msg += mesg + "\n"
-        print mesg
-        logging.error("wxpython missing")
-    
-    try:
-        import matplotlib
-        if not matplotlib.__version__.count('0.99.0') and \
-             not matplotlib.__version__.count('0.99.1'):
-            mesg = "matplotlib: Recommending version 0.99.0 or 0.99.1"
-            msg += mesg + "\n"
-            print mesg
-    except:
-        is_ok = False
-        mesg = "Error: matplotlib 0.99.0 (1) missing"
-        msg += mesg + "\n"
-        print mesg
-        logging.error("matplotlib missing")
-        
-    try:
-        import numpy 
-        if not numpy.__version__.count('1.4.1'):
-            mesg = "numpy: Recommending version 1.4.1"
-            msg += mesg + "\n"
-            print mesg
-    except:
-        is_ok = False
-        mesg = "Error: numpy 1.4.1 missing"
-        msg += mesg + "\n"
-        print mesg
-        logging.error("numpy missing")
-        
-    try:
-        import scipy 
-        if not scipy.__version__.count('0.7.2'):
-            mesg = "scipy: Recommending version 0.7.2"
-            msg += mesg + "\n"
-            print mesg
-    except:
-        is_ok = False
-        mesg = "Error: scipy 0.7.2 missing"
-        msg += mesg + "\n"
-        print mesg
-        logging.error("scipy missing")
-
-    try:
-        import periodictable
-        if not periodictable.__version__.count('1.3.0'):
-            mesg = "periodictable: Recommending version 1.3.0"
-            msg += mesg + "\n"
-            print mesg
-    except:
-        print "Trying to install perodic table..."
-        try:
-            os.system("easy_install periodictable")
-            print "installed periodictable"
-        except:
-            is_ok = False
-            mesg = "Error: periodictable missing"
-            msg += mesg + "\n"
-            print "easy_install periodictable failed"
-            logging.error("periodictable missing")
-    
-     
-    try:
-        if sys.platform.count("win32")> 0:
-            from wx.lib.pdfwin import PDFWindow   
-    except:
-        is_ok = False
-        mesg = "comtypes missing"
-        msg += mesg + "\n"
-        print mesg
-        logging.error("comtypes missing")
-        
-    try:
-        if sys.platform.count("win32")> 0:
-            import win32com
-    except:
-        is_ok = False
-        mesg = "pywin32 missing"
-        msg += mesg + "\n"
-        print mesg
-        logging.error("pywin32 missing")
-            
-    try:
-        import pyparsing
-    except:
-        try:
-            os.system("easy_install pyparsing")
-            print "installed pyparsing"
-        except:
-            is_ok = False
-            mesg = "pyparsing missing"
-            msg += mesg + "\n"
-            print mesg
-            print "easy_install pyparsing failed"
-            logging.error("pyparsing missing")
-              
-    if os.system("gcc -dumpversion")==1:
-        is_ok = False
-        mesg = "missing mingw/gcc"
-        msg += mesg + "\n"
-        print mesg
-        logging.error("missing mingw/gcc")
-    
-    return is_ok, msg
-
-
-def install_pkg(setup_dir):
-    """
-        Check a package out and install it
-        
-        @param install_dir: directory to put the code in
-        @param setup_dir: relative location of the setup.py script
-        @param url: URL of the SVN repo
-    """
-    #print "PYTHON, LIB_FOLDER=====",PYTHON
-    #logging.info("Installing Pakages" )
-    try:   
-        os.chdir(setup_dir) 
-        os.system("%s setup.py install" % PYTHON)  
-        print "Installation %s successful.." % setup_dir  
-    except:
-        logging.error("Installation failed on %s"% setup_dir)
-        logging.error(sys.exc_value)
-        raw_input("Press enter to continue\n")
-        sys.exit()
-
-def install(release=False):
-    """
-        Check the SansView code out
-    """
-    wd = os.getcwd()
-    os.chdir(wd)
-    for folder in os.listdir(wd):
-        if os.path.isdir(os.path.join(wd, folder)):
-            if folder.count('sansview') > 0:
-                setup_dir = folder
-            try:
-                install_pkg(folder)
-            except:
-                pass
-        os.chdir(wd)
-
-        
-    # run sansview
-    try:
-        os.chdir(setup_dir) 
-        os.system("%s sansview.py" % PYTHON) 
-    except:
-        pass
-           
-    # try to make the sansview dir writable to everyone
-    os.chdir(wd) 
-    try:
-        if sys.platform == 'darwin':
-            os.system("chmod -R g+w %s"% setup_dir) 
-        else:
-            os.system("chmod 777 -R %s"% setup_dir)
-    except:
-        print "Could not give a permission to everyone for %s." % setup_dir
-
-            
-def prepare(wipeout = True):
-    """
-        Prepare the build
-        
-        @param wipeout: If True, the DANSE modules in the standard site-packages will be
-        removed to avoid conflicts.
-    """
-    # Remove existing libraries
-    if wipeout == True:
-        
-        logging.info("Deleting DANSES modules in site-packages")
-        from distutils.sysconfig import get_python_lib
-        libdir = get_python_lib()
-        old_dirs = [os.path.join(libdir, 'danse'),
-                    os.path.join(libdir, 'data_util'),
-                    os.path.join(libdir, 'park'),
-                    os.path.join(libdir, 'sans'),
-                    ]
-        for d in old_dirs:
-            if os.path.isdir(d):
-                shutil.rmtree(d)
-                  
-        
-if __name__ == "__main__": 
-    
-    is_ok, _msg = check_system()
-    if is_ok:    
-        if len(sys.argv)==1:
-            # If there is no argument, build the installer
-            sys.argv.append("-t")
-            
-        if len(sys.argv)>1:
-            # Help
-            if sys.argv[1]=="-h":
-                print "Usage:"
-                print "    python build_sansview [command]\n"
-                print "[command] can be any of the following:"
-                print "    -h: lists the command line options"
-                print "    -r: Builds a SansView using the released modules"
-                print "    -t: Builds SansView from the trunk"       
-
-            else:
-                logging.info("Build script for SansView")
-                print "Warning: This script will delete the previous SansView packages..."
-                prepare()
-                # Check the command line argument
-                if sys.argv[1]=="-t":
-                    logging.info("Building from trunk version")
-                    install()
-                else:
-                    logging.info("Building from release version")
-                    install(True)
-   
-    
-        print _msg
-        raw_input("Press enter to continue\n")
-    
-    else:
-        print _msg
-        raw_input("Press enter and install the missing packages before re-run this scripts.\n")
