Changeset 59c6c1e in sasview


Ignore:
Timestamp:
Dec 13, 2011 3:02:00 PM (13 years ago)
Author:
Jae Cho <jhjcho@…>
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:
ea32de3
Parents:
d9673d7a
Message:

temp commits for py2exe, Todo: need to work on 64bits and to clean up

Location:
sansview
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • sansview/installer_new.iss

    r2d74016 r59c6c1e  
    6262[Tasks] 
    6363Name: "desktopicon";    Description: "{cm:CreateDesktopIcon}";  GroupDescription: "{cm:AdditionalIcons}";       Flags: unchecked 
     64Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked 
    6465 
    6566 
     
    6768Source: "dist\SansView.exe";    DestDir: "{app}";       Flags: ignoreversion 
    6869Source: "dist\*";       DestDir: "{app}";       Flags: ignoreversion recursesubdirs createallsubdirs 
    69 Source: "images\*";     DestDir: "{app}\images";        Flags: ignoreversion recursesubdirs createallsubdirs 
    70 Source: "test\*";       DestDir: "{app}\test";  Flags: ignoreversion recursesubdirs createallsubdirs 
    71 Source: "media\*";      DestDir: "{app}\media"; Flags: ignoreversion recursesubdirs createallsubdirs 
    7270;       NOTE: Don't use "Flags: ignoreversion" on any shared system files 
    7371 
    7472[Icons] 
    75 Name: "{group}\SansView";       Filename: "{app}\SansView.exe"; WorkingDir: "{app}"  
     73Name: "{group}\SansView";       Filename: "{app}\SansView.exe"; WorkingDir: "{app}"; IconFilename: "{app}\images\ball.ico" 
    7674Name: "{group}\{cm:UninstallProgram, SansView}";         Filename: "{uninstallexe}"  
    77 Name: "{commondesktop}\SansView-2.0.1"; Filename: "{app}\SansView.exe"; Tasks: desktopicon; WorkingDir: "{app}"  
     75Name: "{commondesktop}\SansView-2.0.1"; Filename: "{app}\SansView.exe"; Tasks: desktopicon; WorkingDir: "{app}" ; IconFilename: "{app}\images\ball.ico" 
     76Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\SansView-2.0.1"; Filename: "{app}\SansView"; Tasks: quicklaunchicon; WorkingDir: "{app}"; IconFilename: "{app}\images\ball.ico" 
    7877 
    7978 
    8079[Run] 
    8180Filename: "{app}\SansView.exe"; Description: "{cm:LaunchProgram, SansView}";    Flags: nowait postinstall skipifsilent 
     81; Install the Microsoft C++ DLL redistributable package if it is provided and the DLLs are not present on the target system. 
     82; Note that the redistributable package is included if the app was built using Python 2.6 or 2.7, but not with 2.5. 
     83; Parameter options: 
     84; - for silent install use: "/q" 
     85; - for silent install with progress bar use: "/qb" 
     86; - for silent install with progress bar but disallow cancellation of operation use: "/qb!" 
     87; 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. 
     88;Filename: "{app}\vcredist_x86.exe"; Parameters: "/qb!"; WorkingDir: "{tmp}"; StatusMsg: "Installing Microsoft Visual C++ 2008 Redistributable Package ..."; Check: InstallVC90CRT(); Flags: skipifdoesntexist waituntilterminated 
    8289 
    8390 
     
    8794 
    8895[Code] 
     96function InstallVC90CRT(): Boolean; 
     97begin 
     98    Result := not DirExists('C:\WINDOWS\WinSxS\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_d08d0375'); 
     99end; 
     100 
    89101function NeedsAddPath(): boolean; 
    90102var 
     
    113125end; 
    114126 
     127[UninstallDelete] 
     128; Delete directories and files that are dynamically created by the application (i.e. at runtime). 
     129Type: filesandordirs; Name: "{app}\.matplotlib" 
     130Type: files; Name: "{app}\*.*" 
     131; The following is a workaround for the case where the application is installed and uninstalled but the 
     132;{app} directory is not deleted because it has user files.  Then the application is installed into the 
     133; existing directory, user files are deleted, and the application is un-installed again.  Without the 
     134; directive below, {app} will not be deleted because Inno Setup did not create it during the previous 
     135; installation. 
     136Type: dirifempty; Name: "{app}" 
  • sansview/setup_exe.py

    rfeadd6f r59c6c1e  
    3737import matplotlib 
    3838import py2exe 
    39  
    40  
    41 origIsSystemDLL = py2exe.build_exe.isSystemDLL 
    42 def isSystemDLL(pathname): 
    43         if os.path.basename(pathname).lower() in ("msvcp71.dll", "comctl32.dll", "msvcr90.dll", "dwmapi.dll"): 
    44                 return 0 
    45         return origIsSystemDLL(pathname) 
    46 py2exe.build_exe.isSystemDLL = isSystemDLL 
    47  
    48 if platform.architecture()[0] == '64bit': 
     39import shutil 
     40# Remove the build folder 
     41shutil.rmtree("build", ignore_errors=True) 
     42# do the same for dist folder 
     43shutil.rmtree("dist", ignore_errors=True) 
     44 
     45if sys.version_info < (2, 6): 
     46    origIsSystemDLL = py2exe.build_exe.isSystemDLL 
     47    def isSystemDLL(pathname): 
     48            if os.path.basename(pathname).lower() in ("msvcp71.dll", "comctl32.dll"): 
     49                    return 0 
     50            return origIsSystemDLL(pathname) 
     51    py2exe.build_exe.isSystemDLL = isSystemDLL 
     52 
     53if platform.architecture()[0] == '64bit' and sys.version_info >= (2, 6): 
    4954    manifest = """ 
    5055       <?xml version="1.0" encoding="UTF-8" standalone="yes"?> 
     
    7378      """ 
    7479else: 
    75     manifest = """ 
     80    manifest_for_python26 = """ 
     81        <?xml version="1.0" encoding="UTF-8" standalone="yes"?> 
     82        <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> 
     83          <assemblyIdentity 
     84            version="5.0.0.0" 
     85            processorArchitecture="x86" 
     86            name="SansView" 
     87            type="win32"> 
     88          </assemblyIdentity> 
     89          <description>SansView</description> 
     90          <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> 
     91            <security> 
     92              <requestedPrivileges> 
     93                <requestedExecutionLevel 
     94                  level="asInvoker" 
     95                  uiAccess="false"> 
     96                </requestedExecutionLevel> 
     97              </requestedPrivileges> 
     98            </security> 
     99          </trustInfo> 
     100          <dependency> 
     101            <dependentAssembly> 
     102              <assemblyIdentity 
     103                type="win32" 
     104                name="Microsoft.VC90.CRT" 
     105                version="9.0.21022.8" 
     106                processorArchitecture="x86" 
     107                publicKeyToken="1fc8b3b9a1e18e3b"> 
     108              </assemblyIdentity> 
     109            </dependentAssembly> 
     110          </dependency> 
     111          <dependency> 
     112            <dependentAssembly> 
     113              <assemblyIdentity 
     114                type="win32" 
     115                name="Microsoft.Windows.Common-Controls" 
     116                version="6.0.0.0" 
     117                processorArchitecture="x86" 
     118                publicKeyToken="6595b64144ccf1df" 
     119                language="*"> 
     120              </assemblyIdentity> 
     121            </dependentAssembly> 
     122          </dependency> 
     123        </assembly> 
     124        """ 
     125    manifest_for_python25 = """ 
    76126       <?xml version="1.0" encoding="UTF-8" standalone="yes"?> 
    77127       <assembly xmlns="urn:schemas-microsoft-com:asm.v1" 
     
    99149      """ 
    100150 
     151# Select the appropriate manifest to use. 
     152if sys.version_info >= (3, 0) or sys.version_info < (2, 5): 
     153    print "*** This script only works with Python 2.5, 2.6, or 2.7." 
     154    sys.exit() 
     155elif sys.version_info >= (2, 6): 
     156    manifest = manifest_for_python26 
     157    from glob import glob 
     158    py26MSdll = glob(r"C:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT\*.*") 
     159elif sys.version_info >= (2, 5): 
     160    manifest = manifest_for_python25 
     161    py26MSdll = None 
    101162     
    102163class Target: 
     
    177238    if os.path.split(f)[0].count('.svn')==0: 
    178239        data_files.append(('plugins', [f])) 
    179  
    180      
    181 # 
     240         
     241if py26MSdll != None: 
     242    # install the MSVC 9 runtime dll's into the application folder 
     243    data_files.append(("Microsoft.VC90.CRT", py26MSdll)) 
     244 
    182245# packages 
    183246# 
    184  
    185247packages = ['matplotlib', 'scipy', 'pytz', 'encodings'] 
    186248includes = ['site'] 
    187249 
    188250# Exclude packages that are not needed but are often found on build systems 
    189 excludes = ['PyQt4','sip']  
    190  
    191 dll_excludes = [ 
    192     'libgdk_pixbuf-2.0-0.dll',  
    193     'libgobject-2.0-0.dll', 
    194     'libgdk-win32-2.0-0.dll', 
    195     ] 
     251excludes = ['Tkinter', 'PyQt4', '_ssl', '_tkagg', 'sip'] 
     252 
     253dll_excludes = ['libgdk_pixbuf-2.0-0.dll', 
     254                'libgobject-2.0-0.dll', 
     255                'libgdk-win32-2.0-0.dll', 
     256                'tcl84.dll', 
     257                'tk84.dll', 
     258                'QtGui4.dll', 
     259                'QtCore4.dll', 
     260                'w9xpopen.exe', 
     261                'cygwin1.dll'] 
    196262 
    197263target_wx_client = Target( 
Note: See TracChangeset for help on using the changeset viewer.