경로 수정

This commit is contained in:
leedongmyung[desktop] 2023-10-29 12:27:19 +09:00
parent 9844b0ac83
commit b5ec1ce297
2 changed files with 22 additions and 2 deletions

View file

@ -23,6 +23,10 @@ class _CommandConstantBase {
String get installPath {
return '';
}
String get installFilePath {
return '';
}
}
class _CommandConstantOSX extends _CommandConstantBase {
@ -30,6 +34,11 @@ class _CommandConstantOSX extends _CommandConstantBase {
String get installPath {
return '';
}
@override
String get installFilePath {
return '';
}
}
class _CommandConstantLinux extends _CommandConstantBase {
@ -37,6 +46,11 @@ class _CommandConstantLinux extends _CommandConstantBase {
String get installPath {
return '';
}
@override
String get installFilePath {
return '';
}
}
class _CommandConstantWindows extends _CommandConstantBase {
@ -47,4 +61,10 @@ class _CommandConstantWindows extends _CommandConstantBase {
var userPath = Platform.environment['UserProfile'];
return '$userPath$windowRoamingPath${CLI.serviceName}';
}
@override
String get installFilePath {
return '$installPath\\${CLI.serviceName}.exe';
;
}
}

View file

@ -25,8 +25,8 @@ class CommandInstall extends CommandBase {
//Copy executable file
var target = File(Platform.resolvedExecutable);
var installFilePath = '$installPath\\$label';
await target.copy(installFilePath);
var installFilePath = CommandConstant.OS?.installFilePath;
await target.copy(installFilePath!);
//Regist path
RegistPath.OS?.add(installPath);