Changeset ce7fce5 in sasview
- Timestamp:
- Apr 5, 2011 11:26:42 AM (14 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 93de635d
- Parents:
- 7d0d6c0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/setup_mac.py
r7d0d6c0 rce7fce5 10 10 from distutils.sysconfig import get_python_lib 11 11 import os 12 import string 13 import local_config 12 14 15 ICON = local_config.SetupIconFile_mac 16 EXTENSIONS_LIST = [] 13 17 DATA_FILES = [] 14 18 RESOURCES_FILES = [] … … 16 20 #Periodictable data file 17 21 DATA_FILES = periodictable.data_files() 18 19 22 #invariant and calculator help doc 20 23 import sans.perspectives.calculator as calculator … … 42 45 APP = ['sansview.py'] 43 46 DATA_FILES += ['images','test','plugins','media'] 44 plist = dict(CFBundleDocumentTypes=[dict(CFBundleTypeExtensions=["svs"], 45 CFBundleTypeIconFile='images/ball.icns', 47 # locate file extensions 48 def find_extension(): 49 """ 50 Describe the extensions that can be read by the current application 51 """ 52 try: 53 list = [] 54 EXCEPTION_LIST = ['*', '.', ''] 55 from DataLoader.loader import Loader 56 wild_cards = Loader().get_wildcards() 57 for item in wild_cards: 58 #['All (*.*)|*.*'] 59 file_type, ext = string.split(item, "|*.", 1) 60 if ext.strip() not in EXCEPTION_LIST and ext.strip() not in list: 61 list.append(ext) 62 except: 63 pass 64 try: 65 file_type, ext = string.split(local_config.APPLICATION_WLIST, "|*.", 1) 66 if ext.strip() not in EXCEPTION_LIST and ext.strip() not in list: 67 list.append(ext) 68 except: 69 pass 70 try: 71 for item in local_config.PLUGINS_WLIST: 72 file_type, ext = string.split(item, "|*.", 1) 73 if ext.strip() not in EXCEPTION_LIST and ext.strip() not in list: 74 list.append(ext) 75 except: 76 pass 77 78 return list 79 80 EXTENSIONS_LIST = find_extension() 81 82 83 plist = dict(CFBundleDocumentTypes=[dict(CFBundleTypeExtensions=EXTENSIONS_LIST, 84 CFBundleTypeIconFile=ICON, 46 85 CFBundleTypeName="sansview file", 47 86 CFBundleTypeRole="shell" )],) 48 #)],)87 49 88 APP = ['sansview.py'] 50 89 DATA_FILES += ['images','test','plugins','media'] 51 90 OPTIONS = {'argv_emulation': True, 52 91 'packages': ['lxml','periodictable'], 53 'iconfile': 'images/ball.icns',92 'iconfile': ICON, 54 93 'frameworks':[libxml_path], 55 94 'resources': RESOURCES_FILES,
Note: See TracChangeset
for help on using the changeset viewer.