def create_config(product_version, anuga_folder, anuga_viewer_folder, python, numpy, scientific_python, matplotlib, netcdf, mingw): """ Short description: """ file = open('config.nsh', 'w') file.write('!ifndef __CONFIG_NSH\n' '!define __CONFIG_NSH\n' '; custom config\n' '; definitions should be quite self-explaining\n' '\n' '; global definitions\n' '!define ProductName "ANUGA"\n') file.write('!define ProductVersion "%s"\n' % product_version) file.write('!define Company "Geoscience Australia"\n' '!define Website "https://datamining.anu.edu.au/anuga"\n') file.write('!define ExecutableName "AnugaSetup-%s.exe"\n' % product_version) file.write('\n' '; distribution file sources (for compiling the installer)\n' '!define WelcomeFinishBitmap "wf.bmp"\n' '!define HeaderBitmap "header.bmp"\n' '!define InstallerIcon "installer.ico"\n' '!define FileSource "files"\n' '\n') file.write('!define AnugaFolder "%s"\n' % anuga_folder) file.write('!define AnugaViewerFolder "%s"\n' % anuga_viewer_folder) file.write('!define PythonInst "%s"\n' % python) file.write('!define NumpyInst "%s"\n' % numpy) file.write('!define ScientificInst "%s"\n' % scientific_python) file.write('!define MatplotlibInst "%s"\n' % matplotlib) file.write('!define NetCDFFolder "%s"\n' % netcdf) file.write('!define MinGWInst "%s"\n' % mingw) file.write('!define MVCRPInst "vcredist_x86.exe"\n' '\n' '; registry/advanced information for the installation routine\n' '!define AnugaViewerDefaultFolder "$PROGRAMFILES\Anuga Viewer"\n' '!define NetCDFDefaultFolder "$COMMONFILES\NetCDF"\n' '\n' '!define ViewerExtension ".sww"\n' '!define ViewerExtensionAlias "Anuga.Animation"\n' '\n' '!define UninstallerRegistryKey ' r'"Software\Microsoft\Windows\CurrentVersion\Uninstall' r'\${ProductName}"' '\n' '!define UninstallerExecutableName "Uninst_Anuga.exe"\n' '\n' '!endif\n') file.close()