Index: sansview/installer_new.iss
===================================================================
--- sansview/installer_new.iss	(revision fa5979903069ec07217984e991d9c863a7cc3766)
+++ sansview/installer_new.iss	(revision d4c19e5f5e7a7eda9ebaa848b52d647d4f05bb25)
@@ -19,5 +19,5 @@
 LicenseFile=license.txt
 OutputBaseFilename=setupSansView
-SetupIconFile=C:\Documents and Settings\galina\workspace\trunk\sansview\images\ball.ico
+SetupIconFile=images\ball.ico
 Compression=lzma
 SolidCompression=yes
@@ -26,18 +26,27 @@
 
 [Registry]
-Root: HKCR;	Subkey: ".xml";	ValueType: string;	ValueName: "";	ValueData: "{app}\SansView.exe";	 Flags: uninsdeletevalue
-Root: HKCR;	Subkey: ".txt";	ValueType: string;	ValueName: "";	ValueData: "{app}\SansView.exe";	 Flags: uninsdeletevalue
-Root: HKCR;	Subkey: ".asc";	ValueType: string;	ValueName: "";	ValueData: "{app}\SansView.exe";	 Flags: uninsdeletevalue
-Root: HKCR;	Subkey: ".dat";	ValueType: string;	ValueName: "";	ValueData: "{app}\SansView.exe";	 Flags: uninsdeletevalue
-Root: HKCR;	Subkey: ".tif";	ValueType: string;	ValueName: "";	ValueData: "{app}\SansView.exe";	 Flags: uninsdeletevalue
-Root: HKCR;	Subkey: ".abs";	ValueType: string;	ValueName: "";	ValueData: "{app}\SansView.exe";	 Flags: uninsdeletevalue
-Root: HKCR;	Subkey: ".d1d";	ValueType: string;	ValueName: "";	ValueData: "{app}\SansView.exe";	 Flags: uninsdeletevalue
-Root: HKCR;	Subkey: ".sans";	ValueType: string;	ValueName: "";	ValueData: "{app}\SansView.exe";	 Flags: uninsdeletevalue
+Root: HKCR;	Subkey: ".txt\openwithlist\SansView.exe"; Flags: uninsdeletekey noerror
+Root: HKCR;	Subkey: ".xml\openwithlist\SansView.exe"; Flags: uninsdeletekey noerror
+Root: HKCR;	Subkey: ".tif\openwithlist\SansView.exe"; Flags: uninsdeletekey noerror
+Root: HKCR;	Subkey: ".tiff\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: ".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\.txt\OpenWithList\SansView.exe"; Flags: uninsdeletekey noerror
+Root: HKCU;	Subkey: "Software\Classes\.xml\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\.tiff\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
-Root: HKCR;	Subkey: ".fitv";	ValueType: string;	ValueName: "";	ValueData: "{app}\SansView.exe";	 Flags: uninsdeletevalue
+Root: HKCR;	Subkey: ".fitv"; ValueType: string;	ValueName: "";	ValueData: "{app}\SansView.exe";	 Flags: uninsdeletevalue
 Root: HKCR;	Subkey: ".inv";	ValueType: string;	ValueName: "";	ValueData: "{app}\SansView.exe";	 Flags: uninsdeletevalue
 Root: HKCR;	Subkey: ".prv";	ValueType: string;	ValueName: "";	ValueData: "{app}\SansView.exe";	 Flags: uninsdeletevalue
-Root: HKCR; Subkey: "{app}\C:\Documents and Settings\galina\workspace\trunk\sansview\images\ball.ico";	ValueType: string; ValueName: "";	ValueData: "{app}\SansView.exe,0"
-Root: HKCR; Subkey: "{app}\SansView.exe\shell\open\command";	ValueType: string; ValueName: "";	ValueData: """{app}\SansView.exe""  ""%1"""
+Root: HKCR; Subkey: "{app}\SansView.exe"; ValueType: string; ValueName: ""; ValueData: "SansView File"; Flags: uninsdeletekey 
+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"
 Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment";	ValueType: expandsz; ValueName: "SANSVIEWPATH";	ValueData: "{app}";	 Flags: uninsdeletevalue
 ; Write to PATH (below) is disabled; need more work
@@ -53,9 +62,11 @@
 
 
+
 [Files]
-Source: "C:\Documents and Settings\galina\workspace\trunk\sansview\scripts\dist\SansView.exe";	DestDir: "{app}";	Flags: ignoreversion
+Source: "dist\SansView.exe";	DestDir: "{app}";	Flags: ignoreversion
 Source: "dist\*";	DestDir: "{app}";	Flags: ignoreversion recursesubdirs createallsubdirs
-Source: "C:\Documents and Settings\galina\workspace\trunk\sansview\images\*";	DestDir: "{app}\images";	Flags: ignoreversion recursesubdirs createallsubdirs
-Source: "C:\Documents and Settings\galina\workspace\trunk\sansview\test\*";	DestDir: "{app}\test";	Flags: ignoreversion recursesubdirs createallsubdirs
+Source: "images\*";	DestDir: "{app}\images";	Flags: ignoreversion recursesubdirs createallsubdirs
+Source: "media\*";	DestDir: "{app}\media";	Flags: ignoreversion recursesubdirs createallsubdirs
+Source: "test\*";	DestDir: "{app}\test";	Flags: ignoreversion recursesubdirs createallsubdirs
 ;	NOTE: Don't use "Flags: ignoreversion" on any shared system files
 
