Changeset 13fe3be in sasview for installers


Ignore:
Timestamp:
May 16, 2017 9:19:23 AM (8 years ago)
Author:
Paul Kienzle <pkienzle@…>
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, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
7df0ccd
Parents:
a67ec83 (diff), 81b1f4d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into ticket-887-reorg

Location:
installers
Files:
4 added
9 moved

Legend:

Unmodified
Added
Removed
  • installers/installer_generator.py

    ra1b8fee ra67ec83  
    66from __future__ import print_function 
    77 
    8 import local_config 
    9 import os  
     8import os 
    109import string 
    1110 
     11root = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 
     12sys.path.insert(0, os.path.join(root, 'sasview-install', 'Lib', 'site-packages')) 
     13from sas.sasview import local_config 
    1214 
    1315REG_PROGRAM = """{app}\MYPROG.EXE"" ""%1""" 
     
    2325AppUpdatesURL = local_config._homepage 
    2426ChangesEnvironment = 'true' 
    25 DefaultDirName = os.path.join("{pf}" , AppName+Dev)  
     27DefaultDirName = os.path.join("{pf}" , AppName+Dev) 
    2628DefaultGroupName = os.path.join(local_config.DefaultGroupName, AppVerName) 
    27                                  
     29 
    2830OutputBaseFilename = local_config.OutputBaseFilename 
    2931SetupIconFile = "images\\ball.ico" 
     
    4648    list_app =[] 
    4749    try: 
    48          
     50 
    4951        #(ext, type, name, flags) 
    5052        from sas.sascalc.dataloader.loader import Loader 
     
    5557            if ext.strip() not in ['.*', ''] and ext.strip() not in list_data: 
    5658                list_data.append((ext, 'string', file_type)) 
    57     except: 
     59    except Exception: 
    5860        pass 
    5961    try: 
     
    6163        if ext.strip() not in ['.', ''] and ext.strip() not in list_app: 
    6264            list_app.append((ext, 'string', file_type)) 
    63     except: 
     65    except Exception: 
    6466        pass 
    6567    try: 
     
    6769            file_type, ext = string.split(item, "|*", 1) 
    6870            if ext.strip() not in ['.', ''] and ext.strip() not in list_app: 
    69                 list_app.append((ext, 'string', file_type))  
    70     except: 
     71                list_app.append((ext, 'string', file_type)) 
     72    except Exception: 
    7173        pass 
    7274    return list_data, list_app 
     
    9193                              %  str(APPLICATION) 
    9294        msg += """ValueType: %s; """ % str('string') 
    93         msg += """ValueName: "%s";\t""" %str('')  
     95        msg += """ValueName: "%s";\t""" %str('') 
    9496        msg += """ValueData: \"""{app}\%s""  ""%s1\"""; \t"""% (str(APPLICATION), 
    95                                                           str('%'))     
     97                                                          str('%')) 
    9698        msg += """ Flags: %s""" % str('uninsdeletevalue noerror') 
    9799        msg += "\n" 
    98         user_list = "Software\Classes"  
     100        user_list = "Software\Classes" 
    99101        for (ext, type, _) in data_extension: 
    100102            list = os.path.join(user_list, ext, openwithlist) 
     
    107109                              %  (str(user_list), str(APPLICATION)) 
    108110        msg += """ValueType: %s; """ % str('string') 
    109         msg += """ValueName: "%s";\t""" %str('')  
     111        msg += """ValueName: "%s";\t""" %str('') 
    110112        msg += """ValueData: \"""{app}\%s""  ""%s1\"""; \t"""% (str(APPLICATION), 
    111                                                           str('%'))     
     113                                                          str('%')) 
    112114        msg += """ Flags: %s""" % str('uninsdeletevalue noerror') 
    113         msg += "\n"         
     115        msg += "\n" 
    114116    if app_extension is not None and app_extension: 
    115117        for (ext, type, _) in app_extension: 
    116118            msg +=  """Root: HKCR;\tSubkey: "%s";\t""" % str(ext) 
    117119            msg += """ValueType: %s;\t""" % str(type) 
    118             #file type empty set the current application as the default  
     120            #file type empty set the current application as the default 
    119121            #reader for this file. change the value of file_type to another 
    120122            #string modify the default reader 
     
    126128    msg += """Root: HKCR; Subkey: "{app}\%s";\t""" % str(APPLICATION) 
    127129    msg += """ValueType: %s; """ % str('string') 
    128     msg += """ValueName: "%s";\t""" % str('')  
    129     msg += """ValueData: "{app}\%s";\t""" % str("SasView File")  
     130    msg += """ValueName: "%s";\t""" % str('') 
     131    msg += """ValueData: "{app}\%s";\t""" % str("SasView File") 
    130132    msg += """ Flags: %s \t""" % str("uninsdeletekey  noerror") 
    131133    msg += "\n" 
    132          
     134 
    133135    #execute the file on double-click 
    134136    msg += """Root: HKCR; Subkey: "{app}\%s\shell\open\command";\t"""  %  str(APPLICATION) 
    135137    msg += """ValueType: %s; """ % str('string') 
    136     msg += """ValueName: "%s";\t""" %str('')  
     138    msg += """ValueName: "%s";\t""" %str('') 
    137139    msg += """ValueData: \"""{app}\%s""  ""%s1\""";\t"""% (str(APPLICATION), 
    138                                                           str('%'))   
     140                                                          str('%')) 
    139141    msg += """ Flags: %s \t""" % str("uninsdeletevalue noerror") 
    140     msg += "\n"                                                       
     142    msg += "\n" 
    141143    #create default icon 
    142144    msg += """Root: HKCR; Subkey: "{app}\%s";\t""" % str(SetupIconFile) 
    143145    msg += """ValueType: %s; """ % str('string') 
    144     msg += """ValueName: "%s";\t""" % str('')  
     146    msg += """ValueName: "%s";\t""" % str('') 
    145147    msg += """ValueData: "{app}\%s,0";\t""" % str(APPLICATION) 
    146148    msg += """ Flags: %s \t""" % str("uninsdeletevalue noerror") 
    147     msg += "\n"   
    148  
    149      
     149    msg += "\n" 
     150 
     151 
    150152    #SASVIEWPATH 
    151153    msg += """Root: HKLM; Subkey: "%s";\t"""  %  str('SYSTEM\CurrentControlSet\Control\Session Manager\Environment') 
    152154    msg += """ValueType: %s; """ % str('expandsz') 
    153     msg += """ValueName: "%s";\t""" % str('SASVIEWPATH')  
     155    msg += """ValueName: "%s";\t""" % str('SASVIEWPATH') 
    154156    msg += """ValueData: "{app}";\t""" 
    155157    msg += """ Flags: %s""" % str('uninsdeletevalue noerror') 
    156158    msg += "\n" 
    157      
     159 
    158160    #PATH 
    159161    msg += """; Write to PATH (below) is disabled; need more tests\n""" 
    160162    msg += """;Root: HKCU; Subkey: "%s";\t"""  %  str('Environment') 
    161163    msg += """ValueType: %s; """ % str('expandsz') 
    162     msg += """ValueName: "%s";\t""" % str('PATH')  
     164    msg += """ValueName: "%s";\t""" % str('PATH') 
    163165    msg += """ValueData: "%s;{olddata}";\t""" % str('%SASVIEWPATH%') 
    164166    msg += """ Check: %s""" % str('NeedsAddPath()') 
    165167    msg += "\n" 
    166          
    167     return msg 
    168  
    169 def write_language(language=['english'], msfile="compiler:Default.isl"):   
     168 
     169    return msg 
     170 
     171def write_languages(languages=('english',), msfile="compiler:Default.isl"): 
    170172    """ 
    171173    define the language of the application 
    172     """  
     174    """ 
    173175    msg = '' 
    174     if language: 
     176    if languages: 
    175177        msg = "\n\n[Languages]\n" 
    176         for lang in language: 
    177             msg += """Name: "%s";\tMessagesFile: "%s"\n""" % (str(lang),  
    178                                                            str(msfile)) 
    179     return msg  
     178        for lang in languages: 
     179            msg += """Name: "%s";\tMessagesFile: "%s"\n""" % (str(lang), str(msfile)) 
     180    return msg 
    180181 
    181182def write_tasks(): 
     
    201202    msg += """Flags: ignoreversion recursesubdirs createallsubdirs\n""" 
    202203    msg += """Source: "dist\plugin_models\*";\tDestDir: "{userdesktop}\..\.sasview\plugin_models";\t""" 
    203     msg += """Flags: recursesubdirs createallsubdirs\n"""  
     204    msg += """Flags: recursesubdirs createallsubdirs\n""" 
    204205    msg += """Source: "dist\compiled_models\*";\tDestDir: "{userdesktop}\..\.sasmodels\compiled_models";\t""" 
    205206    msg += """Flags: recursesubdirs createallsubdirs\n""" 
    206     msg += """Source: "dist\config\custom_config.py";\tDestDir: "{userdesktop}\..\.sasview\config";\t"""  
     207    msg += """Source: "dist\config\custom_config.py";\tDestDir: "{userdesktop}\..\.sasview\config";\t""" 
    207208    msg += """Flags: recursesubdirs createallsubdirs\n""" 
    208     #msg += """Source: "dist\default_categories.json";    DestDir: "{userdesktop}\..\.sasview";\t"""  
     209    #msg += """Source: "dist\default_categories.json";    DestDir: "{userdesktop}\..\.sasview";\t""" 
    209210    #msg += """DestName: "categories.json";\n""" 
    210211    msg += """;\tNOTE: Don't use "Flags: ignoreversion" on any shared system files""" 
     
    235236    msg = """\n\n[Run]\n""" 
    236237    msg += """Filename: "{app}\%s";\t""" % str(APPLICATION) 
    237     msg += """Description: "{cm:LaunchProgram, %s}";\t""" %str(AppName)  
     238    msg += """Description: "{cm:LaunchProgram, %s}";\t""" %str(AppName) 
    238239    msg += """Flags: nowait postinstall skipifsilent\n""" 
    239240    msg += """; Install the Microsoft C++ DLL redistributable package if it is """ 
     
    260261    msg = """\n\n[Dirs]\n""" 
    261262    msg += """Name: "{app}\%s";\t""" % str('') 
    262     msg += """Permissions: everyone-modify\t"""  
    263     msg += """\n"""   
     263    msg += """Permissions: everyone-modify\t""" 
     264    msg += """\n""" 
    264265    return msg 
    265266 
    266267def write_code(): 
    267268    """ 
    268     Code that checks the existing path and snaviewpath  
     269    Code that checks the existing path and snaviewpath 
    269270    in the environmental viriables/PATH 
    270271    """ 
    271272    msg = """\n\n[Code]\n""" 
    272     msg += """function InstallVC90CRT(): Boolean;\n"""  
     273    msg += """function InstallVC90CRT(): Boolean;\n""" 
    273274    msg += """begin\n""" 
    274275    msg += """    Result := not DirExists('C:\WINDOWS\WinSxS\\x86_Microsoft.VC90.""" 
    275276    msg += """CRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_d08d0375');\n""" 
    276277    msg += """end;\n\n""" 
    277     msg += """function NeedsAddPath(): boolean;\n"""  
    278     msg += """var\n"""  
     278    msg += """function NeedsAddPath(): boolean;\n""" 
     279    msg += """var\n""" 
    279280    msg += """  oldpath: string;\n""" 
    280     msg += """  newpath: string;\n"""  
    281     msg += """  pathArr:    TArrayOfString;\n"""  
    282     msg += """  i:        Integer;\n"""  
    283     msg += """begin\n"""  
     281    msg += """  newpath: string;\n""" 
     282    msg += """  pathArr:    TArrayOfString;\n""" 
     283    msg += """  i:        Integer;\n""" 
     284    msg += """begin\n""" 
    284285    msg += """  RegQueryStringValue(HKEY_CURRENT_USER,'Environment',""" 
    285286    msg += """'PATH', oldpath)\n""" 
     
    324325    msg += """; installation.\n""" 
    325326    msg += """Type: dirifempty; Name: "{app}"\n""" 
    326     msg += """\n"""   
     327    msg += """\n""" 
    327328    return msg 
    328329 
     
    333334    TEMPLATE += "\n; and local_config.py located in this directory.\n " 
    334335    TEMPLATE += "; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!" 
    335     TEMPLATE += "\n[Setup]\n\n"  
     336    TEMPLATE += "\n[Setup]\n\n" 
    336337    TEMPLATE += "ChangesAssociations=%s\n" %str('yes') 
    337338    TEMPLATE += "AppName=%s\n" % str(AppName) 
     
    352353    TEMPLATE += "PrivilegesRequired=%s\n" % str(PrivilegesRequired) 
    353354    TEMPLATE += "UsePreviousAppDir=no\n" 
    354     
     355 
    355356    TEMPLATE += write_registry(data_extension=DATA_EXTENSION, 
    356357                                app_extension=APP_EXTENSION) 
    357     TEMPLATE += write_language() 
     358    TEMPLATE += write_languages() 
    358359    TEMPLATE += write_tasks() 
    359360    TEMPLATE += write_file() 
     
    364365    TEMPLATE += write_uninstalldelete() 
    365366    path = '%s.iss' % str(INSTALLER_FILE) 
    366     f = open(path,'w')  
     367    f = open(path,'w') 
    367368    f.write(TEMPLATE) 
    368369    f.close() 
    369370    print("Generate Inno setup installer script complete") 
    370371    print("A new file %s.iss should be created.Please refresh your directory" % str(INSTALLER_FILE)) 
    371      
     372 
    372373if __name__ == "__main__": 
    373374    generate_installer() 
  • installers/setup_exe.py

    ra1b8fee red03b99  
    33# 
    44# The setup to create a Windows executable. 
    5 # Inno Setup can then be used with the installer.iss file  
    6 # in the top source directory to create an installer.  
     5# Inno Setup can then be used with the installer.iss file 
     6# in the top source directory to create an installer. 
    77# 
    88# Setuptools clashes with py2exe 0.6.8 (and probably later too). 
    99# For that reason, most of the code needs to have direct imports 
    10 # that are not going through pkg_resources.  
     10# that are not going through pkg_resources. 
    1111# 
    1212# Attention should be paid to dynamic imports. Data files can 
     
    3434root = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 
    3535platform = '%s-%s'%(get_platform(), sys.version[:3]) 
    36 build_path = os.path.join(root, 'build', 'lib.'+platform) 
    37 #build_path = os.path.join(root, 'sasview-install', 'Lib', 'site-packages') 
     36doc_path = os.path.join(root, 'build', 'lib.'+platform, 'doc') 
     37build_path = os.path.join(root, 'sasview-install', 'Lib', 'site-packages') 
    3838sys.path.insert(0, build_path) 
    3939 
    40 import local_config 
     40from sas.sasview import local_config 
    4141from installer_generator import generate_installer 
    4242 
     
    174174path = os.getcwd() 
    175175 
    176 media_dir = os.path.join(path, "media") 
    177 images_dir = os.path.join(path, "images") 
    178 test_dir = os.path.join(path, "test") 
    179 test_1d_dir = os.path.join(path, "test\\1d_data") 
    180 test_2d_dir = os.path.join(path, "test\\2d_data") 
    181 test_save_dir = os.path.join(path, "test\\save_states") 
    182 test_upcoming_dir = os.path.join(path, "test\\upcoming_formats") 
    183  
    184176matplotlibdatadir = matplotlib.get_data_path() 
    185177matplotlibdata = findall(matplotlibdatadir) 
    186178 
    187 site_loc = get_python_lib() 
    188 opencl_include_dir = os.path.join(site_loc, "pyopencl", "cl") 
    189  
    190 data_files = [] 
     179DATA_FILES = [] 
    191180 
    192181if tinycc: 
    193     data_files += tinycc.data_files() 
     182    DATA_FILES += tinycc.data_files() 
    194183 
    195184# Copying SLD data 
    196185import periodictable 
    197 data_files += periodictable.data_files() 
    198  
    199 import sas.sasgui.perspectives.fitting as fitting 
    200 data_files += fitting.data_files() 
    201  
    202 import sas.sasgui.perspectives.calculator as calculator 
    203 data_files += calculator.data_files() 
    204  
    205 import sas.sasgui.perspectives.invariant as invariant 
    206 data_files += invariant.data_files() 
    207  
    208 import sas.sasgui.guiframe as guiframe 
    209 data_files += guiframe.data_files() 
     186DATA_FILES += periodictable.data_files() 
     187 
     188from sas.sasgui.perspectives import fitting 
     189DATA_FILES += fitting.data_files() 
     190 
     191from sas.sasgui.perspectives import calculator 
     192DATA_FILES += calculator.data_files() 
     193 
     194from sas.sasgui.perspectives import invariant 
     195DATA_FILES += invariant.data_files() 
     196 
     197from sas.sasgui import guiframe 
     198DATA_FILES += guiframe.data_files() 
    210199 
    211200# precompile sas models into the sasview build path; doesn't matter too much 
     
    217206# include the compiled models as data; coordinate the target path for the 
    218207# data with installer_generator.py 
    219 data_files.append(('compiled_models', compiled_dlls)) 
     208DATA_FILES.append(('compiled_models', compiled_dlls)) 
    220209 
    221210import sasmodels 
    222 data_files += sasmodels.data_files() 
     211DATA_FILES += sasmodels.data_files() 
    223212 
    224213for f in matplotlibdata: 
    225214    dirname = os.path.join('mpl-data', f[len(matplotlibdatadir)+1:]) 
    226     data_files.append((os.path.split(dirname)[0], [f])) 
     215    DATA_FILES.append((os.path.split(dirname)[0], [f])) 
    227216 
    228217# Copy the settings file for the sas.dataloader file extension associations 
    229 import sas.sascalc.dataloader.readers 
    230 f = os.path.join(sas.sascalc.dataloader.readers.get_data_path(), 'defaults.json') 
    231 if os.path.isfile(f): 
    232     data_files.append(('.', [f])) 
    233 f = 'custom_config.py' 
    234 if os.path.isfile(f): 
    235     data_files.append(('.', [f])) 
    236     data_files.append(('config', [f])) 
    237 f = 'local_config.py' 
    238 if os.path.isfile(f): 
    239     data_files.append(('.', [f])) 
    240  
    241 f = 'logging.ini' 
    242 if os.path.isfile(f): 
    243     data_files.append(('.', [f])) 
    244  
    245 #f = 'default_categories.json' 
    246 #if os.path.isfile(f): 
    247 #    data_files.append(('.', [f])) 
    248  
    249 # numerical libraries 
     218from sas.sascalc.dataloader import readers 
     219reader_config = os.path.join(readers.get_data_path(), 'defaults.json') 
     220if os.path.isfile(reader_config): 
     221    DATA_FILES.append(('.', [reader_config])) 
     222 
     223# Copy the config files 
     224sas_path = os.path.join('..', 'src', 'sas') 
     225DATA_FILES.append(('.', [os.path.join(sas_path, 'logging.ini')])) 
     226sasview_path = os.path.join(sas_path,'sasview') 
     227config_files = [ 
     228    'custom_config.py', 
     229    'local_config.py', 
     230    #'default_categories.json', 
     231    ] 
     232DATA_FILES.append(('.', [os.path.join(sasview_path, v) for v in config_files])) 
     233DATA_FILES.append(('config', [os.path.join(sasview_path, 'custom_config.py')])) 
     234 
     235# default_categories.json is beside the config files 
     236category_config = os.path.join(os.path.dirname(local_config_file), 
     237                               'default_categories.json') 
     238if os.path.isfile(category_config): 
     239    DATA_FILES.append(('.', [category_config])) 
     240 
     241if os.path.isfile("BUILD_NUMBER"): 
     242    DATA_FILES.append(('.', ["BUILD_NUMBER"])) 
     243 
     244images_dir = local_config.icon_path 
     245media_dir = local_config.media_path 
     246test_dir = local_config.test_path 
     247test_1d_dir = os.path.join(test_dir, "1d_data") 
     248test_2d_dir = os.path.join(test_dir, "2d_data") 
     249test_save_dir = os.path.join(test_dir, "save_states") 
     250test_upcoming_dir = os.path.join(test_dir, "upcoming_formats") 
     251 
     252# Copying the images directory to the distribution directory. 
     253for f in findall(images_dir): 
     254    DATA_FILES.append(("images", [f])) 
     255 
     256# Copying the HTML help docs 
     257for f in findall(media_dir): 
     258    DATA_FILES.append(("media", [f])) 
     259 
     260# Copying the sample data user data 
     261for f in findall(test_1d_dir): 
     262    DATA_FILES.append((os.path.join("test","1d_data"), [f])) 
     263 
     264# Copying the sample data user data 
     265for f in findall(test_2d_dir): 
     266    DATA_FILES.append((os.path.join("test","2d_data"), [f])) 
     267 
     268# Copying the sample data user data 
     269for f in findall(test_save_dir): 
     270    DATA_FILES.append((os.path.join("test","save_states"), [f])) 
     271 
     272# Copying the sample data user data 
     273for f in findall(test_upcoming_dir): 
     274    DATA_FILES.append((os.path.join("test","upcoming_formats"), [f])) 
     275 
     276# Copying opencl include files 
     277site_loc = get_python_lib() 
     278opencl_include_dir = os.path.join(site_loc, "pyopencl", "cl") 
     279for f in findall(opencl_include_dir): 
     280    DATA_FILES.append((os.path.join("includes","pyopencl"), [f])) 
     281 
     282# Numerical libraries 
     283python_root = os.path.dirname(os.path.abspath(sys.executable)) 
    250284def dll_check(dll_path, dlls): 
    251285    dll_includes = [os.path.join(dll_path, dll+'.dll') for dll in dlls] 
    252286    return [dll for dll in dll_includes if os.path.exists(dll)] 
    253287 
    254 python_root = os.path.dirname(os.path.abspath(sys.executable)) 
    255288# Check for ATLAS 
    256 dll_path = os.path.join(python_root, 'lib', 'site-packages', 'numpy', 'core') 
    257 dlls = ['numpy-atlas'] 
    258 atlas_dlls = dll_check(dll_path, dlls) 
     289numpy_path = os.path.join(python_root, 'lib', 'site-packages', 'numpy', 'core') 
     290atlas_dlls = dll_check(numpy_path, ['numpy-atlas']) 
    259291 
    260292# Check for MKL 
    261 dll_path = os.path.join(python_root, 'Library', 'bin') 
    262 dlls = ['mkl_core', 'mkl_def', 'libiomp5md'] 
    263 mkl_dlls = dll_check(dll_path, dlls) 
     293mkl_path = os.path.join(python_root, 'Library', 'bin') 
     294mkl_dlls = dll_check(mkl_path, ['mkl_core', 'mkl_def', 'libiomp5md']) 
    264295 
    265296if atlas_dlls: 
    266     data_files.append(('.', atlas_dlls)) 
     297    DATA_FILES.append(('.', atlas_dlls)) 
    267298elif mkl_dlls: 
    268     data_files.append(('.', mkl_dlls)) 
    269  
    270 if os.path.isfile("BUILD_NUMBER"): 
    271     data_files.append(('.', ["BUILD_NUMBER"])) 
    272  
    273 # Copying the images directory to the distribution directory. 
    274 for f in findall(images_dir): 
    275     if not ".svn" in f: 
    276         data_files.append(("images", [f])) 
    277  
    278 # Copying the HTML help docs 
    279 for f in findall(media_dir): 
    280     if not ".svn" in f: 
    281         data_files.append(("media", [f])) 
    282  
    283 # Copying the sample data user data 
    284 for f in findall(test_1d_dir): 
    285     if not ".svn" in f: 
    286         data_files.append(("test\\1d_data", [f])) 
    287  
    288 # Copying the sample data user data 
    289 for f in findall(test_2d_dir): 
    290     if not ".svn" in f: 
    291         data_files.append(("test\\2d_data", [f])) 
    292  
    293 # Copying the sample data user data 
    294 for f in findall(test_save_dir): 
    295     if not ".svn" in f: 
    296         data_files.append(("test\\save_states", [f])) 
    297  
    298 # Copying the sample data user data 
    299 for f in findall(test_upcoming_dir): 
    300     if not ".svn" in f: 
    301         data_files.append(("test\\upcoming_formats", [f])) 
    302  
    303 # Copying opencl include files 
    304 for f in findall(opencl_include_dir): 
    305     data_files.append(("includes\\pyopencl",[f])) 
     299    DATA_FILES.append(('.', mkl_dlls)) 
    306300 
    307301# See if the documentation has been built, and if so include it. 
    308 doc_path = os.path.join(build_path, "doc") 
    309302if os.path.exists(doc_path): 
    310303    for dirpath, dirnames, filenames in os.walk(doc_path): 
    311304        for filename in filenames: 
    312305            sub_dir = os.path.join("doc", os.path.relpath(dirpath, doc_path)) 
    313             data_files.append((sub_dir, [os.path.join(dirpath, filename)])) 
     306            DATA_FILES.append((sub_dir, [os.path.join(dirpath, filename)])) 
    314307else: 
    315308    raise Exception("You must first build the documentation before creating an installer.") 
     
    317310if msvcrtdll_data_files is not None: 
    318311    # install the MSVC 9 runtime dll's into the application folder 
    319     data_files.append(msvcrtdll_data_files) 
     312    DATA_FILES.append(msvcrtdll_data_files) 
    320313 
    321314# NOTE: 
     
    341334    ]) 
    342335packages.append('periodictable.core') # not found automatically 
    343 # packages.append('IPython') 
     336 
     337# For an interactive interpreter, SasViewCom 
     338packages.extend(['IPython','pyreadline','pyreadline.unicode_helper']) 
     339 
     340# individual models 
    344341includes = ['site', 'lxml._elementpath', 'lxml.etree'] 
    345342 
     
    351348 
    352349 
    353 dll_excludes = [ 
    354350    # Various matplotlib backends we are not using 
    355351    'libgdk_pixbuf-2.0-0.dll', 'libgobject-2.0-0.dll', 'libgdk-win32-2.0-0.dll', 
    356352    'tcl84.dll', 'tk84.dll', 'QtGui4.dll', 'QtCore4.dll', 
    357353    # numpy 1.8 openmp bindings (still seems to use all the cores without them) 
     354    # ... but we seem to need them when building from anaconda, so don't exclude ... 
    358355    #'libiomp5md.dll', 'libifcoremd.dll', 'libmmd.dll', 'svml_dispmd.dll','libifportMD.dll', 
    359356    'numpy-atlas.dll', 
     
    370367target_wx_client = Target( 
    371368    description = 'SasView', 
    372     script = 'sasview.py', 
    373     icon_resources = [(1, os.path.join(images_dir, "ball.ico"))], 
     369    script = 'sasview_gui.py', 
     370    icon_resources = [(1, local_config.SetupIconFile_win)], 
    374371    other_resources = [(24, 1, manifest)], 
    375372    dest_base = "SasView" 
    376373) 
    377374 
    378 # bundle_option = 2 
    379 bundle_option = 3 
    380 if is_64bits: 
    381     bundle_option = 3 
     375target_console_client = Target( 
     376    description = 'SasView console', 
     377    script = 'sasview_console.py', 
     378    icon_resources = [(1, local_config.SetupIconFile_win)], 
     379    other_resources = [(24, 1, manifest)], 
     380    dest_base = "SasViewCom" 
     381) 
     382 
     383bundle_option = 3 if is_64bits else 2 
    382384generate_installer() 
    383385#initialize category stuff 
     
    387389setup( 
    388390    windows=[target_wx_client], 
    389     console=[], 
     391    console=[target_console_client], 
    390392    options={ 
    391393        'py2exe': { 
     
    399401            }, 
    400402    }, 
    401     data_files=data_files, 
     403    data_files=DATA_FILES, 
    402404) 
Note: See TracChangeset for help on using the changeset viewer.