Install 시 silentbatch도 함께 설치

This commit is contained in:
leedongmyung[desktop] 2023-10-30 20:54:36 +09:00
parent 9c92c64e0b
commit 649d64927f
8 changed files with 13805 additions and 0 deletions

View file

@ -7,6 +7,7 @@ import 'package:oto_cli/cli/cli.dart';
import 'package:oto_cli/cli/commands/command_base.dart';
import 'package:oto_cli/cli/commands/command_const.dart';
import 'package:oto_cli/cli/commands/install/regist_path.dart';
import 'package:oto_cli/resources.resource_importer.dart';
class CommandInstall extends CommandBase {
@override
@ -23,6 +24,10 @@ class CommandInstall extends CommandBase {
await installDir.create(recursive: true);
}
if (Platform.isWindows) {
await installFiles(installPath);
}
//Copy executable file
var target = File(Platform.resolvedExecutable);
var installFilePath = CommandConstant.OS?.installFilePath;
@ -42,6 +47,12 @@ class CommandInstall extends CommandBase {
return simpleFuture;
}
Future installFiles(String installPath) async {
var file = await File('$installPath/silentbatch.exe').create();
await file.writeAsBytes(silentbatch);
return simpleFuture;
}
@override
String getDescription() {
return ':::: Install for the startup program to run on the background.';

File diff suppressed because it is too large Load diff

View file

@ -23,3 +23,8 @@ dev_dependencies:
test: ^1.21.0
build_runner: ^2.1.4
json_serializable: ^6.0.1
resource_importer:
resources:
silentbatch: assets/bin/silentbatch.exe