Index: sansview/local_config.py
===================================================================
--- sansview/local_config.py	(revision fa5979903069ec07217984e991d9c863a7cc3766)
+++ sansview/local_config.py	(revision d4c19e5f5e7a7eda9ebaa848b52d647d4f05bb25)
@@ -37,18 +37,20 @@
 _license = "mailto:sansdanse@gmail.com"
 
-_nsf_logo = "images/nsf_logo.png"
-_danse_logo = "images/danse_logo.png"
-_inst_logo = "images/utlogo.gif"
+path = os.getcwd()
+icon_path = os.path.join(path, "images")
+media_path = os.path.join(path, "media")
+test_path = os.path.join(path, "test")
+
+_nsf_logo = os.path.join(icon_path, "nsf_logo.png")
+_danse_logo = os.path.join(icon_path, "danse_logo.png")
+_inst_logo = os.path.join(icon_path, "utlogo.gif")
 _nsf_url = "http://www.nsf.gov"
 _danse_url = "http://www.cacr.caltech.edu/projects/danse/release/index.html"
 _inst_url = "http://www.utk.edu"
-_corner_image = "images/angles_flat.png"
-_welcome_image = "images/SVwelcome.png"
+_corner_image = os.path.join(icon_path, "angles_flat.png")
+_welcome_image = os.path.join(icon_path, "SVwelcome.png")
 _copyright = "(c) 2009, University of Tennessee"
 
-path, _= os.path.split(os.getcwd())
-icon_path = os.path.join(path, "images")
-media_path = os.path.join(path, "media")
-test_path = os.path.join(path, "test")
+
 #edit the list of file state your plugin can read
 APPLICATION_WLIST = 'SansView files (*.svs)|*.svs'
Index: sansview/sansview.py
===================================================================
--- sansview/sansview.py	(revision fa5979903069ec07217984e991d9c863a7cc3766)
+++ sansview/sansview.py	(revision d4c19e5f5e7a7eda9ebaa848b52d647d4f05bb25)
@@ -50,10 +50,14 @@
         # modules. We load the fitting module here
         # to ensure a complete Windows executable build.
-
+        
         # Fitting perspective
-        import sans.perspectives.fitting as module    
-        fitting_plug = module.Plugin()
-        self.gui.add_perspective(fitting_plug)
-
+        try:
+            import sans.perspectives.fitting as module    
+            fitting_plug = module.Plugin()
+            self.gui.add_perspective(fitting_plug)
+        except:
+            logging.error("SansView: could not find Fitting plug-in module")
+            logging.error(sys.exc_value)  
+            
         # P(r) perspective
         try:
@@ -84,5 +88,6 @@
             logging.error("SansView: could not find Calculator plug-in module")
             logging.error(sys.exc_value)  
-   
+
+            
         # Add welcome page
         self.gui.set_welcome_panel(WelcomePanel)
Index: sansview/setup_exe.py
===================================================================
--- sansview/setup_exe.py	(revision fa5979903069ec07217984e991d9c863a7cc3766)
+++ sansview/setup_exe.py	(revision d4c19e5f5e7a7eda9ebaa848b52d647d4f05bb25)
@@ -75,6 +75,6 @@
 # to use the MatPlotLib.
 #
-current_dir = os.getcwd()
-path, _ = os.path.split(current_dir)
+path = os.getcwd()
+
 plugins_dir = os.path.join(path, "plugins")
 media_dir = os.path.join(path, "media")
@@ -85,11 +85,11 @@
 matplotlibdata = findall(matplotlibdatadir)
 data_files = []
-from glob import glob
-data_files = [("Microsoft.VC90.CRT", glob(r'C:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT\*.*'))]
-sys.path.append("C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\redist\\x86\\Microsoft.VC90.CRT")
 # Copying SLD data
 import periodictable
 import logging
 data_files += periodictable.data_files()
+
+import sans.perspectives.fitting as fitting
+data_files += fitting.data_files()
 
 import sans.perspectives.calculator as calculator
@@ -98,4 +98,5 @@
 import sans.perspectives.invariant as invariant
 data_files += invariant.data_files()
+
 import sans.guiframe as guiframe
 data_files += guiframe.data_files()
@@ -114,4 +115,7 @@
     data_files.append(('.', [f]))
 f = 'custom_config.py'
+if os.path.isfile(f):
+    data_files.append(('.', [f]))
+f = 'local_config.py'
 if os.path.isfile(f):
     data_files.append(('.', [f]))
@@ -134,5 +138,5 @@
 for f in findall(plugins_dir):
     if os.path.split(f)[0].count('.svn')==0:
-        data_files.append((os.path.split(f)[0], [f]))
+        data_files.append(('plugins', [f]))
 
     
Index: sansview/welcome_panel.py
===================================================================
--- sansview/welcome_panel.py	(revision fa5979903069ec07217984e991d9c863a7cc3766)
+++ sansview/welcome_panel.py	(revision d4c19e5f5e7a7eda9ebaa848b52d647d4f05bb25)
@@ -95,5 +95,9 @@
         ScrolledPanel.__init__(self, parent, **kwds)
         self.SetupScrolling()
-        image = os.path.join("images","SVwelcome.png")
+        path = os.getcwd()
+        import local_config
+        #icon_path = os.path.join(path, "images")
+        #print "PPP", icon_path,path
+        image = os.path.join(local_config._welcome_image)
         self.SetWindowVariant(variant = FONT_VARIANT)
         self.bitmap_logo = wx.StaticBitmap(self, -1, wx.Bitmap(image))
