Production of silicon-based thin-film solar cells