ensureVcredistDownloaded method
Downloads and installs Visual C++ 2015-2022 Redistributable.
If the file already exists, it will not be downloaded.
Returns the exit code of the command.
Implementation
Future<int> ensureVcredistDownloaded() async {
// Implementasi untuk memeriksa dan mendownload vcredist
if (!File(vcRedistPath).existsSync()) {
final process = await Process.start(
'curl',
['-L', '-s', vcRedistUrl, '-o', vcRedistPath],
runInShell: true,
);
return process.exitCode;
}
return 0;
}