make method

Future<void> make()

Make the Inno Setup script. (innosetup.iss)

Implementation

Future<void> make() async {
  final iss = StringBuffer('''
[Setup]
$app
$compression
$icon
$name
$location
${license ?? ''}

${InnoSetupLanguagesBuilder(languages)}

$files

${InnoSetupIconsBuilder(app)}

${runAfterInstall ? InnoSetupRunBuilder(app) : ''}
''');

  final buildDirectory = Directory("build");

  if (!await buildDirectory.exists()) {
    await buildDirectory.create();
  }

  File('build/innosetup.iss').writeAsStringSync('$iss');

  await Process.start(
    'iscc',
    ['build/innosetup.iss'],
    mode: ProcessStartMode.inheritStdio,
  );
}