def install_mingw(user_io, optional):
    install = True
    if optional:
        user_io.out.writeln('MinGW is a free GNU C/C++ compiler and tools for windows\n'
                            'You need it to build C/C++ applications if you are not using\n'
                            'another compiler as e.g. Visual Studio', front=Color.CYAN)
        install = user_io.request_boolean('Do you want to install MinGW?', True)
    if install:
        user_io.out.writeln('Downloading mingw tools', front=Color.GREEN)
        filename = download(get_mingw_download_url(), 'MinGW.zip')
        user_io.out.info("Unzipping mingw. Please wait, this can take a while...")
        decompress(filename, 'C:\\')
        mingwpath = 'C:/MinGW/bin'
        mingwpath = mingwpath.replace('/', '\\')
        add2path(mingwpath)
        user_io.out.success("MinGW installed in %s!" % mingwpath)
        return True
dataset/ETHPy150Open biicode/client/setups/installers/gnu_compiler_installer.py/install_mingw/original