build method

Future<File> build()

Generates the ISS script file and returns its path.

Implementation

Future<File> build() async {
  CliLogger.info("Generating ISS script...");
  final script = scriptHeader +
      _setup() +
      _installDelete() +
      _languages() +
      _tasks() +
      _files() +
      _icons() +
      _run();
  final relScriptPath = p.joinAll([
    ...installerBuildDir,
    config.type.dirName,
    "inno-script.iss",
  ]);
  final absScriptPath = p.join(Directory.current.path, relScriptPath);
  final scriptFile = File(absScriptPath);
  scriptFile.createSync(recursive: true);
  scriptFile.writeAsStringSync(script);
  CliLogger.success("Script generated $relScriptPath");
  return scriptFile;
}