From b5ec1ce297d90b737cc07be3e0d0d7e81509481d Mon Sep 17 00:00:00 2001 From: "leedongmyung[desktop]" Date: Sun, 29 Oct 2023 12:27:19 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B2=BD=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/cli/commands/command_const.dart | 20 ++++++++++++++++++++ lib/cli/commands/command_install.dart | 4 ++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/lib/cli/commands/command_const.dart b/lib/cli/commands/command_const.dart index ddf2738..ad74bfc 100644 --- a/lib/cli/commands/command_const.dart +++ b/lib/cli/commands/command_const.dart @@ -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'; + ; + } } diff --git a/lib/cli/commands/command_install.dart b/lib/cli/commands/command_install.dart index 4f60147..4d9687a 100644 --- a/lib/cli/commands/command_install.dart +++ b/lib/cli/commands/command_install.dart @@ -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);