Ignore:
Timestamp:
Jul 12, 2010, 6:18:01 PM (10 years ago)
Author:
wilsonr
Message:

Changes to match the windows installer creator.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/installation_files/windows/installer.py

    r7525 r7901  
    1 def create_config(product_version,
    2                   anuga_folder,
    3                   anuga_viewer_folder,
    4                   python,
    5                   numpy,
    6                   scientific_python,
    7                   matplotlib,
    8                   netcdf,
    9                   mingw):
    10         """
    11         Short description:
    12         """
    13        
    14         file = open('config.nsh', 'w')
     1def create_config(product_version, anuga_folder, anuga_viewer_folder, python,
     2              numpy, scientific_python, matplotlib, netcdf, mingw):
     3    """
     4    Short description:
     5    """
     6   
     7    file = open('config.nsh', 'w')
    158
    16         file.write('''!ifndef __CONFIG_NSH
    17 !define __CONFIG_NSH
    18 ; custom config
    19 ; definitions should be quite self-explaining
     9    file.write('!ifndef __CONFIG_NSH\n'
     10               '!define __CONFIG_NSH\n'
     11               '; custom config\n'
     12               '; definitions should be quite self-explaining\n'
     13               '\n'
     14               '; global definitions\n'
     15               '!define ProductName "ANUGA"\n')
     16    file.write('!define ProductVersion "%s"\n' % product_version)
     17    file.write('!define Company "Geoscience Australia"\n'
     18               '!define Website "https://datamining.anu.edu.au/anuga"\n')
     19    file.write('!define ExecutableName "AnugaSetup-%s.exe"\n' % product_version)
     20    file.write('\n'
     21               '; distribution file sources (for compiling the installer)\n'
     22               '!define WelcomeFinishBitmap "wf.bmp"\n'
     23               '!define HeaderBitmap "header.bmp"\n'
     24               '!define InstallerIcon "installer.ico"\n'
     25               '!define FileSource "files"\n'
     26               '\n')
     27    file.write('!define AnugaFolder "%s"\n' % anuga_folder)
     28    file.write('!define AnugaViewerFolder "%s"\n' % anuga_viewer_folder)
     29    file.write('!define PythonInst "%s"\n' % python)
     30    file.write('!define NumpyInst "%s"\n' % numpy)
     31    file.write('!define ScientificInst "%s"\n' % scientific_python)
     32    file.write('!define MatplotlibInst "%s"\n' % matplotlib)
     33    file.write('!define NetCDFFolder "%s"\n' % netcdf)
     34    file.write('!define MinGWInst "%s"\n' % mingw)
     35    file.write('!define MVCRPInst "vcredist_x86.exe"\n'
     36               '\n'
     37               '; registry/advanced information for the installation routine\n'
     38               '!define AnugaViewerDefaultFolder "$PROGRAMFILES\Anuga Viewer"\n'
     39               '!define NetCDFDefaultFolder "$COMMONFILES\NetCDF"\n'
     40               '\n'
     41               '!define ViewerExtension ".sww"\n'
     42               '!define ViewerExtensionAlias "Anuga.Animation"\n'
     43               '\n'
     44               '!define UninstallerRegistryKey '
     45                   r'"Software\Microsoft\Windows\CurrentVersion\Uninstall'
     46                   r'\${ProductName}"'
     47                   '\n'
     48               '!define UninstallerExecutableName "Uninst_Anuga.exe"\n'
     49               '\n'
     50               '!endif\n')
    2051
    21 ; global definitions
    22 !define ProductName "ANUGA"
    23 ''')       
    24         file.write('!define ProductVersion "' + product_version + '"\n')
    25         file.write('!define Company "Geoscience Australia"\n')
    26         file.write('!define Website "https://datamining.anu.edu.au/anuga"\n')
    27         file.write('!define ExecutableName "AnugaSetup-' + product_version + '.exe"\n\n')
    28         file.write('''; distribution file sources (for compiling the installer)
    29 !define WelcomeFinishBitmap "wf.bmp"
    30 !define HeaderBitmap "header.bmp"
    31 !define InstallerIcon "installer.ico"
    32 !define FileSource "files"
    33 
    34 ''')   
    35         file.write('!define AnugaFolder "' + anuga_folder + '"\n')
    36         file.write('!define AnugaViewerFolder "' + anuga_viewer_folder + '"\n')
    37         file.write('!define PythonInst "' + python + '"\n')
    38         file.write('!define NumpyInst "' + numpy + '"\n')
    39         file.write('!define ScientificInst "' + scientific_python + '"\n')
    40         file.write('!define MatplotlibInst "' + matplotlib + '"\n')
    41         file.write('!define NetCDFFolder "' + netcdf + '"\n')
    42         file.write('!define MinGWInst "' + mingw + '"\n')
    43         file.write('!define MVCRPInst "vcredist_x86.exe"\n\n')
    44         file.write('''; registry and advanced information for the installation routine
    45 !define AnugaViewerDefaultFolder "$PROGRAMFILES\Anuga Viewer"
    46 !define NetCDFDefaultFolder "$COMMONFILES\NetCDF"
    47 
    48 !define ViewerExtension ".sww"
    49 !define ViewerExtensionAlias "Anuga.Animation"
    50 
    51 !define UninstallerRegistryKey "Software\Microsoft\Windows\CurrentVersion\Uninstall\${ProductName}"
    52 !define UninstallerExecutableName "Uninst_Anuga.exe"
    53 
    54 !endif''')
    55 
    56         file.close()
     52    file.close()
    5753
    5854
Note: See TracChangeset for help on using the changeset viewer.