source: trunk/installation_files/windows/installer.py @ 7901

Last change on this file since 7901 was 7901, checked in by wilsonr, 10 years ago

Changes to match the windows installer creator.

  • Property svn:executable set to *
File size: 2.4 KB
Line 
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')
8
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')
51
52    file.close()
53
54
Note: See TracBrowser for help on using the repository browser.